![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Allows RS485 communication using MAX485 chip
Diff: RS485.cpp
- Revision:
- 0:10a8f9128f73
- Child:
- 1:916e1dd538ce
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RS485.cpp Fri Nov 13 11:08:15 2015 +0000 @@ -0,0 +1,17 @@ +#include "RS485.h" + +RS485::RS485(PinName tx, PinName rx, PinName mode, const char *name) : Serial( tx, rx, name), m_modePin(mode) +{ +} + +int RS485::_getc() { + return _base_getc(); +} + +int RS485::_putc(int c) { + m_modePin = 1; + int ret = _base_putc(c); + m_modePin = 0; + return ret; +} +