7 #include PLATFORM_HEADER
18 for (i = 0; i < boardDescription->
buttons; i++) {
27 uint8_t port = (button >> 3) & 0xf;
28 uint8_t pin = button & 0x7;
30 if (button != DUMMY_BUTTON)
32 return (BUTTON_INPUT_GPIO(port) & (1 << pin)) ? BUTTON_RELEASED : BUTTON_PRESSED;
34 return BUTTON_UNKNOWN;
uint8_t buttons
Number of buttons.
Header for button driver.
Data structure for button description.
Utility and convenience functions for STM32W108 microcontroller, common to both the full and minimal ...
#define PORTx_PIN(x, y)
Some registers and variables require indentifying GPIO by a single number instead of the port and pin...
void halGpioSet(uint32_t gpio, boolean value)
Set/Clear single GPIO bit.
Minimal Hal functions common across all microcontroller-specific files.
uint8_t halGetButtonStatus(HalBoardButton button)
Get button status.
const ButtonResourceType * buttons
Pointer to button resources.
void halInitButton(void)
Init buttons.
const BoardIOType * io
Board I/O description.
void halGpioConfig(uint32_t io, uint32_t config)
Configure an IO pin's operating mode.