RA Flexible Software Package Documentation  Release v5.3.0

 
DA16XXX AT Command Transport Layer

Detailed Description

Abstraction interface for DA16XXX AT Command functions.

Summary

The DA16XXX AT Command Transport Layer interface provides functions for data communication and buffer handling over multiple communications interfaces.

Data Structures

struct  at_transport_da16xxx_callback_args_t
 
struct  at_transport_da16xxx_cfg_t
 
struct  at_transport_da16xxx_data_t
 
struct  at_transport_da16xxx_status_t
 
struct  at_transport_da16xxx_api_t
 
struct  at_transport_da16xxx_instance_t
 

Typedefs

typedef void at_transport_da16xxx_ctrl_t
 

Enumerations

enum  at_transport_da16xxx_event_t
 

Data Structure Documentation

◆ at_transport_da16xxx_callback_args_t

struct at_transport_da16xxx_callback_args_t

DA16xxx middleware callback parameter definition

◆ at_transport_da16xxx_cfg_t

struct at_transport_da16xxx_cfg_t

DA16xxx middleware configuration block

Data Fields

void const * p_extend
 Pointer to extended configuration by instance of interface.
 
void const * p_context
 Pointer to the user-provided context.
 
bool(* p_callback )(at_transport_da16xxx_callback_args_t *p_args)
 Pointer to callback function.
 

◆ at_transport_da16xxx_data_t

struct at_transport_da16xxx_data_t

DA16xxx data structure

Data Fields
uint8_t * p_at_cmd_string Pointer to ATCMD string.
uint32_t at_cmd_string_length ATCMD string length.
uint8_t * p_response_buffer Pointer to ATCMD response buffer.
uint32_t response_buffer_size ATCMD response buffer string length.
uint32_t timeout_ms ATCMD timeout in ms.
const char * p_expect_code Expected string in the ATCMD response.
uint32_t comm_ch_id Communication channel ID.

◆ at_transport_da16xxx_status_t

struct at_transport_da16xxx_status_t

DA16xxx status indicators

Data Fields
bool open True if driver is open.

◆ at_transport_da16xxx_api_t

struct at_transport_da16xxx_api_t

AT Command APIs

Data Fields

fsp_err_t(* open )(at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(at_transport_da16xxx_ctrl_t *const p_ctrl)
 
fsp_err_t(* atCommandSendThreadSafe )(at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_data_t *p_at_cmd)
 
fsp_err_t(* atCommandSend )(at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_data_t *p_at_cmd)
 
fsp_err_t(* giveMutex )(at_transport_da16xxx_ctrl_t *const p_ctrl, uint32_t mutex_flag)
 
fsp_err_t(* takeMutex )(at_transport_da16xxx_ctrl_t *const p_ctrl, uint32_t mutex_flag)
 
fsp_err_t(* statusGet )(at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_status_t *p_status)
 
size_t(* bufferRecv )(at_transport_da16xxx_ctrl_t *const p_ctrl, const char *p_data, uint32_t length, uint32_t rx_timeout)
 

Field Documentation

◆ open

fsp_err_t(* at_transport_da16xxx_api_t::open) (at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_cfg_t const *const p_cfg)

Open at cmd instance.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to configuration structure.

◆ close

fsp_err_t(* at_transport_da16xxx_api_t::close) (at_transport_da16xxx_ctrl_t *const p_ctrl)

Close at cmd instance.

Parameters
[in]p_ctrlPointer to control structure.

◆ atCommandSendThreadSafe

fsp_err_t(* at_transport_da16xxx_api_t::atCommandSendThreadSafe) (at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_data_t *p_at_cmd)

at cmd send thread safe.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_at_cmdPointer to AT command data structure.

◆ atCommandSend

fsp_err_t(* at_transport_da16xxx_api_t::atCommandSend) (at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_data_t *p_at_cmd)

at cmd send.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_at_cmdPointer to AT command data structure.

◆ giveMutex

fsp_err_t(* at_transport_da16xxx_api_t::giveMutex) (at_transport_da16xxx_ctrl_t *const p_ctrl, uint32_t mutex_flag)

Give the mutex.

Parameters
[in]p_ctrlPointer to Transport layer instance control structure.
[in]mutex_flagTX/RX Flags for the mutex.

◆ takeMutex

fsp_err_t(* at_transport_da16xxx_api_t::takeMutex) (at_transport_da16xxx_ctrl_t *const p_ctrl, uint32_t mutex_flag)

Take the mutex .

Parameters
[in]p_ctrlPointer to Transport layer instance control structure.
[in]mutex_flagTX/RX Flags for the mutex.

◆ statusGet

fsp_err_t(* at_transport_da16xxx_api_t::statusGet) (at_transport_da16xxx_ctrl_t *const p_ctrl, at_transport_da16xxx_status_t *p_status)

Gets the status of the configured DA16xxx transport.

Parameters
[in]p_ctrlPointer to the to Transport layer instance control structure.
[out]p_statusPointer to store current status.

◆ bufferRecv

size_t(* at_transport_da16xxx_api_t::bufferRecv) (at_transport_da16xxx_ctrl_t *const p_ctrl, const char *p_data, uint32_t length, uint32_t rx_timeout)

Receive data from stream buffer.

Parameters
[in]p_ctrlPointer to Transport layer instance control structure.
[in]p_dataPointer to data.
[in]lengthData length.
[in]rx_timeoutTimeout for receiving data on the buffer.
[in]trigger_levelTrigger level for stream buffer.

◆ at_transport_da16xxx_instance_t

struct at_transport_da16xxx_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Typedef Documentation

◆ at_transport_da16xxx_ctrl_t

At transport control block. Allocate an instance specific control block to pass into the Communications API calls.

Enumeration Type Documentation

◆ at_transport_da16xxx_event_t

Event in the callback function