67 #define CCAI_ZP_NV_APP_ITEM_1 0x0300
71 #define CCAI_ZP_NV_APP_ITEM_2 0x0301
75 #define CCAI_ZP_NV_APP_ITEM_3 0x0302
79 #define CCAI_ZP_NV_APP_ITEM_4 0x0303
83 #define CCAI_ZP_NV_APP_ITEM_5 0x0304
87 #define CCAI_ZP_NV_APP_ITEM_6 0x0305
101 #define CCAI_ADC_AIN0 0x06
105 #define CCAI_ADC_AIN1 0x07
109 #define CCAI_ADC_AIN0_1_DIFERENTIAL 0x0B
113 #define CCAI_ADC_TEMPERATURE_SENSOR 0x0E
117 #define CCAI_ADC_VOLTAGE_READING 0x0F
131 #define CCAI_ADC_7_BIT 0x00
135 #define CCAI_ADC_9_BIT 0x01
139 #define CCAI_ADC_10_BIT 0x02
143 #define CCAI_ADC_12_BIT 0x03
157 #define CCAI_GPIO_SETDIRECTION 0x00
162 #define CCAI_GPIO_SETINPUTMODE 0x01
166 #define CCAI_GPIO_SET 0x02
170 #define CCAI_GPIO_CLEAR 0x03
174 #define CCAI_GPIO_TOGGLE 0x04
178 #define CCAI_GPIO_READ 0x05
193 #define CCAI_GPIO_BIT0 0x01
197 #define CCAI_GPIO_BIT1 0x02
201 #define CCAI_GPIO_BIT2 0x10
205 #define CCAI_GPIO_BIT3 0x20
219 #define CCAI_TESTRF_MODE_UNMODULATED 0X00
223 #define CCAI_TESTRF_MODE_RANDOMDATA 0X00
227 #define CCAI_TESTRF_MODE_RECEIVEMODE 0X00
241 #define CCAI_TESTRF_PWR_P006 0xFF
245 #define CCAI_TESTRF_PWR_P005 0xDF
249 #define CCAI_TESTRF_PWR_P003 0xBF
253 #define CCAI_TESTRF_PWR_P002 0x9F
257 #define CCAI_TESTRF_PWR_N001 0x7F
261 #define CCAI_TESTRF_PWR_N004 0x5F
265 #define CCAI_TESTRF_PWR_N009 0x3F
269 #define CCAI_TESTRF_PWR_N015 0x1F
273 #define CCAI_TESTRF_PWR_N027 0x1B
277 #define CCAI_TESTRF_PWR_N040 0x17
281 #define CCAI_TESTRF_PWR_N057 0x13
285 #define CCAI_TESTRF_PWR_N079 0x0F
289 #define CCAI_TESTRF_PWR_N108 0x0B
293 #define CCAI_TESTRF_PWR_N154 0x07
297 #define CCAI_TESTRF_PWR_N186 0x06
301 #define CCAI_TESTRF_PWR_N252 0x03
321 #define CCAI_CFGD_ZCD_NV_STARTUP_OPTION 0x03
332 #define CCAI_CFGD_BIT_STARTOPT_CLEAR_CONFIG 1
336 #define CCAI_CFGD_BIT_STARTOPT_CLEAR_STATE 2
342 #define CCAI_CFGD_BIT_STARTOPT_AUTO_START 4
350 #define CCAI_CFGD_ZCD_NV_LOGICAL_TYPE 0x87
361 #define CCAI_CFGD_LOGICAL_TYPE_COORDINATOR 0
365 #define CCAI_CFGD_LOGICAL_TYPE_ROUTER 1
369 #define CCAI_CFGD_LOGICAL_TYPE_ENDDEVICE 2
377 #define CCAI_CFGD_ZCD_NV_POLL_RATE 0x24
382 #define CCAI_CFGD_ZCD_NV_QUEUED_POLL_RATE 0x25
386 #define CCAI_CFGD_ZCD_NV_RESPONSE_POLL_RATE 0x26
390 #define CCAI_CFGD_ZCD_NV_POLL_FAILURE_RETRIES 0x29
394 #define CCAI_CFGD_ZCD_NV_INDIRECT_MSG_TIMEOUT 0x2B
398 #define CCAI_CFGD_ZCD_NV_APS_FRAME_RETRIES 0x43
402 #define CCAI_CFGD_ZCD_NV_APS_ACK_WAIT_DURATION 0x44
406 #define CCAI_CFGD_ZCD_NV_BINDING_TIME 0x46
410 #define CCAI_CFGD_ZCD_NV_USERDESC 0x81
424 #define CCAI_CFGN_ZCD_NV_PANID 0x83
428 #define CCAI_CFGN_ZCD_NV_CHANLIST 0x84
432 #define CCAI_CFGN_ZCD_NV_PRECFGKEY 0x62
436 #define CCAI_CFGN_ZCD_NV_PRECFGKEYS_ENABLE 0x63
440 #define CCAI_CFGN_ZCD_NV_SECURITY_MODE 0x64
444 #define CCAI_CFGN_ZCD_NV_BCAST_RETRIES 0x2E
448 #define CCAI_CFGN_ZCD_NV_PASSIVE_ACK_TIMEOUT 0x2F
452 #define CCAI_CFGN_ZCD_NV_BCAST_DELIVERY_TIME 0x30
456 #define CCAI_CFGN_ZCD_NV_ROUTE_EXPIRY_TIME 0x2C
472 #define CCAI_INFO_STATE 0
476 #define CCAI_INFO_IEEEADDRESS 1
480 #define CCAI_INFO_SHORTADDRESS 2
484 #define CCAI_INFO_PARENTSHORTADDRESS 3
488 #define CCAI_INFO_PARENTIEEEADDRESS 4
492 #define CCAI_INFO_ZBCHANNEL 5
496 #define CCAI_INFO_ZBPANID 6
500 #define CCAI_INFO_ZBEXTENDEDPANID 7
514 #define CCAI_STA_ZSUCCESS 0x00
518 #define CCAI_STA_ZFAILURE 0x01
522 #define CCAI_STA_ZINVALIDPARAMETER 0x02
526 #define CCAI_STA_ZMEMERROR 0x10
530 #define CCAI_STA_ZBUFFERFULL 0x11
534 #define CCAI_STA_ZUNSUPPORTEDMODE 0x12
538 #define CCAI_STA_ZUNSUPPORTEDMODE 0x12
542 #define CCAI_STA_ZMACMEMERROR 0x13
546 #define CCAI_STA_ZSECNOKEY 0xA1
550 #define CCAI_STA_ZSECMAXFRMCOUNT 0xA3
554 #define CCAI_STA_ZDOINVALIDREQUESTTYPE 0x80
558 #define CCAI_STA_ZDOINVALIDENDPOINT 0x82
562 #define CCAI_STA_ZDOUNSUPPORTED 0x84
566 #define CCAI_STA_ZDOTIMEOUT 0x85
570 #define CCAI_STA_ZDONOMATCH 0x86
574 #define CCAI_STA_ZDOTABLEFULL 0x87
578 #define CCAI_STA_ZDONOBINDENTRY 0x88
582 #define CCAI_STA_ZAPSFAIL 0xB1
586 #define CCAI_STA_ZAPSTABLEFULL 0xB2
590 #define CCAI_STA_ZAPSILLEGALREQUEST 0xB3
594 #define CCAI_STA_ZAPSINVALIDBINDING 0xB4
598 #define CCAI_STA_ZAPSUNSUPPORTEDATTRIB 0xB5
602 #define CCAI_STA_ZAPSNOTSUPPORTED 0xB6
606 #define CCAI_STA_ZAPSNOACK 0xB7
610 #define CCAI_STA_ZAPSDUPLICATEENTRY 0xB8
614 #define CCAI_STA_ZAPSNOBOUNDDEVICE 0xB9
618 #define CCAI_STA_ZNWKINVALIDPARAM 0xC1
622 #define CCAI_STA_ZNWKINVALIDREQUEST 0xC2
626 #define CCAI_STA_ZNWKNOTPERMITTED 0xC3
630 #define CCAI_STA_ZNWKSTARTUPFAILURE 0xC4
634 #define CCAI_STA_ZNWKTABLEFULL 0xC7
638 #define CCAI_STA_ZNWKUNKNOWNDEVICE 0xC8
642 #define CCAI_STA_ZNWKUNSUPPORTEDATTRIBUTE 0xC9
646 #define CCAI_STA_ZNWKNONETWORKS 0xCA
650 #define CCAI_STA_ZNWKLEAVEUNCONFIRMED 0xCB
654 #define CCAI_STA_ZNWKNOACK 0xCC
658 #define CCAI_STA_ZNWKNOROUTE 0xCD
732 UInt16 DeviCeId, UInt8 DeviceVersion, UInt8 inputCommandsNum,
733 char *InputCommandsList, UInt8 OutputCommandsNum,
734 char *OutputCommandsList);
738 uint64_t destination);
741 UInt8 handle, UInt8 ack, UInt8 radius, UInt8 len,
void *data);
743 UInt8 handle, UInt8 ack, UInt8 radius, UInt8 len);
UInt8 ccai_s_zdo_nwk_addr_req()
Not implemented.
UInt8 ccai_s_zb_start_request()
Start request.
UInt8 ccai_s_sys_version()
Version request.
UInt8 ccai_s_zdo_user_desc_set()
Not implemented.
UInt8 ccai_s_zdo_user_desc_req()
Not implemented.
Initialized - not connected to anything.
UInt8 ccai_s_zb_find_device_request(uint64_t searchKey)
Find device request.
Discovering PAN's to join.
UInt8 ccai_s_sys_random()
Random request.
UInt8 ccai_s_sys_osal_start_timer(UInt8 id, UInt16 timeout)
Timer start request.
UInt8 ccai_s_zb_bind_device(UInt8 create, UInt16 commandId, uint64_t destination)
Bind device request.
UInt8 ccai_s_zb_send_data_request_payload(UInt8 len, void *pBuf)
Append data to the payload of send data request.
UInt8 ccai_s_zdo_active_ep_req()
Not implemented.
UInt8 ccai_s_sys_osal_stop_timer(UInt8 id)
Stop timer request.
UInt8 ccai_s_zb_allow_bind(UInt8 timeout)
Allow bind request.
UInt8 ccai_s_zdo_end_device_bind_req()
Not implemented.
void ccai_resetFull()
Full reset.
UInt8 ccai_s_zb_get_device_info(UInt8 param)
Get device information request.
ccai_devStates_t
From ZASA, file cc2480.h. This is not documented on swra175a.pdf.
UInt8 ccai_s_zdo_mgmt_leave_req()
Not implemented.
UInt8 ccai_s_zb_send_data_request_begin(UInt16 destination, UInt16 commandId, UInt8 handle, UInt8 ack, UInt8 radius, UInt8 len)
Begin request to send data.
Started as device after authentication.
UInt8 ccai_s_af_register()
Not implemented.
void ccai_resetLight()
Reset.
UInt8 ccai_s_zdo_node_desc_req()
Not implemented.
UInt8 ccai_s_sys_adc_read(UInt8 channel, UInt8 resolution)
Read ADC request.
UInt8 ccai_s_sys_test_loopback(UInt8 len, char *pBuf)
Loopback test request.
UInt8 ccai_s_zdo_end_device_annce()
Not implemented.
Device has lost information about its parent..
UInt8 ccai_s_zdo_simple_desc_req()
Not implemented.
UInt8 ccai_a_sys_reset_req()
Reset Request.
UInt8 ccai_s_sys_osal_nv_write(UInt16 id, UInt8 offset, UInt8 len, char *pBuf)
Write memory request.
UInt8 ccai_s_zdo_bind_req()
Not implemented.
UInt8 ccai_s_sys_osal_nv_read(UInt16 id, UInt8 offset)
Read memory request.
void ccai_process_message()
Proccess a received message.
Started as ZigBee Coordinator.
UInt8 ccai_s_zb_app_register_request(UInt8 appEndPoint, UInt16 appProfileId, UInt16 DeviCeId, UInt8 DeviceVersion, UInt8 inputCommandsNum, char *InputCommandsList, UInt8 OutputCommandsNum, char *OutputCommandsList)
Application register request.
UInt8 ccai_s_sys_gpio(UInt8 operation, UInt8 value)
GPIO access request.
UInt8 ccai_s_zb_read_configuration(UInt8 configId)
Read configuration request.
void ccai_init()
This function initializes the CC2480 Application Interface variables.
Device joined, authenticated and is a router.
UInt8 ccai_s_zdo_unbind_req()
Not implemented.
UInt8 ccai_s_zdo_mgmt_lqi_req()
Not implemented.
Started as ZigBee Coordinator.
UInt8 ccai_s_zdo_mgmt_permit_join_req()
Not implemented.
UInt16 ccai_proccess()
This function processes the tasks of the CC2480 Application Interface.
ReJoining a PAN, only for end devices.
UInt8 ccai_s_zb_write_configuration(UInt8 configId, UInt8 len, void *pBuf)
Write configuration request.
UInt8 ccai_s_zdo_match_desc_req()
Not implemented.
Joined but not yet authenticated by trust center.
UInt8 ccai_s_zdo_ieee_addr_req()
Not implemented.
UInt8 ccai_a_sys_test_rf(UInt8 testMode, UInt16 frequency, UInt8 txPower)
RF test configuration.
UInt8 ccai_s_af_data_request()
Not implemented.
UInt8 ccai_s_zb_permit_joining_request(UInt16 destination, UInt8 timeOut)
Permit join change request.
Initialized - not started automatically.
UInt8 ccai_s_zb_send_data_request(UInt16 destination, UInt16 commandId, UInt8 handle, UInt8 ack, UInt8 radius, UInt8 len, void *data)
Send data request.
void ccai_s_zb_send_data_request_end(UInt8 forwardToSerial)
Terminate the request to send data and send it to CC2480.