mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
fix(rmt): enable internal pull-up resistor for onewire bus
This commit is contained in:
@ -21,6 +21,9 @@ void app_main(void)
|
|||||||
onewire_bus_handle_t bus;
|
onewire_bus_handle_t bus;
|
||||||
onewire_bus_config_t bus_config = {
|
onewire_bus_config_t bus_config = {
|
||||||
.bus_gpio_num = EXAMPLE_ONEWIRE_BUS_GPIO,
|
.bus_gpio_num = EXAMPLE_ONEWIRE_BUS_GPIO,
|
||||||
|
.flags = {
|
||||||
|
.en_pull_up = true, // enable the internal pull-up resistor in case the external device didn't have one
|
||||||
|
}
|
||||||
};
|
};
|
||||||
onewire_bus_rmt_config_t rmt_config = {
|
onewire_bus_rmt_config_t rmt_config = {
|
||||||
.max_rx_bytes = 10, // 1byte ROM command + 8byte ROM number + 1byte device command
|
.max_rx_bytes = 10, // 1byte ROM command + 8byte ROM number + 1byte device command
|
||||||
|
Reference in New Issue
Block a user