Fabio Fumi
/
send_to_sharp
Renamed
serial_file.h@5:062962db7a48, 2022-03-29 (annotated)
- Committer:
- ffxx68
- Date:
- Tue Mar 29 10:06:20 2022 +0000
- Revision:
- 5:062962db7a48
Receiving the file through serial port
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ffxx68 | 5:062962db7a48 | 1 | #ifndef FILE_BUF_SIZE |
ffxx68 | 5:062962db7a48 | 2 | #define FILE_BUF_SIZE 1024 |
ffxx68 | 5:062962db7a48 | 3 | #include "mbed.h" |
ffxx68 | 5:062962db7a48 | 4 | |
ffxx68 | 5:062962db7a48 | 5 | #define ERR_FILE_BUF_FULL 10 |
ffxx68 | 5:062962db7a48 | 6 | #define ERR_FILE_TERMINATED 20 |
ffxx68 | 5:062962db7a48 | 7 | |
ffxx68 | 5:062962db7a48 | 8 | // shared with other modules |
ffxx68 | 5:062962db7a48 | 9 | extern Timer timeout; |
ffxx68 | 5:062962db7a48 | 10 | extern volatile int totBytesReceived; |
ffxx68 | 5:062962db7a48 | 11 | extern volatile int fileBufReceivePtr; |
ffxx68 | 5:062962db7a48 | 12 | extern volatile int fileBufSendPtr; |
ffxx68 | 5:062962db7a48 | 13 | extern volatile int fileReceiveComplete; |
ffxx68 | 5:062962db7a48 | 14 | extern volatile int fileError; |
ffxx68 | 5:062962db7a48 | 15 | extern volatile char fileOverSerialBuffer[]; |
ffxx68 | 5:062962db7a48 | 16 | |
ffxx68 | 5:062962db7a48 | 17 | void fileReceiveInit( void ); |
ffxx68 | 5:062962db7a48 | 18 | char filePullData ( void ) ; |
ffxx68 | 5:062962db7a48 | 19 | void filePushData ( char byte ) ; |
ffxx68 | 5:062962db7a48 | 20 | bool isFilePullComplete( void ); |
ffxx68 | 5:062962db7a48 | 21 | |
ffxx68 | 5:062962db7a48 | 22 | #endif |