simplecontroller.lst
来自「CC2430上开关控制灯和温度传感器采集两个例子」· LST 代码 · 共 801 行 · 第 1/3 页
LST
801 行
\ 000000 74F7 MOV A,#-0x9
\ 000002 12.... LCALL ?BANKED_ENTER_XDATA
\ 000005 ; Saved register size: 9
\ 000005 ; Auto size: 0
207 // If the device sucessfully started, change state to running
208 if ( status == ZB_SUCCESS )
\ 000005 E9 MOV A,R1
\ 000006 7008 JNZ ??zb_StartConfirm_0
209 {
210 myAppState = APP_START;
\ 000008 7401 MOV A,#0x1
\ 00000A 90.... MOV DPTR,#??myAppState
\ 00000D F0 MOVX @DPTR,A
\ 00000E 8013 SJMP ??zb_StartConfirm_1
211 }
212 else
213 {
214 // Try again later with a delay
215 osal_start_timer( MY_START_EVT, myStartRetryDelay );
\ ??zb_StartConfirm_0:
\ 000010 ; Setup parameters for call to function osal_start_timer
\ 000010 90.... MOV DPTR,#??myStartRetryDelay
\ 000013 E0 MOVX A,@DPTR
\ 000014 FC MOV R4,A
\ 000015 7D00 MOV R5,#0x0
\ 000017 7A01 MOV R2,#0x1
\ 000019 7B00 MOV R3,#0x0
\ 00001B 90.... MOV DPTR,#(osal_start_timer & 0xffff)
\ 00001E 74.. MOV A,#((osal_start_timer >> 16) & 0xff)
\ 000020 12.... LCALL ?BCALL ; Banked call to: DPTR()
216 }
217 }
\ ??zb_StartConfirm_1:
\ 000023 80.. SJMP ?Subroutine1
218
219 /******************************************************************************
220 * @fn zb_SendDataConfirm
221 *
222 * @brief The zb_SendDataConfirm callback function is called by the
223 * ZigBee after a send data operation completes
224 *
225 * @param handle - The handle identifying the data transmission.
226 * status - The status of the operation.
227 *
228 * @return none
229 */
\ In segment BANKED_CODE, align 1, keep-with-next
230 void zb_SendDataConfirm( uint8 handle, uint8 status )
\ zb_SendDataConfirm:
231 {
\ 000000 ; Saved register size: 0
\ 000000 ; Auto size: 0
232 }
\ 000000 02.... LJMP ?BRET
233
234 /******************************************************************************
235 * @fn zb_BindConfirm
236 *
237 * @brief The zb_BindConfirm callback is called by the ZigBee stack
238 * after a bind operation completes.
239 *
240 * @param commandId - The command ID of the binding being confirmed.
241 * status - The status of the bind operation.
242 *
243 * @return none
244 */
\ In segment BANKED_CODE, align 1, keep-with-next
245 void zb_BindConfirm( uint16 commandId, uint8 status )
\ zb_BindConfirm:
246 {
\ 000000 ; Saved register size: 0
\ 000000 ; Auto size: 0
247 }
\ 000000 02.... LJMP ?BRET
248 /******************************************************************************
249 * @fn zb_AllowBindConfirm
250 *
251 * @brief Indicates when another device attempted to bind to this device
252 *
253 * @param
254 *
255 * @return none
256 */
\ In segment BANKED_CODE, align 1, keep-with-next
257 void zb_AllowBindConfirm( uint16 source )
\ zb_AllowBindConfirm:
258 {
\ 000000 C082 PUSH DPL
\ 000002 C083 PUSH DPH
\ 000004 ; Saved register size: 2
\ 000004 ; Auto size: 0
259 // Flash LED
260 HalLedSet( HAL_LED_1, HAL_LED_MODE_BLINK );
\ 000004 ; Setup parameters for call to function HalLedSet
\ 000004 7A02 MOV R2,#0x2
\ 000006 7901 MOV R1,#0x1
\ 000008 90.... MOV DPTR,#(HalLedSet & 0xffff)
\ 00000B 74.. MOV A,#((HalLedSet >> 16) & 0xff)
\ 00000D 12.... LCALL ?BCALL ; Banked call to: DPTR()
261 }
\ 000010 REQUIRE ?Subroutine2
\ 000010 ; // Fall through to label ?Subroutine2
\ In segment BANKED_CODE, align 1, keep-with-next
\ ?Subroutine2:
\ 000000 D083 POP DPH
\ 000002 D082 POP DPL
\ 000004 02.... LJMP ?BRET
262 /******************************************************************************
263 * @fn zb_FindDeviceConfirm
264 *
265 * @brief The zb_FindDeviceConfirm callback function is called by the
266 * ZigBee stack when a find device operation completes.
267 *
268 * @param searchType - The type of search that was performed.
269 * searchKey - Value that the search was executed on.
270 * result - The result of the search.
271 *
272 * @return none
273 */
\ In segment BANKED_CODE, align 1, keep-with-next
274 void zb_FindDeviceConfirm( uint8 searchType, uint8 *searchKey, uint8 *result )
\ zb_FindDeviceConfirm:
275 {
\ 000000 ; Saved register size: 0
\ 000000 ; Auto size: 0
276 }
\ 000000 02.... LJMP ?BRET
277
278 /******************************************************************************
279 * @fn zb_ReceiveDataIndication
280 *
281 * @brief The zb_ReceiveDataIndication callback function is called
282 * asynchronously by the ZigBee stack to notify the application
283 * when data is received from a peer device.
284 *
285 * @param source - The short address of the peer device that sent the data
286 * command - The commandId associated with the data
287 * len - The number of bytes in the pData parameter
288 * pData - The data sent by the peer device
289 *
290 * @return none
291 */
\ In segment BANKED_CODE, align 1, keep-with-next
292 void zb_ReceiveDataIndication( uint16 source, uint16 command, uint16 len, uint8 *pData )
\ zb_ReceiveDataIndication:
293 {
\ 000000 C082 PUSH DPL
\ 000002 C083 PUSH DPH
\ 000004 ; Saved register size: 2
\ 000004 ; Auto size: 0
294 if (command == TOGGLE_LIGHT_CMD_ID)
\ 000004 7401 MOV A,#0x1
\ 000006 6C XRL A,R4
\ 000007 7001 JNZ ??zb_ReceiveDataIndication_0
\ 000009 ED MOV A,R5
\ ??zb_ReceiveDataIndication_0:
\ 00000A 700C JNZ ??zb_ReceiveDataIndication_1
295 {
296 // Received application command to toggle the LED
297 HalLedSet(HAL_LED_1, HAL_LED_MODE_TOGGLE);
\ 00000C ; Setup parameters for call to function HalLedSet
\ 00000C 7A08 MOV R2,#0x8
\ 00000E 7901 MOV R1,#0x1
\ 000010 90.... MOV DPTR,#(HalLedSet & 0xffff)
\ 000013 74.. MOV A,#((HalLedSet >> 16) & 0xff)
\ 000015 12.... LCALL ?BCALL ; Banked call to: DPTR()
298 }
299 }
\ ??zb_ReceiveDataIndication_1:
\ 000018 80.. SJMP ?Subroutine2
\ In segment XDATA_ID, align 1, keep-with-next
\ `?<Initializer for myStartRetryDelay>`:
\ 000000 0A DB 10
\ In segment XDATA_ID, align 1, keep-with-next
\ `?<Initializer for myAllowBindTimeout>`:
\ 000000 0A DB 10
\ In segment XDATA_ID, align 1, keep-with-next
\ `?<Initializer for zb_InCmdList>`:
\ 000000 0100 DW 1
\ In segment XDATA_ID, align 1, keep-with-next
\ `?<Initializer for zb_SimpleDesc>`:
\ 000000 02 DB 2
\ 000001 100F0200 DW 3856, 2
\ 000005 0101 DB 1, 1
\ 000007 .... DW zb_InCmdList
\ 000009 00 DB 0
\ 00000A 0000 DW 0H
Maximum stack usage in bytes:
Function ISTACK PSTACK XSTACK
-------- ------ ------ ------
zb_AllowBindConfirm 2 0 0
-> HalLedSet 4 0 0
zb_BindConfirm 0 0 0
zb_FindDeviceConfirm 0 0 0
zb_HandleKeys 1 0 11
-> zb_ReadConfiguration 0 0 22
-> zb_WriteConfiguration 0 0 22
-> zb_ReadConfiguration 0 0 22
-> zb_WriteConfiguration 0 0 22
-> zb_SystemReset 0 0 22
-> zb_AllowBind 0 0 22
-> zb_ReadConfiguration 0 0 22
-> zb_WriteConfiguration 0 0 22
-> zb_ReadConfiguration 0 0 22
-> zb_WriteConfiguration 0 0 22
-> zb_SystemReset 0 0 22
zb_HandleOsalEvent 0 0 0
zb_ReceiveDataIndication 2 0 4
-> HalLedSet 4 0 0
zb_SendDataConfirm 0 0 0
zb_StartConfirm 0 0 9
-> osal_start_timer 0 0 18
Segment part sizes:
Function/Label Bytes
-------------- -----
myAppState 1
myStartRetryDelay 1
myAllowBindTimeout 1
zb_InCmdList 2
zb_SimpleDesc 12
zb_HandleOsalEvent 3
zb_HandleKeys 239
?Subroutine1 5
?Subroutine0 17
zb_StartConfirm 37
zb_SendDataConfirm 3
zb_BindConfirm 3
zb_AllowBindConfirm 16
?Subroutine2 7
zb_FindDeviceConfirm 3
zb_ReceiveDataIndication 26
?<Initializer for myStartRetryDelay>
1
?<Initializer for myAllowBindTimeout>
1
?<Initializer for zb_InCmdList>
2
?<Initializer for zb_SimpleDesc>
12
359 bytes in segment BANKED_CODE
16 bytes in segment XDATA_I
16 bytes in segment XDATA_ID
1 byte in segment XDATA_Z
375 bytes of CODE memory
17 bytes of XDATA memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?