Helper library to use modem_ref driver.

Dependencies:   WizziCom WizziDebug ram_fs modem_ref

Dependents:   D7A_WM_Updater D7A_1x_demo_ActiveRFIDReader D7A_1x_demo_big_file D7A_1x_demo_CodeUpgradeProtocol ... more

Committer:
Jeej
Date:
Tue Apr 02 08:54:46 2019 +0000
Revision:
57:d6b0320051e8
Parent:
44:7563b8e53e1d
Updated WizziDebug

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jeej 0:e9dd36a15d07 1 #ifndef __MODEM_REF_HELPER_H__
Jeej 0:e9dd36a15d07 2 #define __MODEM_REF_HELPER_H__
Jeej 0:e9dd36a15d07 3
Jeej 0:e9dd36a15d07 4 #include "mbed.h"
Jeej 0:e9dd36a15d07 5 #include "rtos.h"
Jeej 0:e9dd36a15d07 6 #include "WizziDebug.h"
Jeej 0:e9dd36a15d07 7 #include "WizziCom.h"
Jeej 0:e9dd36a15d07 8
Jeej 0:e9dd36a15d07 9 #include "hwcfg.h"
Jeej 0:e9dd36a15d07 10 #include "ram_fs.h"
Jeej 0:e9dd36a15d07 11
Jeej 38:0263914280b7 12 #include "alp.h"
Jeej 38:0263914280b7 13 #include "alp_fs.h"
Jeej 0:e9dd36a15d07 14 #include "alp_helpers.h"
Jeej 38:0263914280b7 15 #include "alp_lwan.h"
Jeej 38:0263914280b7 16 #include "alp_spec.h"
Jeej 0:e9dd36a15d07 17 #include "d7a_1x.h"
Jeej 0:e9dd36a15d07 18 #include "d7a_1x_fs.h"
Jeej 38:0263914280b7 19 #include "kal_fs.h"
Jeej 38:0263914280b7 20 #include "kal_math.h"
Jeej 38:0263914280b7 21 #include "modem_ref.h"
Jeej 38:0263914280b7 22 #include "revision.h"
Jeej 29:5815b6886bbe 23
Jeej 0:e9dd36a15d07 24
Jeej 1:0ec0bae00588 25 #define D7A_CTF_VAL(mant,exp) ((uint8_t)(mant|(exp<<5)))
Jeej 1:0ec0bae00588 26 #define ALP_ITF_TYPE_D7A 0xD7
Jeej 1:0ec0bae00588 27 #define WM_FID_ALP_CFG 50
Jeej 1:0ec0bae00588 28
Jeej 44:7563b8e53e1d 29 #define DEFAULT_ROOT_KEY {206, 87, 116, 11, 4, 30, 202, 254, 206, 87, 116, 11, 4, 30, 202, 254}
Jeej 44:7563b8e53e1d 30
Jeej 1:0ec0bae00588 31 TYPEDEF_STRUCT_PACKED {
Jeej 1:0ec0bae00588 32 uint8_t type;
Jeej 1:0ec0bae00588 33 d7a_sp_cfg_t cfg;
Jeej 1:0ec0bae00588 34 } alp_d7a_itf_t;
Jeej 1:0ec0bae00588 35
Jeej 0:e9dd36a15d07 36 void modem_helper_open(modem_callbacks_t* callbacks);
Jeej 44:7563b8e53e1d 37 void modem_notify_host_rev(revision_t* data, alp_file_header_t* header, uint8_t* root_key);
Jeej 0:e9dd36a15d07 38 void modem_update_file(uint8_t fid, alp_file_header_t* header, uint8_t* data);
Jeej 43:90c9221c1430 39 void modem_print_error(uint8_t itf, int8_t error);
Jeej 0:e9dd36a15d07 40
Jeej 1:0ec0bae00588 41 #define D7_ITF_SIZE(_itf) (1+my_alp_itf_d7a_cfg_size(&(_itf)->cfg))
Jeej 1:0ec0bae00588 42 int my_alp_itf_d7a_cfg_size(d7a_sp_cfg_t* cfg);
Jeej 1:0ec0bae00588 43
Jeej 0:e9dd36a15d07 44 #endif