MeterLogger
Data Structures | Typedefs | Functions | Variables
at_custom.h File Reference
#include "c_types.h"
Include dependency graph for at_custom.h:

Go to the source code of this file.

Data Structures

struct  at_funcationType
 

Typedefs

typedef void(* at_custom_uart_rx_intr) (uint8 *data, int32 len)
 
typedef void(* at_custom_response_func_type) (const char *str)
 
typedef void(* at_fake_uart_tx_func_type) (const uint8 *data, uint32 length)
 

Functions

void at_response_ok (void)
 Response "OK" to uart. More...
 
void at_response_error (void)
 Response "ERROR" to uart. More...
 
void at_response (const char *str)
 Response string. It is equivalent to at_port_print,if not call at_register_response_func or call at_register_response_func(NULL); It will run custom response function,if call at_register_response_func and parameter is not NULL. More...
 
void at_register_response_func (at_custom_response_func_type response_func)
 register custom response function. More...
 
void at_cmd_array_regist (at_funcationType *custom_at_cmd_array, uint32 cmd_num)
 Task of process command or txdata. More...
 
bool at_get_next_int_dec (char **p_src, int *result, int *err)
 get digit form at cmd line.the maybe alter pSrc More...
 
int32 at_data_str_copy (char *p_dest, char **p_src, int32 max_len)
 get string form at cmd line.the maybe alter pSrc More...
 
void at_init (void)
 initialize at module More...
 
void at_port_print (const char *str)
 print string to at port More...
 
void at_set_custom_info (char *info)
 print custom information when AT+GMR More...
 
void at_enter_special_state (void)
 if current at command is processing,you can call at_enter_special_state, then if other comamnd coming,it will return busy. More...
 
void at_leave_special_state (void)
 
uint32 at_get_version (void)
 get at version More...
 
void at_register_uart_rx_intr (at_custom_uart_rx_intr rx_func)
 register custom uart rx interrupt function More...
 
uint32 at_fake_uart_rx (uint8 *data, uint32 length)
 notify at module that has receive data More...
 
bool at_fake_uart_enable (bool enable, at_fake_uart_tx_func_type at_fake_uart_tx_func)
 enable fake uart,and register fake uart tx More...
 
bool at_set_escape_character (uint8 ch)
 set at escape character More...
 

Variables

uint8 at_customLinkMax
 

Typedef Documentation

◆ at_custom_response_func_type

typedef void(* at_custom_response_func_type) (const char *str)

Definition at line 42 of file at_custom.h.

◆ at_custom_uart_rx_intr

typedef void(* at_custom_uart_rx_intr) (uint8 *data, int32 len)

Definition at line 40 of file at_custom.h.

◆ at_fake_uart_tx_func_type

typedef void(* at_fake_uart_tx_func_type) (const uint8 *data, uint32 length)

Definition at line 44 of file at_custom.h.

Function Documentation

◆ at_cmd_array_regist()

void at_cmd_array_regist ( at_funcationType custom_at_cmd_array,
uint32  cmd_num 
)

Task of process command or txdata.

Parameters
custom_at_cmd_arraythe array of at cmd that custom defined cmd_num : the num of at cmd that custom defined
Return values
None

◆ at_data_str_copy()

int32 at_data_str_copy ( char *  p_dest,
char **  p_src,
int32  max_len 
)

get string form at cmd line.the maybe alter pSrc

Parameters
p_destthe buffer to be placed result p_src: at cmd line string max_len :max len of string excepted to get
Return values
None

◆ at_enter_special_state()

void at_enter_special_state ( void  )

if current at command is processing,you can call at_enter_special_state, then if other comamnd coming,it will return busy.

Parameters
None
Return values
None

◆ at_fake_uart_enable()

bool at_fake_uart_enable ( bool  enable,
at_fake_uart_tx_func_type  at_fake_uart_tx_func 
)

enable fake uart,and register fake uart tx

Parameters
enableenable fake uart.
at_fake_uart_tx_func
Return values
datalen,if ok len == length

◆ at_fake_uart_rx()

uint32 at_fake_uart_rx ( uint8 data,
uint32  length 
)

notify at module that has receive data

Parameters
datadata buffer.
lengthdata length
Return values
datalen,if ok len == length

◆ at_get_next_int_dec()

bool at_get_next_int_dec ( char **  p_src,
int *  result,
int *  err 
)

get digit form at cmd line.the maybe alter pSrc

Parameters
p_srcat cmd line string result:the buffer to be placed result err : err num
Return values
TRUEFALSE:

◆ at_get_version()

uint32 at_get_version ( void  )

get at version

Parameters
None
Return values
atversion bit24~31: at main version bit23~16: at sub version bit15~8 : at test version bit7~0 : customized version

◆ at_init()

void at_init ( void  )

initialize at module

Parameters
None
Return values
None

◆ at_leave_special_state()

void at_leave_special_state ( void  )
Parameters
None
Return values
None

◆ at_port_print()

void at_port_print ( const char *  str)

print string to at port

Parameters
string
Return values
None

◆ at_register_response_func()

void at_register_response_func ( at_custom_response_func_type  response_func)

register custom response function.

Parameters
response_functhe function that will run when call at_response
Return values
None

◆ at_register_uart_rx_intr()

void at_register_uart_rx_intr ( at_custom_uart_rx_intr  rx_func)

register custom uart rx interrupt function

Parameters
rx_funccustom uart rx interrupt function. If rx_func is non-void,when rx interrupt comming,it will call rx_func(data,len), data is the buffer of data,len is the length of data.Otherwise,it will run AT rx function.
Return values
None

◆ at_response()

void at_response ( const char *  str)

Response string. It is equivalent to at_port_print,if not call at_register_response_func or call at_register_response_func(NULL); It will run custom response function,if call at_register_response_func and parameter is not NULL.

Parameters
string
Return values
None

◆ at_response_error()

void at_response_error ( void  )

Response "ERROR" to uart.

Parameters
None
Return values
None

◆ at_response_ok()

void at_response_ok ( void  )

Response "OK" to uart.

Parameters
None
Return values
None

◆ at_set_custom_info()

void at_set_custom_info ( char *  info)

print custom information when AT+GMR

Parameters
string
Return values
None

◆ at_set_escape_character()

bool at_set_escape_character ( uint8  ch)

set at escape character

Parameters
chescape character.
Return values
TRUE,ifset ok,otherwize FALSE.

Variable Documentation

◆ at_customLinkMax

uint8 at_customLinkMax