provide global configulator handle for main config
This commit is contained in:
parent
c57f25af03
commit
52d3d70206
2 changed files with 10 additions and 1 deletions
|
|
@ -1,9 +1,13 @@
|
|||
#ifndef __BARBACK_H__
|
||||
#define __BARBACK_H__
|
||||
|
||||
#include "configulator.h"
|
||||
|
||||
typedef uint8_t (*barback_ble_access_read_t)(uint8_t idx);
|
||||
typedef uint8_t (*barback_ble_access_write_t)(uint8_t idx, uint8_t value);
|
||||
|
||||
extern cfglr_handle_t *configulator;
|
||||
|
||||
typedef struct {
|
||||
uint16_t base_uuid;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ uint8_t mac[6];
|
|||
nvs_handle_t config_handle = {};
|
||||
led_strip_handle_t led_strip;
|
||||
|
||||
cfglr_handle_t *configulator;
|
||||
|
||||
void led_init() {
|
||||
led_strip_config_t strip_config = {
|
||||
.strip_gpio_num = LED_GPIO, // The GPIO that connected to the LED strip's data line
|
||||
|
|
@ -97,7 +99,10 @@ void app_main(void) {
|
|||
},
|
||||
};
|
||||
|
||||
uint8_t ret = cfglr_init(&cfglr_handle);
|
||||
// setup configulator global handler
|
||||
configulator = &cfglr_handle;
|
||||
|
||||
uint8_t ret = cfglr_init(configulator);
|
||||
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue