SZSPTP ez430-RF2480 1.0

ZigBee Sensor Network with synchronized time and time-stamped measurements.
CC2480 application interface

Commands to interact with the CC2480 application interface. More...

+ Collaboration diagram for CC2480 application interface:

Modules

 Defines
 
 System Interface
 
 Configuration interface
 
 Simple API interface
 
 AF interface
 
 ZDO interface
 

Files

file  cc2480ai.c
 Implementation to use CC2480 application interface commands.
 
file  cc2480ai.h
 CC2480 interface.
 

Typedefs

typedef enum ccai_devStates_t ccai_devStates_t
 From ZASA, file cc2480.h. This is not documented on swra175a.pdf.
 

Enumerations

enum  ccai_devStates_t {
  CCAI_DEV_HOLD, CCAI_DEV_INIT, CCAI_CCAI_DEV_NWK_DISC, CCAI_DEV_NWK_JOINING,
  CCAI_DEV_NWK_REJOIN, CCAI_DEV_END_DEVICE_UNAUTH, CCAI_DEV_END_DEVICE, CCAI_DEV_ROUTER,
  CCAI_DEV_COORD_STARTING, CCAI_DEV_ZB_COORD, CCAI_DEV_NWK_ORPHAN
}
 From ZASA, file cc2480.h. This is not documented on swra175a.pdf. More...
 

Functions

void ccai_init ()
 This function initializes the CC2480 Application Interface variables. More...
 
UInt16 ccai_proccess ()
 This function processes the tasks of the CC2480 Application Interface. More...
 
void ccai_process_message ()
 Proccess a received message. More...
 
void ccai_resetFull ()
 Full reset. More...
 
void ccai_resetLight ()
 Reset. More...
 

Detailed Description

Commands to interact with the CC2480 application interface.

This implementation is not complete, it lacks the AF and ZDO interfaces. The needed functions exists here, but they do nothing on this version.

Enumeration Type Documentation

From ZASA, file cc2480.h. This is not documented on swra175a.pdf.

Enumerator
CCAI_DEV_HOLD 

Initialized - not started automatically.

CCAI_DEV_INIT 

Initialized - not connected to anything.

CCAI_CCAI_DEV_NWK_DISC 

Discovering PAN's to join.

CCAI_DEV_NWK_JOINING 

Joining a PAN.

CCAI_DEV_NWK_REJOIN 

ReJoining a PAN, only for end devices.

CCAI_DEV_END_DEVICE_UNAUTH 

Joined but not yet authenticated by trust center.

CCAI_DEV_END_DEVICE 

Started as device after authentication.

CCAI_DEV_ROUTER 

Device joined, authenticated and is a router.

CCAI_DEV_COORD_STARTING 

Started as ZigBee Coordinator.

CCAI_DEV_ZB_COORD 

Started as ZigBee Coordinator.

CCAI_DEV_NWK_ORPHAN 

Device has lost information about its parent..

Definition at line 672 of file cc2480ai.h.

Function Documentation

void ccai_init ( )

This function initializes the CC2480 Application Interface variables.

Configures signals cfg 0 and cfg1 and set state to CCAI_S_INIT.

Definition at line 557 of file cc2480ai.c.

References ccai_currentState, and CCAI_S_INIT.

Referenced by main().

+ Here is the caller graph for this function:

UInt16 ccai_proccess ( )

This function processes the tasks of the CC2480 Application Interface.

The main purpose is to correctly configure CC2480 during the initialization, then just monitor for the state, once per second, in case it changes from idle.

Returns
Time to run again (ms); 0 means 65536ms.

Definition at line 573 of file cc2480ai.c.

References ccai_currentState, CCAI_S_DORESET, CCAI_S_INIT, CCAI_S_POWERUPHOLD, CCAI_S_POWERUPWAIT, CCAI_S_RESETHOLD, CCAI_S_RESETWAIT, CCAI_S_RUNNING, and spi_init().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ccai_process_message ( )

Proccess a received message.

This function forward the received message to the proper function. The destination function is chosen based on the command field of the message.

Definition at line 639 of file cc2480ai.c.

References CCAI_MSGP_AF_DATA_CONFIRM, CCAI_MSGP_AF_INCOMING_MSG, CCAI_MSGP_SYS_OSAL_TIMER_EXPIRED, CCAI_MSGP_SYS_RESET_IND_CMD, CCAI_MSGP_ZB_ALLOW_BIND_CONFIRM, CCAI_MSGP_ZB_BIND_CONFIRM, CCAI_MSGP_ZB_FIND_DEVICE_CONFIRM, CCAI_MSGP_ZB_RECEIVE_DATA_INDICATION, CCAI_MSGP_ZB_SEND_DATA_CONFIRM, CCAI_MSGP_ZB_START_CONFIRM, CCAI_MSGP_ZDO_ACTIVE_EP_RSP, CCAI_MSGP_ZDO_BIND_RSP, CCAI_MSGP_ZDO_END_DEVICE_ANNCE_IND, CCAI_MSGP_ZDO_END_DEVICE_BIND_RSP, CCAI_MSGP_ZDO_IEEE_ADDR_RSP, CCAI_MSGP_ZDO_MATCH_DESC_RSP, CCAI_MSGP_ZDO_MATCH_DESC_RSP_SENT, CCAI_MSGP_ZDO_MGMT_LEAVE_RSP, CCAI_MSGP_ZDO_MGMT_LQI_RSP, CCAI_MSGP_ZDO_MGMT_PERMIT_JOIN_RSP, CCAI_MSGP_ZDO_NODE_DESC_RSP, CCAI_MSGP_ZDO_NWK_ADDR_RSP, CCAI_MSGP_ZDO_SIMPLE_DESC_RSP, CCAI_MSGP_ZDO_STATE_CHANGE_IND, CCAI_MSGP_ZDO_UNBIND_RSP, CCAI_MSGP_ZDO_USER_DESC_CONF, CCAI_MSGP_ZDO_USER_DESC_RSP, CCAI_MSGR_AF_DATA_REQUEST, CCAI_MSGR_AF_REGISTER, CCAI_MSGR_SYS_ADC_READ, CCAI_MSGR_SYS_GPIO, CCAI_MSGR_SYS_OSAL_NV_READ, CCAI_MSGR_SYS_OSAL_NV_WRITE, CCAI_MSGR_SYS_OSAL_START_TIMER, CCAI_MSGR_SYS_OSAL_STOP_TIMER, CCAI_MSGR_SYS_RANDOM, CCAI_MSGR_SYS_TEST_LOOPBACK, CCAI_MSGR_SYS_VERION, CCAI_MSGR_ZB_ALLOW_BIND, CCAI_MSGR_ZB_APP_REGISTER_REQUEST, CCAI_MSGR_ZB_BIND_DEVICE, CCAI_MSGR_ZB_FIND_DEVICE_REQUEST, CCAI_MSGR_ZB_GET_DEVICE_INFO, CCAI_MSGR_ZB_PERMIT_JOINING_REQUEST, CCAI_MSGR_ZB_READ_CONFIGURATION, CCAI_MSGR_ZB_SEND_DATA_REQUEST, CCAI_MSGR_ZB_START_REQUEST, CCAI_MSGR_ZB_WRITE_CONFIGURATION, CCAI_MSGR_ZDO_ACTIVE_EP_REQ, CCAI_MSGR_ZDO_BIND_REQ, CCAI_MSGR_ZDO_END_DEVICE_ANNCE, CCAI_MSGR_ZDO_END_DEVICE_BIND_REQ, CCAI_MSGR_ZDO_IEEE_ADDR_REQ, CCAI_MSGR_ZDO_MATCH_DESC_REQ, CCAI_MSGR_ZDO_MGMT_LEAVE_REQ, CCAI_MSGR_ZDO_MGMT_LQI_REQ, CCAI_MSGR_ZDO_MGMT_PERMIT_JOIN_REQ, CCAI_MSGR_ZDO_NODE_DESC_REQ, CCAI_MSGR_ZDO_NWK_ADDR_REQ, CCAI_MSGR_ZDO_SIMPLE_DESC_REQ, CCAI_MSGR_ZDO_UNBIND_REQ, CCAI_MSGR_ZDO_USER_DESC_REQ, CCAI_MSGR_ZDO_USER_DESC_SET, ccai_p_af_data_confirm(), ccai_p_af_incoming_msg(), ccai_p_sys_osal_timer_expired(), ccai_p_sys_reset_ind(), ccai_p_zb_allow_bind_confirm(), ccai_p_zb_bind_confirm(), ccai_p_zb_find_device_confirm(), ccai_p_zb_receive_data_indication(), ccai_p_zb_send_data_confirm(), ccai_p_zb_start_confirm(), ccai_p_zdo_active_ep_rsp(), ccai_p_zdo_bind_rsp(), ccai_p_zdo_end_device_annce_ind(), ccai_p_zdo_end_device_bind_rsp(), ccai_p_zdo_ieee_addr_rsp(), ccai_p_zdo_match_desc_rsp(), ccai_p_zdo_match_desc_rsp_sent(), ccai_p_zdo_mgmt_leave_rsp(), ccai_p_zdo_mgmt_lqi_rsp(), ccai_p_zdo_mgmt_permit_join_rsp(), ccai_p_zdo_node_desc_rsp(), ccai_p_zdo_nwk_addr_rsp(), ccai_p_zdo_simple_desc_rsp(), ccai_p_zdo_state_change_ind(), ccai_p_zdo_unbind_rsp(), ccai_p_zdo_user_desc_conf(), ccai_p_zdo_user_desc_rsp(), ccai_r_af_data_request(), ccai_r_af_register(), ccai_r_sys_adc_read(), ccai_r_sys_gpio(), ccai_r_sys_osal_nv_read(), ccai_r_sys_osal_nv_write(), ccai_r_sys_osal_start_timer(), ccai_r_sys_osal_stop_timer(), ccai_r_sys_random(), ccai_r_sys_test_loopback(), ccai_r_sys_version(), ccai_r_zb_allow_bind(), ccai_r_zb_app_register_request(), ccai_r_zb_bind_device(), ccai_r_zb_find_device_request(), ccai_r_zb_get_device_info(), ccai_r_zb_permit_joining_request(), ccai_r_zb_read_configuration(), ccai_r_zb_send_data_request(), ccai_r_zb_start_request(), ccai_r_zb_write_configuration(), ccai_r_zdo_active_ep_req(), ccai_r_zdo_bind_req(), ccai_r_zdo_end_device_annce(), ccai_r_zdo_end_device_bind_req(), ccai_r_zdo_ieee_addr_req(), ccai_r_zdo_match_desc_req(), ccai_r_zdo_mgmt_leave_req(), ccai_r_zdo_mgmt_lqi_req(), ccai_r_zdo_mgmt_permit_join_req(), ccai_r_zdo_node_desc_req(), ccai_r_zdo_nwk_addr_req(), ccai_r_zdo_simple_desc_req(), ccai_r_zdo_unbind_req(), ccai_r_zdo_user_desc_req(), ccai_r_zdo_user_desc_set(), and spi_buf.

Referenced by spi_process_message().

+ Here is the caller graph for this function:

void ccai_resetFull ( )

Full reset.

This function resets the CC2480 and reconfigures it.

Definition at line 616 of file cc2480ai.c.

References ccai_currentState, and CCAI_S_INIT.

Referenced by nwk_process(), spi_proccess(), and uart_proccessCmd().

+ Here is the caller graph for this function:

void ccai_resetLight ( )

Reset.

This function resets the CC2480, but don't require to reconfigure.

Definition at line 627 of file cc2480ai.c.

References ccai_currentState, and CCAI_S_DORESET.

Referenced by nwk_configureWriteRsp().

+ Here is the caller graph for this function: