File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
targets/hal/TARGET_NORDIC/TARGET_NRF5 Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1898
1898
"lf_clock_src" : {
1899
1899
"value" : " NRF_LF_SRC_XTAL" ,
1900
1900
"macro_name" : " MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
1901
+ },
1902
+ "uart_hwfc" : {
1903
+ "help" : " Value: 1 for enable, 0 for disable" ,
1904
+ "value" : 1 ,
1905
+ "macro_name" : " MBED_CONF_NORDIC_UART_HWFC"
1901
1906
}
1902
1907
}
1903
1908
},
1943
1948
"lf_clock_src" : {
1944
1949
"value" : " NRF_LF_SRC_XTAL" ,
1945
1950
"macro_name" : " MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
1951
+ },
1952
+ "uart_hwfc" : {
1953
+ "help" : " Value: 1 for enable, 0 for disable" ,
1954
+ "value" : 1 ,
1955
+ "macro_name" : " MBED_CONF_NORDIC_UART_HWFC"
1946
1956
}
1947
1957
}
1948
1958
},
Original file line number Diff line number Diff line change 58
58
59
59
#define UART_DEFAULT_BAUDRATE UART0_CONFIG_BAUDRATE
60
60
#define UART_DEFAULT_PARITY UART0_CONFIG_PARITY
61
- #define UART_DEFAULT_HWFC UART0_CONFIG_HWFC
61
+
62
+ // expected the macro from mbed configuration system
63
+ #ifndef MBED_CONF_NORDIC_UART_HWFC
64
+ #define MBED_CONF_NORDIC_UART_HWFC 1
65
+ #warning None of UART flow control configuration (expected macro MBED_CONF_NORDIC_UART_HWFC). The RTSCTS flow control is used by default .
66
+ #endif
67
+
68
+ #if MBED_CONF_NORDIC_UART_HWFC == 1
69
+ #define UART_DEFAULT_HWFC UART0_CONFIG_HWFC
70
+ #else
71
+ #define UART_DEFAULT_HWFC NRF_UART_HWFC_DISABLED
72
+ #endif
73
+
62
74
#define UART_DEFAULT_CTS UART0_CONFIG_PSEL_CTS
63
75
#define UART_DEFAULT_RTS UART0_CONFIG_PSEL_RTS
64
76
You can’t perform that action at this time.
0 commit comments