led_strip: support invert output
This commit is contained in:
parent
631cdb2a04
commit
7d48a92734
|
@ -22,6 +22,9 @@ typedef struct led_strip_t *led_strip_handle_t;
|
|||
typedef struct {
|
||||
uint32_t strip_gpio_num; /*!< GPIO number that used by LED strip */
|
||||
uint32_t max_leds; /*!< Maximum LEDs in a single strip */
|
||||
struct {
|
||||
uint32_t invert_out: 1; /*!< Invert output signal */
|
||||
} flags;
|
||||
} led_strip_config_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -90,6 +90,7 @@ esp_err_t led_strip_new_rmt_device(const led_strip_config_t *led_config, const l
|
|||
.resolution_hz = resolution,
|
||||
.trans_queue_depth = 4,
|
||||
.flags.with_dma = rmt_config->flags.with_dma,
|
||||
.flags.invert_out = led_config->flags.invert_out,
|
||||
};
|
||||
ESP_GOTO_ON_ERROR(rmt_new_tx_channel(&rmt_chan_config, &rmt_strip->rmt_chan), err, TAG, "create RMT TX channel failed");
|
||||
|
||||
|
|
Loading…
Reference in New Issue