45 #include PLATFORM_HEADER
47 #include "contiki-conf.h"
52 #define LEDS_PORT *((volatile uint32_t *)(GPIO_PxOUT_BASE+(GPIO_Px_OFFSET*(LEDS_CONF_PORT/8))))
60 LEDS_PORT |= (LEDS_CONF_RED | LEDS_CONF_GREEN);
66 return ((LEDS_PORT & LEDS_CONF_RED) ? 0 :
LEDS_RED) |
67 ((LEDS_PORT & LEDS_CONF_GREEN) ? 0 :
LEDS_GREEN);
71 leds_arch_set(
unsigned char leds)
73 LEDS_PORT = (LEDS_PORT & ~(LEDS_CONF_RED | LEDS_CONF_GREEN)) |
74 ((leds &
LEDS_RED) ? 0 : LEDS_CONF_RED) |
#define LEDS_RED
LED1 (Red) -> PC0.
void leds_arch_init(void)
Leds implementation.
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...
#define LEDS_GREEN
LED3 (Green) -> PC2.
Minimal Hal functions common across all microcontroller-specific files.
void halGpioConfig(uint32_t io, uint32_t config)
Configure an IO pin's operating mode.