99#ifndef _PBIO_LIGHT_GRID_H_
1010#define _PBIO_LIGHT_GRID_H_
1111
12+ #include <stdint.h>
13+
1214#include <pbio/config.h>
1315#include <pbio/error.h>
1416
@@ -17,16 +19,37 @@ typedef struct _pbio_light_grid_t pbio_light_grid_t;
1719
1820#if PBIO_CONFIG_LIGHT_GRID
1921
20- extern const uint8_t pbio_light_grid_sys_pattern [1000 ];
21-
22- pbio_error_t pbio_light_grid_get_dev (pbio_light_grid_t * * light_grid );
2322uint8_t pbio_light_grid_get_size (pbio_light_grid_t * light_grid );
2423pbio_error_t pbio_light_grid_set_rows (pbio_light_grid_t * light_grid , const uint8_t * rows );
2524pbio_error_t pbio_light_grid_set_pixel (pbio_light_grid_t * light_grid , uint8_t row , uint8_t col , uint8_t brightness );
2625pbio_error_t pbio_light_grid_set_image (pbio_light_grid_t * light_grid , const uint8_t * image );
2726void pbio_light_grid_start_animation (pbio_light_grid_t * light_grid , const uint8_t * cells , uint8_t num_cells , uint16_t interval );
2827void pbio_light_grid_stop_animation (pbio_light_grid_t * light_grid );
2928
29+ #else // PBIO_CONFIG_LIGHT_GRID
30+
31+ static inline uint8_t pbio_light_grid_get_size (pbio_light_grid_t * light_grid ) {
32+ return 0 ;
33+ }
34+
35+ static inline pbio_error_t pbio_light_grid_set_rows (pbio_light_grid_t * light_grid , const uint8_t * rows ) {
36+ return PBIO_ERROR_NOT_SUPPORTED ;
37+ }
38+
39+ static inline pbio_error_t pbio_light_grid_set_pixel (pbio_light_grid_t * light_grid , uint8_t row , uint8_t col , uint8_t brightness ) {
40+ return PBIO_ERROR_NOT_SUPPORTED ;
41+ }
42+
43+ static inline pbio_error_t pbio_light_grid_set_image (pbio_light_grid_t * light_grid , const uint8_t * image ) {
44+ return PBIO_ERROR_NOT_SUPPORTED ;
45+ }
46+
47+ static inline void pbio_light_grid_start_animation (pbio_light_grid_t * light_grid , const uint8_t * cells , uint8_t num_cells , uint16_t interval ) {
48+ }
49+
50+ static inline void pbio_light_grid_stop_animation (pbio_light_grid_t * light_grid ) {
51+ }
52+
3053#endif // PBIO_CONFIG_LIGHT_GRID
3154
3255#endif // _PBIO_LIGHT_GRID_H_
0 commit comments