Skip to content

Commit 06268a4

Browse files
committed
fix(rmt): enable internal pull-up resistor for onewire bus
1 parent 4684d3d commit 06268a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/peripherals/rmt/onewire/main/onewire_example_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ void app_main(void)
2121
onewire_bus_handle_t bus;
2222
onewire_bus_config_t bus_config = {
2323
.bus_gpio_num = EXAMPLE_ONEWIRE_BUS_GPIO,
24+
.flags = {
25+
.en_pull_up = true, // enable the internal pull-up resistor in case the external device didn't have one
26+
}
2427
};
2528
onewire_bus_rmt_config_t rmt_config = {
2629
.max_rx_bytes = 10, // 1byte ROM command + 8byte ROM number + 1byte device command

0 commit comments

Comments
 (0)