boards/cc26xx_cc13xx: use generic hw fc module
This commit is contained in:
parent
8e2227b18b
commit
48231efb20
@ -85,9 +85,10 @@ static const uart_conf_t uart_config[] = {
|
|||||||
.regs = UART0,
|
.regs = UART0,
|
||||||
.tx_pin = 3,
|
.tx_pin = 3,
|
||||||
.rx_pin = 2,
|
.rx_pin = 2,
|
||||||
.rts_pin = 18, /* ignored when flow_control is 0 */
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||||
.cts_pin = 19, /* ignored when flow_control is 0 */
|
.rts_pin = 18,
|
||||||
.flow_control = 0,
|
.cts_pin = 19,
|
||||||
|
#endif
|
||||||
.intn = UART0_IRQN
|
.intn = UART0_IRQN
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -71,23 +71,30 @@ static const timer_conf_t timer_config[] = {
|
|||||||
* The TI CC1352 LaunchPad board only has access to a single UART device through
|
* 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.
|
* 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
|
* Optionally we can enable hardware flow control, by using periph_uart_hw_fc
|
||||||
* to 1 and defining pins for cts_pin and rts_pin.
|
* module (USEMODULE += periph_uart_hw_fc) and defining pins for cts_pin and
|
||||||
*
|
* rts_pin.
|
||||||
* Add a second UART configuration if using external pins.
|
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @name UART configuration
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Add a second UART configuration if using external pins.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
static const uart_conf_t uart_config[] = {
|
static const uart_conf_t uart_config[] = {
|
||||||
{
|
{
|
||||||
.regs = UART0,
|
.regs = UART0,
|
||||||
.tx_pin = 13,
|
.tx_pin = 13,
|
||||||
.rx_pin = 12,
|
.rx_pin = 12,
|
||||||
.rts_pin = 0, /* ignored when flow_control is 0 */
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||||
.cts_pin = 0, /* ignored when flow_control is 0 */
|
.rts_pin = GPIO_UNDEF,
|
||||||
.flow_control = 0,
|
.cts_pin = GPIO_UNDEF,
|
||||||
.intn = UART0_IRQN
|
#endif
|
||||||
}
|
.intn = UART0_IRQN
|
||||||
|
}
|
||||||
};
|
};
|
||||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@ -71,21 +71,23 @@ static const timer_conf_t timer_config[] = {
|
|||||||
* The used CC26x0 CPU only supports a single UART device, so all we need to
|
* The used CC26x0 CPU only supports a single UART device, so all we need to
|
||||||
* configure are the RX and TX pins.
|
* configure are the RX and TX pins.
|
||||||
*
|
*
|
||||||
* Optionally we can enable hardware flow control, by setting flow_control
|
* Optionally we can enable hardware flow control, by using periph_uart_hw_fc
|
||||||
* to 1 and defining pins for cts_pin and rts_pin.
|
* module (USEMODULE += periph_uart_hw_fc) and defining pins for cts_pin and
|
||||||
|
* rts_pin.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const uart_conf_t uart_config[] = {
|
static const uart_conf_t uart_config[] = {
|
||||||
{
|
{
|
||||||
.regs = UART0,
|
.regs = UART0,
|
||||||
.tx_pin = 3,
|
.tx_pin = 3,
|
||||||
.rx_pin = 2,
|
.rx_pin = 2,
|
||||||
.rts_pin = 0, /* ignored when flow_control is 0 */
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||||
.cts_pin = 0, /* ignored when flow_control is 0 */
|
.rts_pin = GPIO_UNDEF,
|
||||||
.flow_control = 0,
|
.cts_pin = GPIO_UNDEF,
|
||||||
.intn = UART0_IRQN
|
#endif
|
||||||
}
|
.intn = UART0_IRQN
|
||||||
|
}
|
||||||
};
|
};
|
||||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@ -75,15 +75,16 @@ static const timer_conf_t timer_config[] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static const uart_conf_t uart_config[] = {
|
static const uart_conf_t uart_config[] = {
|
||||||
{
|
{
|
||||||
.regs = UART0,
|
.regs = UART0,
|
||||||
.tx_pin = 29,
|
.tx_pin = 29,
|
||||||
.rx_pin = 28,
|
.rx_pin = 28,
|
||||||
.rts_pin = 0, /* ignored when flow_control is 0 */
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||||
.cts_pin = 0, /* ignored when flow_control is 0 */
|
.rts_pin = GPIO_UNDEF,
|
||||||
.flow_control = 0,
|
.cts_pin = GPIO_UNDEF,
|
||||||
.intn = UART0_IRQN
|
#endif
|
||||||
}
|
.intn = UART0_IRQN
|
||||||
|
}
|
||||||
};
|
};
|
||||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user