Dash7Board Code Upgrade Protocol demonstration code.

Dependencies:   modem_ref_helper CRC

files.h

Committer:
Jeej
Date:
2018-02-01
Revision:
0:5589104abba0
Child:
7:bfe920ee44f2

File content as of revision 0:5589104abba0:

#ifndef _FILES_H_
#define _FILES_H_

#include "mbed.h"
#include "revision.h"
#include "alp_spec.h"
#include "alp_helpers.h"
#include "modem_ref.h"
#include "cup.h"

TYPEDEF_STRUCT_PACKED {
    uint8_t fid;
    uint32_t offset;
    uint32_t length;
} touch_t;

extern Queue<touch_t, 8> g_file_modified;

#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 SIZE_CUP_CFG_FILE       sizeof(cup_cfg_t)
extern alp_file_header_t        h_cup_cfg;
extern cup_cfg_t                f_cup_cfg;

#define CUP_FILE_MAX_SIZE       (158*8*128)
extern alp_file_header_t        h_cup_code;

#endif // _FILE_H_