摘要: OSAL中断操作:1、允许中断byte osal_int_enable( byte interrupt_id )-- interrupt_id:中断标示符2、禁止中断byte osal_int_disable( byte interrupt_id )-- interrupt_id:中断标示符3、暂停中断HAL_ENTER_CRITICAL_SECTION(x)4、重新启用中断HAL_EXIT_CRITICAL_SECTION(x) OSAL内存操作:1、分配内存void *osal_mem_alloc( uint16 size )-- size:分配缓冲区的大小2、释放内存void osal_ 阅读全文
posted @ 2011-05-31 23:35 雪帕 阅读(1593) 评论(0) 推荐(0) 编辑
摘要: 系统NV区: 初始化nv数据项osal_nv_item_init()读取nv数据项osal_nv_read()写入nv数据项osal_nv_write()在使用osal_nv_read()或osal_nv_write()之前必须调用osal_nv_item_init()。函数原型:uint8 osal_nv_item_init( uint16 id, uint16 len, void *buf )--id: NV项的ID--len: 项的长度-- buf: 初始化项的数据,如果没有设置为NULLuint8 osal_nv_read( uint16 id, uint16 ndx, uint16 阅读全文
posted @ 2011-05-31 23:30 雪帕 阅读(5250) 评论(3) 推荐(1) 编辑
摘要: 一、协调器网络的建立 1、 网络的格式化 A:初始化的能量阀值为16。通过设置ZDApp_event_loop任务中的事件ID为ZDO_NETWORK_INIT以便执行B。 B:调用NLME_NetworkFormationRequest函数进行申请,对申请的回应在程序中没对应的回调处理,猜想回调处理在lib库中处理。在程序找到了两个对申请结果作处理的函数,void ZDO_NetworkFormationConfirmCB( ZStatus_t Status )和void nwk_Status( uint16 statusCode,uint16 statusValue );在两个函数中都有申 阅读全文
posted @ 2011-05-31 23:23 雪帕 阅读(3400) 评论(0) 推荐(0) 编辑