GPIO Interrupt Setting | |
GPIO interrupt level and edge trigger types | |
int | board_gpio_config (uint32_t pin, int mode, bool input, bool drive, int pull) |
int | board_gpio_status (uint32_t pin, bool *input, bool *output, bool *drive, int *pull) |
void | board_gpio_write (uint32_t pin, int value) |
int | board_gpio_read (uint32_t pin) |
int | board_gpio_intconfig (uint32_t pin, int mode, bool filter, xcpt_t isr) |
int | board_gpio_intstatus (uint32_t pin, int *mode, bool *filter, bool *enabled) |
int | board_gpio_int (uint32_t pin, bool enable) |
#define | INT_HIGH_LEVEL (2) /* High Level */ |
#define | INT_LOW_LEVEL (3) /* Low Level */ |
#define | INT_RISING_EDGE (4) /* Rising Edge */ |
#define | INT_FALLING_EDGE (5) /* Falling Edge */ |
#define | INT_BOTH_EDGE (7) /* Both Edge */ |
int board_gpio_config | ( | uint32_t | pin, |
int | mode, | ||
bool | input, | ||
bool | drive, | ||
int | pull | ||
) |
GPIO Configure
[in] | pin | Pin number |
[in] | mode | Function mode 0=GPIO |
[in] | input | Input Enable true=enable, false=disable |
[in] | drive | Drive Strength true=High Drive(4mA), false=Normal(2mA) |
[in] | pull | 0=float, 1=pullup, 2=pulldown, 3=buskeeper
|
int board_gpio_status | ( | uint32_t | pin, |
bool * | input, | ||
bool * | output, | ||
bool * | drive, | ||
int * | pull | ||
) |
GPIO Status
[in] | pin | Pin number |
[out] | input | Input Enable true=enable, false=disable |
[out] | output | Output Enable true=enable, false=disable |
[out] | drive | Drive Strength true=HighDrive(4mA), false=Normal(2mA) |
[out] | pull | 0=float, 1=pullup, 2=pulldown, 3=buskeeper
|
void board_gpio_write | ( | uint32_t | pin, |
int | value | ||
) |
GPIO Write
[in] | pin | Pin number |
[in] | value | Write Value 0<high, 0=low, 0>hiz |
int board_gpio_read | ( | uint32_t | pin | ) |
GPIO Read
[in] | pin | Pin number |
int board_gpio_intconfig | ( | uint32_t | pin, |
int | mode, | ||
bool | filter, | ||
xcpt_t | isr | ||
) |
GPIO Interrupt Configure
[in] | pin | Pin number |
[in] | mode | Interrupt polarity
|
[in] | filter | Noise Filter true=enable, false=disable |
[in] | isr | Interrupt Service Routine |
int board_gpio_intstatus | ( | uint32_t | pin, |
int * | mode, | ||
bool * | filter, | ||
bool * | enabled | ||
) |
GPIO Interrupt Configure
[in] | pin | Pin number |
[out] | mode | Interrupt polarity
|
[out] | filter | Noise Filter true=enable, false=disable |
[out] | enabled | Interrupt true=enable, false=disable |
int board_gpio_int | ( | uint32_t | pin, |
bool | enable | ||
) |
GPIO Interrupt Enable/Disable
[in] | pin | Pin number |
[in] | enable | Interrupt true=enable, false=disable |