Skip to content

Commit

Permalink
Merge pull request #13224 from fjmolinas/pr_xbee_cts_reset
Browse files Browse the repository at this point in the history
drivers/xbee: disable CTS/RTS pin unless periph_uart_hw_fc is used
  • Loading branch information
leandrolanzieri authored Apr 24, 2020
2 parents 268152b + 922b35d commit e7a1b40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/xbee/xbee.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e7a1b40

Please sign in to comment.