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 
9 #pragma once
10 
26 #include <stdint.h>
27 
28 #include "my9221.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 #define GROVE_LEDBAR_R2G MY9221_DIR_FWD
39 #define GROVE_LEDBAR_G2R MY9221_DIR_REV
45 #define GROVE_LEDBAR_MAX UINT8_MAX
46 
51 
56 
68 
77 void grove_ledbar_set(grove_ledbar_t *dev, uint8_t level);
78 
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
void grove_ledbar_set(grove_ledbar_t *dev, uint8_t level)
Set overall (brightness) level distributed over all LEDs.
void grove_ledbar_clear(grove_ledbar_t *dev)
Clear ledbar, i.e.
my9221_t grove_ledbar_t
Device descriptor for grove ledbar, alias for MY9221 LED controller.
Definition: grove_ledbar.h:55
int grove_ledbar_init(grove_ledbar_t *dev, const grove_ledbar_params_t *params)
Initialize the given driver.
my9221_params_t grove_ledbar_params_t
Parameters needed for device initialization.
Definition: grove_ledbar.h:50
Interface for the MY9221 LED controller driver.
Parameters needed for device initialization.
Definition: my9221.h:69
Device descriptor for MY9221 LED controller.
Definition: my9221.h:79