📄 sppsend.lst
字号:
C51 COMPILER V7.06 SPPSEND 04/13/2005 12:55:52 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE SPPSEND
OBJECT MODULE PLACED IN sppSend.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE sppSend.c OMF2 BROWSE INCDIR(..\..\..\..\Include;..\..\..\..\lib) DEFINE(FR
-EQ433) DEBUG
stmt level source
1 /*****************************************************************************
2 * *
3 * ********** *
4 * ************ *
5 * *** *** *
6 * *** +++ *** *
7 * *** + + *** *
8 * *** + CHIPCON CC1010 *
9 * *** + + *** CUL - spp *
10 * *** +++ *** *
11 * *** *** *
12 * *********** *
13 * ********* *
14 * *
15 *****************************************************************************
16 * *
17 *****************************************************************************
18 * Author: JOL *
19 *****************************************************************************
20 * Revision history: *
21 * *
22 * $Log: sppSend.c,v $
23 * Revision 1.2 2002/11/21 10:50:11 tos
24 * Cosmetic change: corrected inconsistent header text.
25 *
26 * Revision 1.1 2002/10/14 12:27:34 tos
27 * Initial version in CVS.
28 *
29 * *
30 ****************************************************************************/
31
32 #include <chipcon/sppInternal.h>
33
34 //----------------------------------------------------------------------------
35 // byte sppSend (SPP_TX_INFO xdata *pTXInfo)
36 //
37 // Description:
38 // If the transceiver is ready (in idle mode), the transmit section will
39 // be powered up and the RF interrupt enabled. The RF ISR will then
40 // transmit the packet (pTXInfo) and receive the ack (if requested). If
41 // requested (sppSettings.txAttempts = n), the packet will be re-
42 // transmitted (n-1) times, until the ack is received. When finished the
43 // transmit section will be powered down.
44 //
45 // This function will return immediately and the application can
46 // continue while the ISR transmits the packet. When finished,
47 // sppStatus() will return IDLE_MODE. During the transmission it will
48 // return TX_MODE or TXACK_MODE.
49 //
50 // After the transmission: Use pTXInfo->status to find out what happened:
51 // SPP_TX_ACK_INVALID = Something was received, but not the ack
52 // SPP_TX_ACK_TIMEOUT = No response
53 // SPP_TX_FINISHED
54 //
C51 COMPILER V7.06 SPPSEND 04/13/2005 12:55:52 PAGE 2
55 // sppSettings.txAckTimeout gives the ack timeout in msecs.
56 //
57 // Arguments:
58 // SPP_TX_INFO xdata *pTXInfo
59 // An SPP_TX_INFO struct must be prepared before the transmission,
60 // including the following values:
61 // destination (SPP_BROADCAST or 1-255)
62 // flags (SPP_ACK_REQ | SPP_ENCRYPTED_DATA)
63 // dataLen (Length of *pDataBuffer, 0-255)
64 // pDataBuffer (pointer to the transmission data buffer)
65 //
66 // Return value:
67 // byte
68 // SPP_TX_STARTED if OK
69 // SPP_BUSY if not ready
70 //----------------------------------------------------------------------------
71 byte sppSend (SPP_TX_INFO xdata *pTXInfo) {
72 1
73 1 // Begin transmission only if we're in the idle state
74 1 INT_GLOBAL_ENABLE (INT_OFF);
75 1 if (sppIntData.mode == SPP_IDLE_MODE) {
76 2
77 2 // Initialize the fsm
78 2 sppRFStateFunc = TX_START;
79 2 sppIntData.mode = SPP_TX_MODE;
80 2 sppIntData.pTXI = pTXInfo;
81 2 sppIntData.usedTxAttempts = 0;
82 2 INT_GLOBAL_ENABLE (INT_ON);
83 2
84 2 // Enable transceiver interrupt and enter the FSM
85 2 INT_SETFLAG (INUM_RF, INT_CLR);
86 2 INT_PRIORITY (INUM_RF, INT_HIGH);
87 2 INT_ENABLE (INUM_RF, INT_ON);
88 2
89 2 // Start TX
90 2 SPP_POWER_UP_TX();
91 2
92 2 return SPP_TX_STARTED;
93 2 } else {
94 2 INT_GLOBAL_ENABLE (INT_ON);
95 2 return SPP_BUSY;
96 2 }
97 1 } // sppSend
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 85 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----
XDATA CONST SIZE = ---- ----
FAR CONST SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -