boards/cc26xx_cc13xx: use generic hw fc module

This commit is contained in:
Dylan Laduranty 2020-03-10 14:19:53 +01:00
parent 8e2227b18b
commit 48231efb20
4 changed files with 47 additions and 36 deletions

View File

@ -85,9 +85,10 @@ static const uart_conf_t uart_config[] = {
.regs = UART0,
.tx_pin = 3,
.rx_pin = 2,
.rts_pin = 18, /* ignored when flow_control is 0 */
.cts_pin = 19, /* ignored when flow_control is 0 */
.flow_control = 0,
#ifdef MODULE_PERIPH_UART_HW_FC
.rts_pin = 18,
.cts_pin = 19,
#endif
.intn = UART0_IRQN
}
};

View File

@ -71,8 +71,14 @@ static const timer_conf_t timer_config[] = {
* The TI CC1352 LaunchPad board only has access to a single UART device through
* the debugger, so all we need to configure are the RX and TX pins.
*
* Optionally we can enable hardware flow control, by setting UART_HW_FLOW_CTRL
* to 1 and defining pins for cts_pin and rts_pin.
* Optionally we can enable hardware flow control, by using periph_uart_hw_fc
* module (USEMODULE += periph_uart_hw_fc) and defining pins for cts_pin and
* rts_pin.
* @{
*/
/**
* @name UART configuration
*
*
* Add a second UART configuration if using external pins.
* @{
@ -83,9 +89,10 @@ static const uart_conf_t uart_config[] = {
.regs = UART0,
.tx_pin = 13,
.rx_pin = 12,
.rts_pin = 0, /* ignored when flow_control is 0 */
.cts_pin = 0, /* ignored when flow_control is 0 */
.flow_control = 0,
#ifdef MODULE_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.intn = UART0_IRQN
}
};

View File

@ -71,8 +71,9 @@ static const timer_conf_t timer_config[] = {
* The used CC26x0 CPU only supports a single UART device, so all we need to
* configure are the RX and TX pins.
*
* Optionally we can enable hardware flow control, by setting flow_control
* to 1 and defining pins for cts_pin and rts_pin.
* Optionally we can enable hardware flow control, by using periph_uart_hw_fc
* module (USEMODULE += periph_uart_hw_fc) and defining pins for cts_pin and
* rts_pin.
* @{
*/
@ -81,9 +82,10 @@ static const uart_conf_t uart_config[] = {
.regs = UART0,
.tx_pin = 3,
.rx_pin = 2,
.rts_pin = 0, /* ignored when flow_control is 0 */
.cts_pin = 0, /* ignored when flow_control is 0 */
.flow_control = 0,
#ifdef MODULE_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.intn = UART0_IRQN
}
};

View File

@ -79,9 +79,10 @@ static const uart_conf_t uart_config[] = {
.regs = UART0,
.tx_pin = 29,
.rx_pin = 28,
.rts_pin = 0, /* ignored when flow_control is 0 */
.cts_pin = 0, /* ignored when flow_control is 0 */
.flow_control = 0,
#ifdef MODULE_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.intn = UART0_IRQN
}
};