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
include/d7a_modem.h
- Committer:
- Jeej
- Date:
- 2016-03-31
- Revision:
- 26:9f0b9833cac6
- Parent:
- 25:aac250164497
- Child:
- 27:934ab7455115
File content as of revision 26:9f0b9833cac6:
#ifndef _D7A_MODEM_H_
#define _D7A_MODEM_H_
//======================================================================
// MODEM commands over COM port
//======================================================================
typedef enum
{
/// Soft reset MOTE
WM_CMD_RST,
/// Set radio to IDLE
WM_CMD_RADIO_IDLE,
/// Mask D7A Scan Series
WM_CMD_SCAN_PAUSE,
/// Unmask D7A Scan Series
WM_CMD_SCAN_RESUME,
// To be continued...
WM_CMD_BOOT,
WM_CMD_READY,
WM_CMD_REGISTER_FILE,
WM_CMD_NOTIFY_FILE,
} d7a_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 fid : 8;
uint32_t fifo_size : 8;
uint32_t flush_policy : 8;
} bf;
} register_file_param_t;
typedef union {
uint32_t w;
struct {
uint32_t fid : 8;
uint32_t offset : 12;
uint32_t size : 12;
} bf;
} notify_file_param_t;
void d7a_modem_open( PinName reset_pin );
int32_t 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_notify_file(uint8_t fid, uint32_t offset, uint32_t length);
#endif
