mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2535 from nvlsianpu/uart_hwfc_config_2
nRF5x uart hardware flow control configuration using mbed configuration systsempull/2550/head
commit
39310b2aa4
|
|
@ -1898,6 +1898,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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -1943,6 +1948,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