mirror of https://github.com/ARMmbed/mbed-os.git
Introduce uart hardware flow control configuration using mbed configuraton system for nrf5x base-targets
parent
2457bb1f9e
commit
36c9092fbf
|
@ -1902,6 +1902,11 @@
|
||||||
"lf_clock_src": {
|
"lf_clock_src": {
|
||||||
"value": "NRF_LF_SRC_XTAL",
|
"value": "NRF_LF_SRC_XTAL",
|
||||||
"macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
|
"macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
|
||||||
|
},
|
||||||
|
"uart_hwfc": {
|
||||||
|
"help": "Value: 1 for enable, 0 for disable",
|
||||||
|
"value": 1,
|
||||||
|
"macro_name": "MBED_CONF_NORDIC_UART_HWFC"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1947,6 +1952,11 @@
|
||||||
"lf_clock_src": {
|
"lf_clock_src": {
|
||||||
"value": "NRF_LF_SRC_XTAL",
|
"value": "NRF_LF_SRC_XTAL",
|
||||||
"macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
|
"macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
|
||||||
|
},
|
||||||
|
"uart_hwfc": {
|
||||||
|
"help": "Value: 1 for enable, 0 for disable",
|
||||||
|
"value": 1,
|
||||||
|
"macro_name": "MBED_CONF_NORDIC_UART_HWFC"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -58,7 +58,19 @@
|
||||||
|
|
||||||
#define UART_DEFAULT_BAUDRATE UART0_CONFIG_BAUDRATE
|
#define UART_DEFAULT_BAUDRATE UART0_CONFIG_BAUDRATE
|
||||||
#define UART_DEFAULT_PARITY UART0_CONFIG_PARITY
|
#define UART_DEFAULT_PARITY UART0_CONFIG_PARITY
|
||||||
#define UART_DEFAULT_HWFC UART0_CONFIG_HWFC
|
|
||||||
|
// expected the macro from mbed configuration system
|
||||||
|
#ifndef MBED_CONF_NORDIC_UART_HWFC
|
||||||
|
#define MBED_CONF_NORDIC_UART_HWFC 1
|
||||||
|
#warning None of UART flow control configuration (expected macro MBED_CONF_NORDIC_UART_HWFC). The RTSCTS flow control is used by default .
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if MBED_CONF_NORDIC_UART_HWFC == 1
|
||||||
|
#define UART_DEFAULT_HWFC UART0_CONFIG_HWFC
|
||||||
|
#else
|
||||||
|
#define UART_DEFAULT_HWFC NRF_UART_HWFC_DISABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
#define UART_DEFAULT_CTS UART0_CONFIG_PSEL_CTS
|
#define UART_DEFAULT_CTS UART0_CONFIG_PSEL_CTS
|
||||||
#define UART_DEFAULT_RTS UART0_CONFIG_PSEL_RTS
|
#define UART_DEFAULT_RTS UART0_CONFIG_PSEL_RTS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue