Buffered Serial Port Driver for RTOS
Dependents: nucleo_cannonball PiballNeoController
Buffered Serial Port Driver for RTOS
- ISR driven, ring buffered IO operation
- IO operations are idle waiting, don't waste time in RTOS :D
- Can use external buffers
- Based on mbed RawSerial
Example
SerialDriver Example
#include "SerialDriver.h" SerialDriver pc(USBTX, USBRX); int main() { // setup serial port pc.baud(9600); // print some text pc.puts("This is just a string.\r\n"); pc.printf("But this is a %s with integer %i and float %f.\r\n", "formatted text", 123, 0.456f); // now lets behave like a null modem while(1) pc.putc(pc.getc()); }
Look at the API Documentation for more Examples.
Dependencies
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Import librarymbed-rtos
Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.
If you find a bug, please help me to fix it. Send me a message. You can help me a lot: Write a demo program that causes the bug reproducible.
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
8:903a4162a0d1 | 2015-10-29 | BlazeX | Beta Update: Could SerialDriver inherit RawSerial rather than SerialBase? Maybe, let's try! |
7:ce54b429086f | 2015-10-27 | BlazeX | A sneaky bug was removed. Thanks to Remi Beges for the hint. |
6:bf5fb8677212 | 2015-10-25 | BlazeX | Fixed TX IRQ problem on KL25Z and KL46Z. |
5:cb9007ef1a30 | 2015-10-23 | BlazeX | BETA update |
4:a41e47716932 | 2015-10-23 | BlazeX | BETA update. |
3:ea9719695b6a | 2015-01-26 | BlazeX | Added dropped bytes counters, they indicate too small buffers. |
2:012c0c2fac52 | 2015-01-15 | BlazeX | Removed dependencies from the library. |
1:1464146bd7fb | 2015-01-15 | BlazeX | Fixed Dependencies. |
0:cd0d79be0c1a | 2015-01-14 | BlazeX | Release :) |