Allows RS485 communication using MAX485 chip
Dependents: Multiple_7SegDisplays
Fork of RS485 by
RS485.h@2:302837c859de, 2018-08-21 (annotated)
- Committer:
- shivanandgowdakr
- Date:
- Tue Aug 21 10:21:52 2018 +0000
- Revision:
- 2:302837c859de
- Parent:
- 0:10a8f9128f73
No changes;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
NeoBelerophon | 0:10a8f9128f73 | 1 | #include <mbed.h> |
NeoBelerophon | 0:10a8f9128f73 | 2 | class RS485 : public Serial |
NeoBelerophon | 0:10a8f9128f73 | 3 | { |
NeoBelerophon | 0:10a8f9128f73 | 4 | public: |
shivanandgowdakr | 2:302837c859de | 5 | |
shivanandgowdakr | 2:302837c859de | 6 | RS485(PinName tx, PinName rx, PinName mode, const char *name=NULL); |
NeoBelerophon | 0:10a8f9128f73 | 7 | |
NeoBelerophon | 0:10a8f9128f73 | 8 | protected: |
NeoBelerophon | 0:10a8f9128f73 | 9 | virtual int _putc(int c); |
NeoBelerophon | 0:10a8f9128f73 | 10 | virtual int _getc(); |
NeoBelerophon | 0:10a8f9128f73 | 11 | |
NeoBelerophon | 0:10a8f9128f73 | 12 | private: |
NeoBelerophon | 0:10a8f9128f73 | 13 | DigitalOut m_modePin; |
NeoBelerophon | 0:10a8f9128f73 | 14 | |
NeoBelerophon | 0:10a8f9128f73 | 15 | }; |