Send file data demo.

Dependencies:   modem_ref_helper CRC DebouncedInterrupt

Revision:
0:065f2318fcb9
Child:
1:f4a7a48a5f2b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/files.cpp	Wed May 03 11:31:11 2017 +0000
@@ -0,0 +1,46 @@
+#include "files.h"
+#include "hwcfg.h"
+
+#include "kal_fs.h"
+
+#define __DEVICE_ID__               0x00000014
+
+alp_file_header_t h_rev = {
+    .perm = R_R,
+    .prop = FS_PERMANENT_NOTIF,
+    .afid = FID_ACTP_RPT_FULL,
+    .ifid = IFID_REPORT,
+    .size = HAL_U32_BYTE_SWAP((uint32_t)sizeof(revision_t)),
+    .alloc= HAL_U32_BYTE_SWAP((uint32_t)sizeof(revision_t))
+};
+
+revision_t f_rev = {
+    .manufacturer_id     = __MANUFACTURER_ID__,
+    /// Device ID: Arbitrary number, at user/customer choice
+    .device_id           = __DEVICE_ID__,
+    /// Hardware Board ID:
+    .hw_version          = __HW_VERSION__,
+    /// Firmware Version: made of
+    ///  - major,minor and patch indexes
+    ///  - fw_id : "build-flavour"
+    ///  FW_ID | MAJOR | MINOR | PATCH | HASH |
+    //     1B  |  1B   |  1B   |   2B  |  4B  |
+    .fw_version.id       = 0,
+    .fw_version.major    = 1,
+    .fw_version.minor    = 0,
+    .fw_version.patch    = 0,
+    .fw_version.hash     = 0x00000000,
+    /// "file-system" signature
+    .fs_crc              = 0x00000000
+};
+
+alp_file_header_t h_alarm = {
+    .perm = R_R,
+    .prop = FS_VOLATILE,
+    .afid = 0,
+    .ifid = 0,
+    .size = HAL_U32_BYTE_SWAP((uint32_t)sizeof(uint8_t)),
+    .alloc= HAL_U32_BYTE_SWAP((uint32_t)sizeof(uint8_t))
+};
+
+uint8_t f_alarm = 255;
\ No newline at end of file