test

Dependencies:   mbed Watchdog stm32-sensor-base2

Committer:
ommpy
Date:
Tue Jul 07 15:19:06 2020 +0530
Revision:
2:b7fdc74e5c5d
Child:
4:f6e22dd39313
new board files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ommpy 2:b7fdc74e5c5d 1 #include <mbed.h>
ommpy 2:b7fdc74e5c5d 2 class RS485 : public Serial
ommpy 2:b7fdc74e5c5d 3 {
ommpy 2:b7fdc74e5c5d 4 public:
ommpy 2:b7fdc74e5c5d 5 /** Create a RS485 Serial port using MAX485, connected to the specified transmit and receive pins
ommpy 2:b7fdc74e5c5d 6 *
ommpy 2:b7fdc74e5c5d 7 * @param tx Transmit pin
ommpy 2:b7fdc74e5c5d 8 * @param rx Receive pin
ommpy 2:b7fdc74e5c5d 9 * @param mode Rx TX Mode pin
ommpy 2:b7fdc74e5c5d 10 *
ommpy 2:b7fdc74e5c5d 11 * @note
ommpy 2:b7fdc74e5c5d 12 * Either tx or rx may be specified as NC if unused
ommpy 2:b7fdc74e5c5d 13 */
ommpy 2:b7fdc74e5c5d 14 RS485(PinName tx, PinName rx, PinName mode, const char *name=NULL);
ommpy 2:b7fdc74e5c5d 15
ommpy 2:b7fdc74e5c5d 16 protected:
ommpy 2:b7fdc74e5c5d 17 virtual int _putc(int c);
ommpy 2:b7fdc74e5c5d 18 virtual int _getc();
ommpy 2:b7fdc74e5c5d 19
ommpy 2:b7fdc74e5c5d 20 private:
ommpy 2:b7fdc74e5c5d 21 DigitalOut m_modePin;
ommpy 2:b7fdc74e5c5d 22
ommpy 2:b7fdc74e5c5d 23 };