You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: targets/ESP32/_nanoCLR/nanoFramework.Device.OneWire/nf_dev_onewire_nanoFramework_Device_OneWire_OneWireHost.cpp
+10-11
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ static uint8_t SerialNum[8];
19
19
// Driver state.
20
20
static oneWireState DriverState = ONEWIRE_UNINIT;
21
21
22
-
voidIRAM_ATTR oneWireStop()
22
+
voidoneWireStop()
23
23
{
24
24
// stop UART
25
25
uart_driver_delete(NF_ONEWIRE_ESP32_UART_NUM);
@@ -28,19 +28,18 @@ void IRAM_ATTR oneWireStop()
28
28
DriverState = ONEWIRE_STOP;
29
29
}
30
30
31
-
HRESULT IRAM_ATTR oneWireInit()
31
+
HRESULT oneWireInit()
32
32
{
33
33
DriverState = ONEWIRE_STOP;
34
34
35
-
uart_config_t uart_config = {
36
-
.baud_rate = 115200,
37
-
.data_bits = UART_DATA_8_BITS,
38
-
.parity = UART_PARITY_DISABLE,
39
-
.stop_bits = UART_STOP_BITS_1,
40
-
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
41
-
.rx_flow_ctrl_thresh = 0,
42
-
.source_clk = UART_SCLK_DEFAULT
43
-
};
35
+
uart_config_t uart_config;
36
+
uart_config.baud_rate = 115200;
37
+
uart_config.data_bits = UART_DATA_8_BITS;
38
+
uart_config.parity = UART_PARITY_DISABLE;
39
+
uart_config.stop_bits = UART_STOP_BITS_1;
40
+
uart_config.flow_ctrl = UART_HW_FLOWCTRL_DISABLE;
41
+
uart_config.rx_flow_ctrl_thresh = 0;
42
+
uart_config.source_clk = UART_SCLK_DEFAULT;
44
43
45
44
// get GPIO pins configured for UART assigned to 1-Wire
46
45
// need to subtract one to get the correct index of UART in mapped device pins
0 commit comments