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.
Dependencies: BufferedSerial SDFileSystem
funktions.h@3:4cec1c6e6dbc, 2019-04-09 (annotated)
- Committer:
- JoergWempe
- Date:
- Tue Apr 09 17:38:47 2019 +0000
- Revision:
- 3:4cec1c6e6dbc
- Parent:
- 2:6bb642c850bc
test 2
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| JoergWempe | 2:6bb642c850bc | 1 | //funktionen |
| JoergWempe | 2:6bb642c850bc | 2 | |
| JoergWempe | 2:6bb642c850bc | 3 | void sendData(string dataForTX) |
| JoergWempe | 2:6bb642c850bc | 4 | { |
| JoergWempe | 2:6bb642c850bc | 5 | uint8_t n = dataForTX.length(); |
| JoergWempe | 2:6bb642c850bc | 6 | uint8_t cs = 0; |
| JoergWempe | 2:6bb642c850bc | 7 | char command[3]= {0x02,0x00,n}; |
| JoergWempe | 2:6bb642c850bc | 8 | for (int p=0; p<3; p++) { |
| JoergWempe | 2:6bb642c850bc | 9 | cs = cs ^ command[p]; |
| JoergWempe | 2:6bb642c850bc | 10 | AMB.printf("%c",command[p]); |
| JoergWempe | 2:6bb642c850bc | 11 | // pc.printf("%c",command[p]); |
| JoergWempe | 2:6bb642c850bc | 12 | } |
| JoergWempe | 2:6bb642c850bc | 13 | for (int p=0; p<n; p++) { |
| JoergWempe | 2:6bb642c850bc | 14 | cs = cs ^ dataForTX[p]; |
| JoergWempe | 2:6bb642c850bc | 15 | AMB.printf("%c",dataForTX[p]); |
| JoergWempe | 2:6bb642c850bc | 16 | // pc.printf("%c",dataForTX[p]); |
| JoergWempe | 2:6bb642c850bc | 17 | } |
| JoergWempe | 2:6bb642c850bc | 18 | AMB.printf("%c",cs); |
| JoergWempe | 2:6bb642c850bc | 19 | //pc.printf("%c",cs); |
| JoergWempe | 2:6bb642c850bc | 20 | } |
| JoergWempe | 2:6bb642c850bc | 21 |