Sending and reception of big data file (1kB example)
Dependencies: modem_ref_helper CRC DebouncedInterrupt
Diff: files.h
- Revision:
- 0:a2bbc478f812
- Child:
- 1:76a8a3cc5f2e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/files.h Thu Dec 14 14:22:40 2017 +0000 @@ -0,0 +1,35 @@ +#ifndef _FILES_H_ +#define _FILES_H_ + +#include "mbed.h" +#include "revision.h" +#include "alp_spec.h" +#include "alp_helpers.h" +#include "modem_ref.h" + +#define sizeof_field(_struct,_field) sizeof(((_struct*)0)->_field) + +TYPEDEF_STRUCT_PACKED { + uint8_t fid; + uint32_t offset; + uint32_t length; +} touch_t; + +extern Queue<touch_t, 8> g_file_modified; + +TYPEDEF_STRUCT_PACKED { + uint8_t data[1024]; + uint32_t crc; +} input_file_t; + +#define FID_HOST_REV 65 +#define SIZE_HOST_REV sizeof(revision_t) +extern alp_file_header_t h_rev; +extern revision_t f_rev; + +#define FID_INPUT_FILE 201 +#define SIZE_INPUT_FILE sizeof(input_file_t) +extern alp_file_header_t h_input_file; +extern input_file_t f_input_file; + +#endif // _FILE_H_ \ No newline at end of file