Contiki-NG
Files | Functions

Driver to control a bright LED strip powered at 3VDC, drawing power directly from the battery power supply. More...

Files

file  led-strip.c
 Driver for a bright LED strip.
 
file  led-strip.h
 Header file for a bright LED strip driver.
 

Functions

void led_strip_config (void)
 Init function for the bright LED strip driver. More...
 
int led_strip_switch (uint8_t val)
 Function to turn ON/OFF the LED strip. More...
 
int led_strip_get (void)
 Function to get the LED strip current state. More...
 

Detailed Description

Driver to control a bright LED strip powered at 3VDC, drawing power directly from the battery power supply.

An example on how to adapt 12VDC LED strips to 3VDC is provided at http://www.hackster.io/zolertia

Function Documentation

◆ led_strip_config()

void led_strip_config ( void  )

Init function for the bright LED strip driver.

The LED strip driver allows to lighten up any application using up to 4 LEDs 3VDC-powered per strip The function is set to power OFF the LEDs as default, it should be called from the contiki-main initialization process.

Returns
ignored

Definition at line 62 of file led-strip.c.

References GPIO_SOFTWARE_CONTROL.

◆ led_strip_get()

int led_strip_get ( void  )

Function to get the LED strip current state.

Returns
Current LED strip state or LED_STRIP_ERROR if not previously configured

Definition at line 92 of file led-strip.c.

◆ led_strip_switch()

int led_strip_switch ( uint8_t  val)

Function to turn ON/OFF the LED strip.

Parameters
valSet ON/OFF (LED_STRIP_ON or LED_STRIP_OFF)
Returns
the selected antenna position, or LED_STRIP_ERROR if not previously configured

Definition at line 75 of file led-strip.c.