grove_ledbar.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 HAW Hamburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
24 #ifndef GROVE_LEDBAR_H
25 #define GROVE_LEDBAR_H
26 
27 #include <stdint.h>
28 
29 #include "my9221.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
39 #define GROVE_LEDBAR_R2G MY9221_DIR_FWD
40 #define GROVE_LEDBAR_G2R MY9221_DIR_REV
41 
46 #define GROVE_LEDBAR_MAX UINT8_MAX
47 
52 
57 
69 
78 void grove_ledbar_set(grove_ledbar_t *dev, uint8_t level);
79 
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* GROVE_LEDBAR_H */
94 
grove_ledbar_init
int grove_ledbar_init(grove_ledbar_t *dev, const grove_ledbar_params_t *params)
Initialize the given driver.
grove_ledbar_set
void grove_ledbar_set(grove_ledbar_t *dev, uint8_t level)
Set overall (brightness) level distributed over all LEDs.
grove_ledbar_params_t
my9221_params_t grove_ledbar_params_t
Parameters needed for device initialization.
Definition: grove_ledbar.h:51
grove_ledbar_t
my9221_t grove_ledbar_t
Device descriptor for grove ledbar, alias for MY9221 LED controller.
Definition: grove_ledbar.h:56
grove_ledbar_clear
void grove_ledbar_clear(grove_ledbar_t *dev)
Clear ledbar, i.e.
my9221_t
Device descriptor for MY9221 LED controller.
Definition: my9221.h:80
my9221.h
Interface for the MY9221 LED controller driver.
my9221_params_t
Parameters needed for device initialization.
Definition: my9221.h:70