MSP430F5529 GPIO API¶
-
enum
MSP430F5529_HAL_GPIO::
KPin
¶ Enum containing GPIOs currently setup.
Note - This describes digital pins exposed on the MSP430F5529 launchpad.
Values:
-
P10
= 0¶
-
P11
¶
-
P12
¶
-
P13
¶
-
P14
¶
-
P15
¶
-
P16
¶
-
P20
¶
-
P21
¶
-
P22
¶
-
P23
¶
-
P24
¶
-
P25
¶
-
P26
¶
-
P27
¶
-
P30
¶
-
P31
¶
-
P32
¶
-
P33
¶
-
P34
¶
-
P35
¶
-
P36
¶
-
P37
¶
-
P40
¶
-
P41
¶
-
P42
¶
-
P43
¶
-
P44
¶
-
P45
¶
-
P47
¶
-
P60
¶
-
P61
¶
-
P62
¶
-
P63
¶
-
P64
¶
-
P65
¶
-
P66
¶
-
P70
¶
-
P74
¶
-
P81
¶
-
P82
¶
-
-
KPinDesc
pins
[]¶ Static array of GPIO setup (dir, out, in pins, specific bit).
Note - This (only) describes digital pins exposed on the MSP430F5529 launchpad.
-
void
k_gpio_init
(int pin, KGPIOMode mode, KGPIOPullup pullup)¶ Initialize GPIO pin to specified mode.
I/O pin configuration described in MSP430x5xx Family Guide Section 12.2.4
- Parameters
pin
: number of pin to initializemode
: pin mode to setpullup
: pin pullup value to set
-
unsigned int
k_gpio_read
(int pin)¶ Read in GPIO pin.
- Return
- unsigned int value read from pin
- Parameters
pin
: number of pin to read from
-
void
k_gpio_write
(int pin, unsigned int val)¶ Write to GPIO pin.
- Parameters
pin
: number of pin to write toval
: value to write
-
K_LED_0
P10¶ LED 0 pin.
-
K_LED_RED
P10¶ Red LED pin.
-
K_LED_1
P47¶ LED 1 pin.
-
K_LED_GREEN
P47¶ Green LED pin.
-
K_LED_COUNT
2¶ Number of LEDs available.
-
K_BUTTON_0
P21¶ User button pin.
-
struct
KPinDesc
¶ - #include <pins.h>
Struct which contains GPIO details (dir/out/in/pull pins and bit)