Minimale Veränderungen in Btbee; Die Datenübertragung funktioniert nicht hunderprozentig, v.a. wenn mehrere Bytes übertragen werden.
Fork of btbee by
btbee.h@3:ddeb620fb25e, 2014-02-05 (annotated)
- Committer:
- ngoldin
- Date:
- Wed Feb 05 10:32:04 2014 +0000
- Revision:
- 3:ddeb620fb25e
- Parent:
- 2:12c38a710982
- Child:
- 5:2e759cc06191
added readline. it is not debugged yet
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ngoldin | 0:e7cb710c8900 | 1 | #include "mbed.h" |
ngoldin | 0:e7cb710c8900 | 2 | #include "platform.h" |
ngoldin | 0:e7cb710c8900 | 3 | |
ngoldin | 2:12c38a710982 | 4 | #define FACTORY_BAUD 9600 |
ngoldin | 2:12c38a710982 | 5 | #define DEFAULT_BAUD 115200 |
ngoldin | 2:12c38a710982 | 6 | #define AT_BAUD 38400 |
ngoldin | 2:12c38a710982 | 7 | |
ngoldin | 0:e7cb710c8900 | 8 | class btbee: public Serial{ |
ngoldin | 0:e7cb710c8900 | 9 | public: |
ngoldin | 0:e7cb710c8900 | 10 | btbee(PinName respin, PinName tx, PinName rx); |
ngoldin | 0:e7cb710c8900 | 11 | btbee(void); |
ngoldin | 0:e7cb710c8900 | 12 | void reset(void); |
ngoldin | 2:12c38a710982 | 13 | void at_baud(void); |
ngoldin | 2:12c38a710982 | 14 | void factory_baud(void); |
ngoldin | 2:12c38a710982 | 15 | void default_baud(void); |
ngoldin | 1:56f437e4d9e0 | 16 | int read_all(char*,const int, int*); |
ngoldin | 3:ddeb620fb25e | 17 | int read_line(char*,const int, int*); |
ngoldin | 0:e7cb710c8900 | 18 | |
ngoldin | 0:e7cb710c8900 | 19 | protected: |
ngoldin | 0:e7cb710c8900 | 20 | DigitalOut reset_out; |
ngoldin | 0:e7cb710c8900 | 21 | }; |