51#define LED_STRIP_PORT GPIO_A_NUM
54#define LED_STRIP_PIN 6
56#define LED_STRIP_PORT_BASE GPIO_PORT_TO_BASE(LED_STRIP_PORT)
57#define LED_STRIP_PIN_MASK GPIO_PIN_MASK(LED_STRIP_PIN)
59static uint8_t initialized = 0;
78 return LED_STRIP_ERROR;
81 if(val != LED_STRIP_ON && val != LED_STRIP_OFF) {
82 return LED_STRIP_ERROR;
95 return LED_STRIP_ERROR;
100 return LED_STRIP_OFF;
Header file with register and macro declarations for the cc2538 GPIO module.
#define GPIO_SOFTWARE_CONTROL(PORT_BASE, PIN_MASK)
Configure the pin to be software controlled with PIN_MASK of port with PORT_BASE.
#define GPIO_SET_PIN(PORT_BASE, PIN_MASK)
Set pins with PIN_MASK of port with PORT_BASE high.
#define GPIO_WRITE_PIN(PORT_BASE, PIN_MASK, value)
Set pins with PIN_MASK of port with PORT_BASE to value.
#define GPIO_SET_OUTPUT(PORT_BASE, PIN_MASK)
Set pins with PIN_MASK of port with PORT_BASE to output.
#define GPIO_READ_PIN(PORT_BASE, PIN_MASK)
Read pins with PIN_MASK of port with PORT_BASE.
int led_strip_switch(uint8_t val)
Function to turn ON/OFF the LED strip.
void led_strip_config(void)
Init function for the bright LED strip driver.
int led_strip_get(void)
Function to get the LED strip current state.
Header file for a bright LED strip driver.