mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
drivers/xbee: disable CTS/RTS pin unless periph_uart_hw_fc is used
If usinng an arduino xbee shield then CTS pin will be wired to the ICSP connector RESET pin. If also used on an arduino-% board then if xbee is busy sending or receiving data it will assert CTS and this will trigger a reset on the board. To avoid this disable CTS functionality on start up unless hardware flow control is explicitly requested.
This commit is contained in:
parent
e9d2fdb29b
commit
922b35da2d
@ -599,6 +599,14 @@ int xbee_init(netdev_t *dev)
|
||||
_at_cmd(xbee, "ATMM2\r");
|
||||
/* put XBee module in "API mode without escaped characters" */
|
||||
_at_cmd(xbee, "ATAP1\r");
|
||||
/* disable xbee CTS and RTS, unless hardware flow control is used */
|
||||
if(!IS_USED(MODULE_PERIPH_UART_HW_FC)) {
|
||||
DEBUG("[xbee] init: WARNING if using an arduino BOARD + arduino xbee " \
|
||||
"shield with ICSP connector, hardware flow control can't be " \
|
||||
"used since CTS pin is connected to ICSP RESET pin\n");
|
||||
_at_cmd(xbee, "ATD6 0\r");
|
||||
_at_cmd(xbee, "ATD7 0\r");
|
||||
}
|
||||
/* apply AT commands */
|
||||
_at_cmd(xbee, "ATAC\r");
|
||||
/* exit command mode */
|
||||
|
Loading…
Reference in New Issue
Block a user