Loading...
Searching...
No Matches

Interface for the MY9221 LED controller driver. More...

Detailed Description

Interface for the MY9221 LED controller driver.

Author
Sebastian Meiling s@mln.nosp@m.g.ne.nosp@m.t

Definition in file my9221.h.

#include <stdint.h>
#include "periph/gpio.h"
+ Include dependency graph for my9221.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  my9221_params_t
 Parameters needed for device initialization. More...
 
struct  my9221_t
 Device descriptor for MY9221 LED controller. More...
 

Macros

#define MY9221_LED_MAX   (12U)
 Maximum number of distinct LEDs the controller can operate.
 
#define MY9221_LED_ON   (0xFF)
 Max brightness value to turn LED full on.
 
#define MY9221_LED_OFF   (0x00)
 Min brightness value to turn LED off.
 

Functions

int my9221_init (my9221_t *dev, const my9221_params_t *params)
 Initialize the given driver.
 
void my9221_set_state (my9221_t *dev, const uint8_t *state, uint8_t len)
 Set device state.
 
void my9221_set_led (my9221_t *dev, const uint8_t led, const uint8_t alpha)
 Set brightness of distinct LED.
 
void my9221_toggle_led (my9221_t *dev, const uint8_t led)
 Toggle a distinct LED.
 

Direction the controller accesses LEDs

enum  { MY9221_DIR_FWD , MY9221_DIR_REV }
 

Driver specific return codes

enum  { MY9221_OK , MY9221_ERR }