Data reception demo.

Dependencies:   modem_ref_helper CRC

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers files.cpp Source File

files.cpp

00001 #include "files.h"
00002 #include "hwcfg.h"
00003 
00004 #include "kal_fs.h"
00005 
00006 #define __DEVICE_ID__               0x00000016
00007 
00008 const alp_file_header_t h_rev = {
00009     .perm = RWR_R_,
00010     .prop = FS_PERMANENT_NOTIF,
00011     .afid = FID_ACTP_RPT_FULL,
00012     .ifid = IFID_REPORT,
00013     .size = HAL_U32_BYTE_SWAP((uint32_t)SIZE_HOST_REV),
00014     .alloc= HAL_U32_BYTE_SWAP((uint32_t)SIZE_HOST_REV)
00015 };
00016 
00017 const revision_t f_rev = {
00018     .manufacturer_id     = __MANUFACTURER_ID__,
00019     /// Device ID: Arbitrary number, at user/customer choice
00020     .device_id           = __DEVICE_ID__,
00021     /// Hardware Board ID:
00022     .hw_version          = __HW_VERSION__,
00023     /// Firmware Version: made of
00024     ///  - major,minor and patch indexes
00025     ///  - fw_id : "build-flavour"
00026     ///  FW_ID | MAJOR | MINOR | PATCH | HASH |
00027     //     1B  |  1B   |  1B   |   2B  |  4B  |
00028     .fw_version.id       = 0,
00029     .fw_version.major    = 2,
00030     .fw_version.minor    = 0,
00031     .fw_version.patch    = 0,
00032     .fw_version.hash     = 0x20200528,
00033     /// Not used
00034     .cup_max_size        = 0x00000000
00035 };
00036 
00037 const alp_file_header_t h_string_file = {
00038     .perm = RWRWRW,
00039     .prop = FS_VOLATILE,
00040     .afid = 0,
00041     .ifid = 0,
00042     .size = HAL_U32_BYTE_SWAP((uint32_t)SIZE_STRING_FILE),
00043     .alloc= HAL_U32_BYTE_SWAP((uint32_t)SIZE_STRING_FILE)
00044 };
00045 
00046 uint8_t f_string_file[SIZE_STRING_FILE] = "Default string value";
00047 
00048 const alp_file_header_t h_status_file = {
00049     .perm = RWRWR_,
00050     .prop = FS_VOLATILE_NOTIF,
00051     .afid = FID_ACTP_RPT_FULL,
00052     .ifid = IFID_REPORT,
00053     .size = HAL_U32_BYTE_SWAP((uint32_t)SIZE_STATUS_FILE),
00054     .alloc= HAL_U32_BYTE_SWAP((uint32_t)SIZE_STATUS_FILE)
00055 };
00056 
00057 uint8_t f_status_file = 0;