|
@@ -126,9 +126,6 @@ enum {
|
126
|
126
|
#define CC2500_LQI_CRC_OK_BM 0x80
|
127
|
127
|
#define CC2500_LQI_EST_BM 0x7F
|
128
|
128
|
|
129
|
|
-void cc2500ReadFifo(uint8_t *dpbuffer, int len);
|
130
|
|
-void cc2500WriteFifo(uint8_t *dpbuffer, uint8_t len);
|
131
|
|
-
|
132
|
129
|
void cc2500ReadRegisterMulti(uint8_t address, uint8_t data[], uint8_t length);
|
133
|
130
|
void cc2500WriteRegisterMulti(uint8_t address, const uint8_t data[], uint8_t length);
|
134
|
131
|
|
|
@@ -138,5 +135,15 @@ void cc2500WriteReg(uint8_t address, uint8_t data);
|
138
|
135
|
void cc2500Strobe(uint8_t address);
|
139
|
136
|
void cc2500ResetChip(void);
|
140
|
137
|
|
|
138
|
+inline void cc2500ReadFifo(uint8_t *dpbuffer, int len) {
|
|
139
|
+ cc2500ReadRegisterMulti(CC2500_3F_RXFIFO | CC2500_READ_BURST, dpbuffer, len);
|
|
140
|
+}
|
|
141
|
+
|
|
142
|
+inline void cc2500WriteFifo(uint8_t *dpbuffer, uint8_t len) {
|
|
143
|
+ cc2500Strobe(CC2500_SFTX); // 0x3B
|
|
144
|
+ cc2500WriteRegisterMulti(CC2500_3F_TXFIFO, dpbuffer, len);
|
|
145
|
+ cc2500Strobe(CC2500_STX); // 0x35
|
|
146
|
+}
|
|
147
|
+
|
141
|
148
|
#endif
|
142
|
149
|
|