23 #if defined( BSP_GPIO_LEDS )
32 static const tLedArray ledArray[ BSP_NO_OF_LEDS ] = BSP_GPIO_LEDARRAY_INIT;
34 int BSP_LedsInit(
void)
40 for ( i=0; i<BSP_NO_OF_LEDS; i++ )
47 uint32_t BSP_LedsGet(
void)
50 uint32_t retVal, mask;
52 for ( i=0, retVal=0, mask=0x1; i<BSP_NO_OF_LEDS; i++, mask <<= 1 )
60 int BSP_LedsSet(uint32_t leds)
65 for ( i=0, mask=0x1; i<BSP_NO_OF_LEDS; i++, mask <<= 1 )
75 int BSP_LedClear(
int ledNo)
77 if ((ledNo >= 0) && (ledNo < BSP_NO_OF_LEDS))
85 int BSP_LedGet(
int ledNo)
89 if ((ledNo >= 0) && (ledNo < BSP_NO_OF_LEDS))
91 retVal = (int)
GPIO_PinOutGet(ledArray[ledNo].port, ledArray[ledNo].pin);
96 int BSP_LedSet(
int ledNo)
98 if ((ledNo >= 0) && (ledNo < BSP_NO_OF_LEDS))
106 int BSP_LedToggle(
int ledNo)
108 if ((ledNo >= 0) && (ledNo < BSP_NO_OF_LEDS))
Clock management unit (CMU) API.
Board support package API definitions.
__STATIC_INLINE void GPIO_PinOutToggle(GPIO_Port_TypeDef port, unsigned int pin)
Toggle a single pin in GPIO port data out register.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
void GPIO_PinModeSet(GPIO_Port_TypeDef port, unsigned int pin, GPIO_Mode_TypeDef mode, unsigned int out)
Set the mode for a GPIO pin.
General Purpose IO (GPIO) peripheral API.
__STATIC_INLINE void GPIO_PinOutSet(GPIO_Port_TypeDef port, unsigned int pin)
Set a single pin in GPIO data out register to 1.
void CMU_ClockEnable(CMU_Clock_TypeDef clock, bool enable)
Enable/disable a clock.
#define BSP_STATUS_ILLEGAL_PARAM
__STATIC_INLINE unsigned int GPIO_PinOutGet(GPIO_Port_TypeDef port, unsigned int pin)
Get current setting for a pin in a GPIO port data out register.
__STATIC_INLINE void GPIO_PinOutClear(GPIO_Port_TypeDef port, unsigned int pin)
Set a single pin in GPIO data out port register to 0.