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 1891
1891
"lf_clock_src" : {
1892
1892
"value" : " NRF_LF_SRC_XTAL" ,
1893
1893
"macro_name" : " MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
1894
+ },
1895
+ "uart_hwfc" : {
1896
+ "help" : " Value: 1 for enable, 0 for disable" ,
1897
+ "value" : 1 ,
1898
+ "macro_name" : " MBED_CONF_NORDIC_UART_HWFC"
1894
1899
}
1895
1900
}
1896
1901
},
1936
1941
"lf_clock_src" : {
1937
1942
"value" : " NRF_LF_SRC_XTAL" ,
1938
1943
"macro_name" : " MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
1944
+ },
1945
+ "uart_hwfc" : {
1946
+ "help" : " Value: 1 for enable, 0 for disable" ,
1947
+ "value" : 1 ,
1948
+ "macro_name" : " MBED_CONF_NORDIC_UART_HWFC"
1939
1949
}
1940
1950
}
1941
1951
},
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