50 #ifndef LED_STRIP_PORT 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) 59 static 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;
#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.
Header file with register and macro declarations for the cc2538 GPIO module.
int led_strip_switch(uint8_t val)
Function to turn ON/OFF the LED strip.
Header file for a bright LED strip driver.
#define GPIO_READ_PIN(PORT_BASE, PIN_MASK)
Read pins with PIN_MASK of port with PORT_BASE.
#define GPIO_SOFTWARE_CONTROL(PORT_BASE, PIN_MASK)
Configure the pin to be software controlled with PIN_MASK of port with PORT_BASE. ...
void led_strip_config(void)
Init function for the bright LED strip driver.
#define GPIO_SET_OUTPUT(PORT_BASE, PIN_MASK)
Set pins with PIN_MASK of port with PORT_BASE to output.
int led_strip_get(void)
Function to get the LED strip current state.