Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of jro by
Diff: JroSerial.h
- Revision:
- 3:f0e6c145b075
- Parent:
- 2:3d8d52e9751c
- Child:
- 4:de495ce256b8
--- a/JroSerial.h Thu Feb 05 19:01:42 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#include "mbed.h"
-#include "rtos.h"
-#include "SerialDriver.h"
-
-class JroSerial: public SerialDriver
-{
-
- private:
-
- SerialDriver *screen;
- char* rx_buffer;
-
- //Semaphore rx_sem;
- //Semaphore tx_sem;
- protected:
- inline void disableTxInterrupt() { serial_irq_set(&_serial, (SerialIrq)TxIrq, 0); }
- inline void enableTxInterrupt() { serial_irq_set(&_serial, (SerialIrq)TxIrq, 1); }
-
- inline void disableRxInterrupt() { serial_irq_set(&_serial, (SerialIrq)RxIrq, 0); }
- inline void enableRxInterrupt() { serial_irq_set(&_serial, (SerialIrq)RxIrq, 1); }
-
- public:
-
- IRQn device_irqn;
-
- JroSerial(PinName tx, PinName rx, SerialDriver *screen);
- int Init(int baudrate);
- int ReadData(char* rx_buffer);
- void Rx_interrupt();
-};
