This library contains a simple device driver for the X10 CM17a module. It also contains a simple X10Server, which listens for network commands to be forwarded to the module.
Revision 1:4006f1419bc2, committed 2015-07-07
- Comitter:
- WiredHome
- Date:
- Tue Jul 07 13:58:42 2015 +0000
- Parent:
- 0:12ed8bd4909a
- Commit message:
- Tuned up the baudrate based on a number of trials;
Changed in this revision
X10.cpp | Show annotated file Show diff for this revision Revisions of this file |
X10.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/X10.cpp Sat Jun 28 19:45:20 2014 +0000 +++ b/X10.cpp Tue Jul 07 13:58:42 2015 +0000 @@ -147,7 +147,7 @@ if (cm17a_CmdSend(command_word)) { return ERR_BADARGS; } - wait_us(1000); // Wait 1 sec between commands + wait_ms(50); // Wait between commands } else if (*argv[i] >= '0' && *argv[i] <= '9') { // change bit period uint32_t b = atol(argv[i]); @@ -158,7 +158,7 @@ return ERR_BADARGS; } if (i +1 < argc) { - enqueueData(CMD_DELAY | multiMsgDelay_s); + enqueueData(CMD_DELAY | multiMsgDelay_s); // 0x01:sec as a 16-bit value } } return ERR_SUCCESS;
--- a/X10.h Sat Jun 28 19:45:20 2014 +0000 +++ b/X10.h Tue Jul 07 13:58:42 2015 +0000 @@ -106,7 +106,7 @@ /// range 200 to 10000 have been tested successfully. /// The default value is 2000. /// - X10Interface(PinName RTS, PinName DTR, uint8_t MultiMessageDelay_s = 2, uint32_t BaudRate = 2000); + X10Interface(PinName RTS, PinName DTR, uint8_t MultiMessageDelay_s = 1, uint32_t BaudRate = 10000); /// Parse a command for the X10 Communications. ///