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 IEEE_14_Freescale by
droidBT.h@16:6d900f687c18, 2014-03-11 (annotated)
- Committer:
- soonerbot
- Date:
- Tue Mar 11 20:02:56 2014 +0000
- Revision:
- 16:6d900f687c18
Copied bluetooth files from last year
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| soonerbot | 16:6d900f687c18 | 1 | /* |
| soonerbot | 16:6d900f687c18 | 2 | * File: droidBT.h |
| soonerbot | 16:6d900f687c18 | 3 | * Author: Shawn Swatek |
| soonerbot | 16:6d900f687c18 | 4 | * Originated: Spring 2013 |
| soonerbot | 16:6d900f687c18 | 5 | * Revised: 3/29/13 |
| soonerbot | 16:6d900f687c18 | 6 | */ |
| soonerbot | 16:6d900f687c18 | 7 | |
| soonerbot | 16:6d900f687c18 | 8 | #ifndef __DROIDBT__ |
| soonerbot | 16:6d900f687c18 | 9 | #define __DROIDBT__ |
| soonerbot | 16:6d900f687c18 | 10 | |
| soonerbot | 16:6d900f687c18 | 11 | #include "mbed.h" |
| soonerbot | 16:6d900f687c18 | 12 | |
| soonerbot | 16:6d900f687c18 | 13 | #define BTBUFSIZE 1000 |
| soonerbot | 16:6d900f687c18 | 14 | #define DCHUNKSIZE 100 |
| soonerbot | 16:6d900f687c18 | 15 | |
| soonerbot | 16:6d900f687c18 | 16 | class droidBT{ |
| soonerbot | 16:6d900f687c18 | 17 | private: |
| soonerbot | 16:6d900f687c18 | 18 | volatile int BTBuffer[BTBUFSIZE]; |
| soonerbot | 16:6d900f687c18 | 19 | volatile int BTStart; |
| soonerbot | 16:6d900f687c18 | 20 | volatile int BTEnd; |
| soonerbot | 16:6d900f687c18 | 21 | volatile int DataChunk[DCHUNKSIZE][17]; |
| soonerbot | 16:6d900f687c18 | 22 | volatile int DCStart; |
| soonerbot | 16:6d900f687c18 | 23 | volatile int DCEnd; |
| soonerbot | 16:6d900f687c18 | 24 | Serial droid; |
| soonerbot | 16:6d900f687c18 | 25 | void BTEnqueue(); |
| soonerbot | 16:6d900f687c18 | 26 | public: |
| soonerbot | 16:6d900f687c18 | 27 | int clearData(); |
| soonerbot | 16:6d900f687c18 | 28 | int getData(int cmd, int* dest); |
| soonerbot | 16:6d900f687c18 | 29 | int sendCmd(int cmd, int* info, int len); |
| soonerbot | 16:6d900f687c18 | 30 | int procBuf(int cmd); |
| soonerbot | 16:6d900f687c18 | 31 | droidBT(PinName tx, PinName rx); |
| soonerbot | 16:6d900f687c18 | 32 | int bufSize(); |
| soonerbot | 16:6d900f687c18 | 33 | int setState(char state); |
| soonerbot | 16:6d900f687c18 | 34 | int getAck(int hashetc); |
| soonerbot | 16:6d900f687c18 | 35 | |
| soonerbot | 16:6d900f687c18 | 36 | }; |
| soonerbot | 16:6d900f687c18 | 37 | |
| soonerbot | 16:6d900f687c18 | 38 | #endif |
