Microchip® Advanced Software Framework

interface.h File Reference
#include "event.h"

Macros

#define INTERFACE_API_PKT_ID   0x05
 
#define INTERFACE_HDR_LENGTH   9
 
#define INTERFACE_MSG_DONE()   }while(0)
 
#define INTERFACE_MSG_INIT(msg_id, dest_id)
 
#define INTERFACE_PACK_ARG_BLOCK(ptr, len)
 
#define INTERFACE_PACK_ARG_DUMMY(len)   __ptr += len
 
#define INTERFACE_PACK_ARG_UINT16(arg)
 
#define INTERFACE_PACK_ARG_UINT32(arg)
 
#define INTERFACE_PACK_ARG_UINT8(arg)   *__ptr++ = (arg)
 
#define INTERFACE_PACK_LEN()
 
#define INTERFACE_RCV_BUFF_LEN   500
 
#define INTERFACE_SEND_BUF_MAX   600
 
#define INTERFACE_SEND_NO_WAIT()   interface_send(interface_send_msg, (__ptr - &interface_send_msg[INTERFACE_HDR_LENGTH]))
 
#define INTERFACE_SEND_WAIT(msg_id, src_id)   interface_send_wait(interface_send_msg, (__ptr - &interface_send_msg[INTERFACE_HDR_LENGTH]), msg_id, src_id, &__ptr)
 
#define INTERFACE_UNPACK_BLOCK(ptr, len)
 
#define INTERFACE_UNPACK_DONE()   }while(0)
 
#define INTERFACE_UNPACK_INIT(ptr)
 
#define INTERFACE_UNPACK_SKIP(len)   __ptr += (len)
 
#define INTERFACE_UNPACK_UINT16(ptr)
 
#define INTERFACE_UNPACK_UINT32(ptr)
 
#define INTERFACE_UNPACK_UINT8(ptr)   *ptr = *__ptr++
 

Functions

at_ble_status_t interface_send (uint8_t *msg, uint16_t u16TxLen)
 
at_ble_status_t interface_send_wait (uint8_t *msg, uint16_t u16TxLen, uint16_t msg_id, uint16_t src_id, uint8_t **rsp)
 

Variables

uint8_t interface_send_msg [INTERFACE_SEND_BUF_MAX]
 

#define INTERFACE_API_PKT_ID   0x05
#define INTERFACE_HDR_LENGTH   9
#define INTERFACE_MSG_DONE ( )    }while(0)

Referenced by dbg_le_get_bd_addr_req_handler(), dbg_le_set_bd_addr_req_handler(), dbg_rd_mem_req_handler(), dbg_rd_mem_req_handler32(), dbg_set_tx_pw_req_handler(), dbg_wr_mem_req_handler(), dbg_wr_mem_req_handler32(), dbg_wr_mem_req_handler32_reset(), gapc_bond_cfm_handler_key_exch(), gapc_bond_cfm_handler_pair_resp(), gapc_bond_cmd_handler(), gapc_connection_cfm_handler(), gapc_disconnect_cmd_handler(), gapc_encrypt_cfm_handler(), gapc_encrypt_cmd_handler(), gapc_get_info_cmd_handler(), gapc_get_tx_pwr_req_handler(), gapc_key_exch(), gapc_param_update_cfm_handler(), gapc_param_update_cmd_handler(), gapc_security_cmd_handler(), gapc_set_tx_pwr_req_handler(), gapm_cancel_cmd_handler(), gapm_connection_cfm_handler(), gapm_reset_req_handler(), gapm_resolv_addr_cmd_handler(), gapm_set_dev_config_cmd_handler(), gapm_set_dev_name_handler(), gapm_start_adv_cmd_handler(), gapm_start_connection_cmd_handler(), gapm_start_scan_cmd_handler(), gapm_white_list_mgm_cmd(), gattc_disc_cmd_handler(), gattc_execute_write_cmd_handler(), gattc_mtu_cmd_handler(), gattc_read_cmd_handler_by_uuid(), gattc_read_cmd_handler_multible(), gattc_read_cmd_handler_simple_read(), gattc_reg_to_peer_handler(), gattc_send_evt_cmd_handler(), gattc_svc_changed_notification_cmd_handler(), gattc_write_cmd_handler(), gattc_write_cmd_ind(), gattc_write_cmd_ind_handler(), gattm_add_attribute_req_handler(), gattm_add_svc_req_handler(), gattm_att_get_value_req_handler(), gattm_att_set_value_req_handler(), wifiprov_configure_provisioning(), wifiprov_create_db(), wifiprov_disable(), wifiprov_scan_list_ind_send(), wifiprov_scan_mode_change_ind_send(), wifiprov_start(), and wifiprov_wifi_con_update().

#define INTERFACE_MSG_INIT (   msg_id,
  dest_id 
)
Value:
do{\
uint8_t* __ptr = interface_send_msg;\
/*uint16_t __len;*/\
*__ptr++ = (INTERFACE_API_PKT_ID);\
*__ptr++ = ((msg_id) & 0x00FF );\
*__ptr++ = (((msg_id)>>8) & 0x00FF );\
*__ptr++ = ((dest_id) & 0x00FF );\
*__ptr++ = (((dest_id)>>8) & 0x00FF );\
*__ptr++ = ((TASK_EXTERN) & 0x00FF );\
*__ptr++ = (((TASK_EXTERN)>>8) & 0x00FF );\
__ptr += 2
#define TASK_EXTERN
Definition: cmn_defs.h:38
#define INTERFACE_API_PKT_ID
Definition: interface.h:32
uint8_t interface_send_msg[INTERFACE_SEND_BUF_MAX]
Definition: interface.c:29

Referenced by dbg_le_get_bd_addr_req_handler(), dbg_le_set_bd_addr_req_handler(), dbg_rd_mem_req_handler(), dbg_rd_mem_req_handler32(), dbg_set_tx_pw_req_handler(), dbg_wr_mem_req_handler(), dbg_wr_mem_req_handler32(), dbg_wr_mem_req_handler32_reset(), gapc_bond_cfm_handler_key_exch(), gapc_bond_cfm_handler_pair_resp(), gapc_bond_cmd_handler(), gapc_connection_cfm_handler(), gapc_disconnect_cmd_handler(), gapc_encrypt_cfm_handler(), gapc_encrypt_cmd_handler(), gapc_get_info_cmd_handler(), gapc_get_tx_pwr_req_handler(), gapc_key_exch(), gapc_param_update_cfm_handler(), gapc_param_update_cmd_handler(), gapc_security_cmd_handler(), gapc_set_tx_pwr_req_handler(), gapm_cancel_cmd_handler(), gapm_connection_cfm_handler(), gapm_reset_req_handler(), gapm_resolv_addr_cmd_handler(), gapm_set_dev_config_cmd_handler(), gapm_set_dev_name_handler(), gapm_start_adv_cmd_handler(), gapm_start_connection_cmd_handler(), gapm_start_scan_cmd_handler(), gapm_white_list_mgm_cmd(), gattc_disc_cmd_handler(), gattc_execute_write_cmd_handler(), gattc_mtu_cmd_handler(), gattc_read_cmd_handler_by_uuid(), gattc_read_cmd_handler_multible(), gattc_read_cmd_handler_simple_read(), gattc_reg_to_peer_handler(), gattc_send_evt_cmd_handler(), gattc_svc_changed_notification_cmd_handler(), gattc_write_cmd_handler(), gattc_write_cmd_ind(), gattc_write_cmd_ind_handler(), gattm_add_attribute_req_handler(), gattm_add_svc_req_handler(), gattm_att_get_value_req_handler(), gattm_att_set_value_req_handler(), wifiprov_configure_provisioning(), wifiprov_create_db(), wifiprov_disable(), wifiprov_scan_list_ind_send(), wifiprov_scan_mode_change_ind_send(), wifiprov_start(), and wifiprov_wifi_con_update().

#define INTERFACE_PACK_ARG_DUMMY (   len)    __ptr += len
#define INTERFACE_PACK_ARG_UINT32 (   arg)
Value:
*__ptr++ = (uint8_t)((arg) & 0x00FF );\
*__ptr++ = (uint8_t)(( (arg) >> 8) & 0x00FF) ;\
*__ptr++ = (uint8_t)(( (arg) >> 16) & 0x00FF);\
*__ptr++ = (uint8_t)(( (arg) >> 24) & 0x00FF)

Referenced by dbg_rd_mem_req_handler(), dbg_rd_mem_req_handler32(), dbg_wr_mem_req_handler(), dbg_wr_mem_req_handler32(), dbg_wr_mem_req_handler32_reset(), and gapc_connection_cfm_handler().

#define INTERFACE_PACK_ARG_UINT8 (   arg)    *__ptr++ = (arg)
#define INTERFACE_PACK_LEN ( )
Value:
interface_send_msg[7] = ((__len) & 0x00FF );\
interface_send_msg[8] = (((__len)>>8) & 0x00FF);\
#define INTERFACE_HDR_LENGTH
Definition: interface.h:30
uint8_t interface_send_msg[INTERFACE_SEND_BUF_MAX]
Definition: interface.c:29
#define INTERFACE_RCV_BUFF_LEN   500
#define INTERFACE_SEND_BUF_MAX   600
#define INTERFACE_UNPACK_UINT32 (   ptr)
Value:
*ptr = (uint32_t)__ptr[0] \
| ((uint32_t)__ptr[1] << 8) \
| ((uint32_t)__ptr[2] << 16)\
| ((uint32_t)__ptr[3] << 24);\
__ptr += 4
ptr
Definition: wireless/SmartConnect_6LoWPAN/apps/ip64-webserver/httpd.c:236

at_ble_status_t interface_send ( uint8_t *  msg,
uint16_t  u16TxLen 
)
at_ble_status_t interface_send_wait ( uint8_t *  msg,
uint16_t  u16TxLen,
uint16_t  msg_id,
uint16_t  src_id,
uint8_t **  rsp 
)

uint8_t interface_send_msg[INTERFACE_SEND_BUF_MAX]