RAFW Flexible Software Package Documentation  Release v2.0.1

 
AT

Functions

fsp_err_t RM_ATCMD_W_CORE_Open (atcmd_w_ctrl_t *const p_at_ctrl, atcmd_w_cfg_t const *const p_cfg)
 
fsp_err_t RM_ATCMD_W_CORE_Read (atcmd_w_ctrl_t *const p_at_ctrl, uint8_t *const p_dest, uint32_t const bytes)
 
fsp_err_t RM_ATCMD_W_CORE_Write (atcmd_w_ctrl_t *const p_at_ctrl, uint8_t const *const p_src, uint32_t const bytes)
 
fsp_err_t RM_ATCMD_W_CORE_InfoGet (atcmd_w_ctrl_t *const p_at_ctrl, atcmd_w_info_t *const p_info)
 
fsp_err_t RM_ATCMD_W_CORE_Abort (atcmd_w_ctrl_t *const p_at_ctrl)
 
fsp_err_t RM_ATCMD_W_CORE_CallbackSet (atcmd_w_ctrl_t *const p_at_ctrl, void(*p_callback)(atcmd_w_callback_args_t *), void const *const p_context, atcmd_w_callback_args_t *const p_callback_memory)
 
fsp_err_t RM_ATCMD_W_CORE_Close (atcmd_w_ctrl_t *const p_at_ctrl)
 
fsp_err_t RM_ATCMD_W_CORE_ReadStop (atcmd_w_ctrl_t *const p_at_ctrl, uint32_t *remaining_bytes)
 
fsp_err_t RM_ATCMD_W_CORE_SecureChannelKeySet (atcmd_w_ctrl_t *const p_at_ctrl, uint8_t *key)
 

Detailed Description

Data Structures

struct  atcmd_w_core_instance_ctrl_t
 
struct  atcmd_w_conf_t
 

Data Structure Documentation

◆ atcmd_w_core_instance_ctrl_t

struct atcmd_w_core_instance_ctrl_t

AT module control block. DO NOT INITIALIZE. Initialization occurs when atcmd_w_api_t::open is called.

Data Fields

atcmd_transport_w_instance_tp_transport_instance
 Transport instance of the communication channel.
 
uint8_t fifo_depth
 FIFO depth of the UART channel.
 
uint32_t open
 Used to determine if the channel is configured.
 
uint8_t const * p_tx_src
 Source buffer pointer used to fill hardware FIFO from transmit ISR.
 
uint32_t tx_src_bytes
 Size of source buffer pointer used to fill hardware FIFO from transmit ISR.
 
uint8_t rx_dest [ATCMD_W_RESP_LEN_MAX]
 Destination buffer used for receiving data.
 
uint32_t rx_dest_bytes
 Number of data bytes received.
 
uint32_t rx_dest_idx
 Pointer to current octet read.
 
atcmd_w_cfg_t const * p_cfg
 Pointer to the configuration block.
 
void(* p_callback )(atcmd_w_callback_args_t *)
 Pointer to callback that is called when a uart_event_t occurs.
 
atcmd_w_callback_args_tp_callback_memory
 Pointer to non-secure memory that can be used to pass arguments to a callback in non-secure memory.
 
void const * p_context
 Pointer to context to be passed into callback function.
 
atcmd_w_core_module_list_t list
 List of AT-CMD.
 
uint8_t echo_on
 Echo.
 
uint8_t uart_echo_on
 UART Echo.
 

◆ atcmd_w_conf_t

struct atcmd_w_conf_t

AT configuration struct.

Data Fields
atcmd_w_cfg_t conf Instruction configuration for the AT module.

Function Documentation

◆ RM_ATCMD_W_CORE_Open()

fsp_err_t RM_ATCMD_W_CORE_Open ( atcmd_w_ctrl_t *const  p_at_ctrl,
atcmd_w_cfg_t const *const  p_cfg 
)

This functions initializes the AT communication module. Implements atcmd_w_api_t::open.

This function performs the following tasks:

  • Performs parameter checking and processes error conditions.
  • Configures the peripheral registers according to the configuration.
  • Initialize the control structure for use in other AT Interface functions.
Return values
FSP_SUCCESSModule initialized successfully.
FSP_ERR_ALREADY_OPENInstance was already initialized.
Returns
See Common Error Codes or functions called by this function for other possible return codes. This function calls: transfer_api_t::open
Note
This function is reentrant.

◆ RM_ATCMD_W_CORE_Read()

fsp_err_t RM_ATCMD_W_CORE_Read ( atcmd_w_ctrl_t *const  p_at_ctrl,
uint8_t *const  p_dest,
uint32_t const  bytes 
)

This function receives data from a AT transport layer. Implements atcmd_w_api_t::read.

The function performs the following tasks:

  • Performs parameter checking and processes error conditions.
  • Sets up the instance to complete a AT read operation.
Return values
FSP_SUCCESSRead operation successfully completed.
FSP_ERR_ASSERTIONNULL pointer to control or destination parameters or transfer length is zero.
FSP_ERR_NOT_OPENThe transport has not been opened. Open transport first.
FSP_ERR_IN_USEA transfer is already in progress.
FSP_ERR_TIMEOUTTimeout reading data.

◆ RM_ATCMD_W_CORE_Write()

fsp_err_t RM_ATCMD_W_CORE_Write ( atcmd_w_ctrl_t *const  p_at_ctrl,
uint8_t const *const  p_src,
uint32_t const  bytes 
)

This function transmits data to a AT transport layer. Implements atcmd_w_api_t::write.

The function performs the following tasks:

  • Performs parameter checking and processes error conditions.
  • Sets up the instance to complete a AT write operation.
Return values
FSP_SUCCESSWrite operation successfully completed.
FSP_ERR_ASSERTIONNULL pointer to control or source parameters or transfer length is zero.
FSP_ERR_NOT_OPENThe transport has not been opened. Open the transport first.
FSP_ERR_IN_USEA transfer is already in progress.

◆ RM_ATCMD_W_CORE_InfoGet()

fsp_err_t RM_ATCMD_W_CORE_InfoGet ( atcmd_w_ctrl_t *const  p_at_ctrl,
atcmd_w_info_t *const  p_info 
)

Provides the middleware information, including the maximum number of bytes that can be received or transmitted at a time. Implements atcmd_w_api_t::infoGet

Return values
FSP_SUCCESSInformation stored in provided p_info.
FSP_ERR_ASSERTIONPointer to AT control block is NULL.
FSP_ERR_NOT_OPENThe control block has not been opened

◆ RM_ATCMD_W_CORE_Abort()

fsp_err_t RM_ATCMD_W_CORE_Abort ( atcmd_w_ctrl_t *const  p_at_ctrl)

Provides API to abort ongoing transfer. Transmission is aborted after the current character is transmitted. Reception is still enabled after abort(). Any characters received after abort() and before the transfer is reset in the next call to read(), will arrive via the callback function. Implements atcmd_w_api_t::communicationAbort

Return values
FSP_SUCCESSAT transaction aborted successfully.
FSP_ERR_ASSERTIONPointer to AT control block is NULL.
FSP_ERR_NOT_OPENThe control block has not been opened.
FSP_ERR_UNSUPPORTEDThe requested Abort direction is unsupported.
Returns
See Common Error Codes or functions called by this function for other possible return codes. This function calls: transfer_api_t::disable

◆ RM_ATCMD_W_CORE_CallbackSet()

fsp_err_t RM_ATCMD_W_CORE_CallbackSet ( atcmd_w_ctrl_t *const  p_at_ctrl,
void(*)(atcmd_w_callback_args_t *)  p_callback,
void const *const  p_context,
atcmd_w_callback_args_t *const  p_callback_memory 
)

Updates the user callback and has option of providing memory for callback structure. Implements atcmd_w_api_t::callbackSet

Return values
FSP_SUCCESSCallback updated successfully.
FSP_ERR_ASSERTIONA required pointer is NULL.
FSP_ERR_NOT_OPENThe control block has not been opened.

◆ RM_ATCMD_W_CORE_Close()

fsp_err_t RM_ATCMD_W_CORE_Close ( atcmd_w_ctrl_t *const  p_at_ctrl)

This function manages the closing of the module by the following task. Implements atcmd_w_api_t::close.

Disables AT operations by disabling the selected communication bus (UART,SPI or SDIO).

  • Disables the AT peripheral.
  • Disables all the associated interrupts.
  • Update control structure so it will not work with AT Interface functions.
Return values
FSP_SUCCESSModule successfully closed.
FSP_ERR_ASSERTIONA required pointer argument is NULL.
FSP_ERR_NOT_OPENThe module has not been opened. Open the module first.

◆ RM_ATCMD_W_CORE_ReadStop()

fsp_err_t RM_ATCMD_W_CORE_ReadStop ( atcmd_w_ctrl_t *const  p_at_ctrl,
uint32_t *  remaining_bytes 
)

Provides API to abort ongoing read. Reception is still enabled after abort(). Any characters received after abort() and before the transfer is reset in the next call to read(). Implements atcmd_w_api_t::readStop

Return values
FSP_SUCCESSAT transaction aborted successfully.
FSP_ERR_ASSERTIONPointer to AT control block is NULL.
FSP_ERR_NOT_OPENThe control block has not been opened.
Returns
See Common Error Codes or functions called by this function for other possible return codes. This function calls:

◆ RM_ATCMD_W_CORE_SecureChannelKeySet()

fsp_err_t RM_ATCMD_W_CORE_SecureChannelKeySet ( atcmd_w_ctrl_t *const  p_at_ctrl,
uint8_t *  key 
)

Sets the secure channel key for AT command core.

This function copies the provided key into the internal control structure if secure channel support is enabled (ATCMD_SECURE_CHANNEL == 1).

Parameters
[in]p_at_ctrlPointer to the AT command control structure.
[in]keyPointer to the secure key to be set.
Return values
FSP_SUCCESSKey was set successfully (or no operation if secure channel is disabled).