Trond Enger / d7a_1x

Fork of d7a_1x by WizziLab

Revision:
27:934ab7455115
Parent:
26:9f0b9833cac6
Child:
29:8e7c5c1e9aab
--- a/include/d7a_modem.h	Thu Mar 31 14:48:50 2016 +0000
+++ b/include/d7a_modem.h	Fri Apr 01 10:55:30 2016 +0000
@@ -47,6 +47,51 @@
     } bf;
 } notify_file_param_t;
 
+//======================================================================
+// Firmware version Structure
+//
+// Used within the revision structure
+//======================================================================
+TYPEDEF_STRUCT_PACKED
+{
+    uint8_t  id;
+    uint8_t  major;
+    uint8_t  minor;
+    uint16_t patch;
+    uint32_t hash;
+} fw_version_t;
+
+//======================================================================
+// Revision Structure
+//
+// Usage within D7B server:
+// An XML describing the File system of a device is associated to a
+// couple manufacturer_id/device_id (==Device).
+// Different versions of the Device's XML can exist and can be mapped
+// according to fw_version
+//======================================================================
+TYPEDEF_STRUCT_PACKED
+{
+    /// Manufacturer ID: provided by Wizzilab
+    //  comes from: here
+    uint32_t manufacturer_id;
+    /// Device ID: Arbitrary number, at user/customer choice
+    //  comes from: application
+    uint32_t device_id;
+    /// Hardware Board ID:
+    //  comes from: board definition
+    uint32_t hw_version;
+    /// Firmware Version: made of
+    ///  - major,minor and patch indexes : comes from versioning tool
+    ///  - fw_id : "build-flavour" : comes from build setup
+    ///  FW_ID | MAJOR | MINOR | PATCH | HASH |
+    //     1B  |  1B   |  1B   |   2B  |  4B  |
+    fw_version_t fw_version;
+    /// "file-system" signature XXX: to be worked out
+    //  comes from: application
+    uint32_t fs_crc;
+} revision_t;
+
 
 void d7a_modem_open( PinName reset_pin );
 int32_t d7a_modem_wait_ready( uint32_t millisec = osWaitForever);
@@ -54,6 +99,7 @@
 d7a_com_rx_msg_t* d7a_modem_wait_pkt( uint32_t millisec = osWaitForever );
 void d7a_modem_register_file(uint8_t fid, uint8_t fifo_size, uint8_t flush_policy);
 void d7a_modem_notify_file(uint8_t fid, uint32_t offset, uint32_t length);
+void d7a_modem_infos( void );
 
 
 #endif
\ No newline at end of file