File tree Expand file tree Collapse file tree 2 files changed +30
-6
lines changed
examples/bluetooth/ble_adv/bthome/bulb/main Expand file tree Collapse file tree 2 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 1+ menu "BTHome Bulb Configuration"
2+
3+ config EXAMPLE_LED_STRIP_BLINK_GPIO
4+ int "LED Strip GPIO Pin"
5+ range 0 48
6+ default 8
7+ help
8+ GPIO number for LED strip data line.
9+
10+ config EXAMPLE_LED_STRIP_LED_NUMBERS
11+ int "Number of LEDs in Strip"
12+ range 1 255
13+ default 1
14+ help
15+ Number of LEDs in the LED strip.
16+
17+ config EXAMPLE_LED_STRIP_RMT_RES_HZ
18+ int "RMT Resolution Frequency (Hz)"
19+ range 1000000 10000000
20+ default 10000000
21+ help
22+ RMT counter clock frequency. 10MHz resolution means 1 tick = 0.1us.
23+
24+ endmenu
Original file line number Diff line number Diff line change 1616#include "led_strip.h"
1717#include "nvs_flash.h"
1818
19- // GPIO assignment
20- #define LED_STRIP_BLINK_GPIO 8
21- // Numbers of the LED in the strip
22- #define LED_STRIP_LED_NUMBERS 1
23- // 10MHz resolution, 1 tick = 0.1us (led strip needs a high resolution)
24- #define LED_STRIP_RMT_RES_HZ (10 * 1000 * 1000)
19+ // GPIO assignment from kconfig
20+ #define LED_STRIP_BLINK_GPIO CONFIG_EXAMPLE_LED_STRIP_BLINK_GPIO
21+ // Numbers of the LED in the strip from kconfig
22+ #define LED_STRIP_LED_NUMBERS CONFIG_EXAMPLE_LED_STRIP_LED_NUMBERS
23+ // RMT resolution from kconfig (led strip needs a high resolution)
24+ #define LED_STRIP_RMT_RES_HZ CONFIG_EXAMPLE_LED_STRIP_RMT_RES_HZ
2525
2626static const char * TAG = "bt_home_bulb" ;
2727
You can’t perform that action at this time.
0 commit comments