On 9/24/2016 2:45 PM, Sag ich Dir nich wrote:
> to set a pin to input mode i have to add "942" to the hal file under "loadrt" 
> like so:
> 
> # load low-level drivers
> loadrt hal_bb_gpio output_pins=816,822,823,824,825,826,914,923,925 
> input_pins=807,808,809,810,817,911,913,942

That is not where you need to make the change.  You only need to add
the pin to the hal_bb_gpio driver if you need to use it as a GPIO pin
in HAL.

You need to use the config-pin utility (typically in the setup.sh
script) to set the pinmux modes.  Note that the .1 notation doesn't
work, so 50 is added to the pin value (ie: instead of 942 and 942.1,
you get 942 and 992).

Just run:

config-pin 942 input
config-pin 992 qep


You can see what modes are available for each pin with the -l switch:

$ config-pin -l p992
default gpio gpio_pu gpio_pd qep pruout pruin

...and query the current state with -q:

$ config-pin -q p992
P9_92 Mode: gpio Direction: in Value: 0

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to