Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of d7a_1x by
Diff: include/d7a_modem.h
- Revision:
- 30:d775c1409849
- Parent:
- 29:8e7c5c1e9aab
- Child:
- 34:1311cc53201a
--- a/include/d7a_modem.h Tue May 03 16:53:52 2016 +0000
+++ b/include/d7a_modem.h Wed May 25 08:23:15 2016 +0000
@@ -1,6 +1,17 @@
#ifndef _D7A_MODEM_H_
#define _D7A_MODEM_H_
+
+enum {
+ WM_ERR_COM_LINK=10,
+ WM_ERR_NOT_READY,
+};
+// Msg/Cmd exchanged on CMD FLOW ID
+enum {
+ WM_READY,
+};
+
+
//======================================================================
// MODEM commands over COM port
//======================================================================
@@ -31,20 +42,23 @@
/// Send by the Modem Device after a (re)boot.
/// ARGS: boot_status_t
WM_CMD_BOOT = 0x81,
-} d7a_cmd_t;
+
+} wm_cmd_t;
-typedef enum {
- ALP_POLICY_NONE = 0x00,
- ALP_POLICY_DEFAULT = 0x01,
- ALP_POLICY_ONESHOT = 0x80,
-} alp_retry_policy_t;
+typedef union {
+ uint32_t w;
+ struct {
+ uint32_t cause : 8;
+ uint32_t rfu : 8;
+ uint32_t nb_boot :16;
+ } bf;
+} boot_status_t;
typedef union {
uint32_t w;
struct {
uint32_t fid : 8;
- uint32_t fifo_size : 8;
- uint32_t flush_policy : 8;
+ uint32_t retry_policy : 8;
} bf;
} register_file_param_t;
@@ -57,6 +71,15 @@
} bf;
} notify_file_param_t;
+typedef struct {
+ union {
+ uint8_t b[8];
+ uint32_t w[2];
+ } uid;
+ uint8_t calib;
+} wm_status_t;
+
+
//======================================================================
// Firmware version Structure
//
@@ -104,12 +127,14 @@
void d7a_modem_open( PinName reset_pin );
-int32_t d7a_modem_wait_ready( uint32_t millisec = osWaitForever);
+void d7a_modem_reset( void );
+bool d7a_modem_wait_ready( uint32_t millisec = osWaitForever );
void d7a_modem_new_pkt(d7a_com_rx_msg_t* pkt);
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_msg(uint8_t value, uint8_t* buf, uint8_t len);
+bool d7a_modem_register_file(uint8_t fid, uint8_t retry_policy);
void d7a_modem_notify_file(uint8_t fid, uint32_t offset, uint32_t length);
-void d7a_modem_infos( void );
+void d7a_modem_print_infos(void);
#endif
\ No newline at end of file
