madison-embedded / gcc-builds

For projects built with the GNU toolchain.
GNU General Public License v3.0
11 stars 8 forks source link

Common: Missing a command for toggling pins #8

Closed vkottler closed 7 years ago

vkottler commented 7 years ago

This may be the single most useful command-line utility we can provide.

Something like pin [<pin_num> | <PORT><PIN>] [on | off] would work best where pin_num is a pin from the female headers and <PORT><PIN> is something like A8 or C5 (may also be routed to one of the female header pins).

Eventually we'll want to support aliases for pins such as braking_solenoid_X so a struct that also implements that capability would be ideal.

vkottler commented 7 years ago

STM32 Nucleo 144 related: I/O schematic, Badgerloop I/O documentation

vkottler commented 7 years ago

It might be better to support read and write, in the future we'll also need an analog read function.

vkottler commented 7 years ago

Want to make sure to check if a pin is already enabled and serving as an alternate function pin

vkottler commented 7 years ago

add info to: pin [<pin_num> | <PORT><PIN>] [on | off | info]

Come up with a way to print info for all pins or all pins from a certain port.

csgreen3 commented 7 years ago

Besides alternate functions and analog information this is completed

vkottler commented 7 years ago

Have pin <PORT> [info] display any potential alias of each pin in parentheses at the end

csgreen3 commented 7 years ago

image

vkottler commented 7 years ago

Make the boolean flag mean the alias should not be used to initialize the pin, allow user to have full contorl over aliased pins

csgreen3 commented 7 years ago

added initialization