7 #include PLATFORM_HEADER
39 *((
volatile uint32_t *)(GPIO_PxOUT_BASE+(GPIO_Px_OFFSET*(led/8)))) ^=
BIT(led&7);
void halGpioConfig(uint32_t io, uint32_t config)
Configure an IO pin's operating mode.
#define BIT(x)
Useful to reference a single bit of a byte.
#define ATOMIC(blah)
A block of code may be made atomic by wrapping it with this macro.
uint8_t HalBoardLed
Ensures that the definitions from the BOARD_HEADER are always used as parameters to the LED functions...
Utility and convenience functions for STM32W108 microcontroller, common to both the full and minimal ...
void halSetLed(HalBoardLed led)
Turns on (sets) a GPIO pin connected to an LED so that the LED turns on.
void halGpioSet(uint32_t gpio, boolean value)
Set/Clear single GPIO bit.
void halToggleLed(HalBoardLed led)
Atomically wraps an XOR or similar operation for a single GPIO pin attached to an LED...
Minimal Hal functions common across all microcontroller-specific files.
void halClearLed(HalBoardLed led)
Turns off (clears) a GPIO pin connected to an LED, which turns off the LED.
void halInitLed(void)
Configures GPIOs pertaining to the control of LEDs.