📄 simple_mac.lst
字号:
161 * Function: Set the MC13192 receiver OFF
162 * Parameters: None
163 * Return: status
164 **************************************************************/
165 int MLME_RX_disable_request(void)
166 {
167 1 PLME_disable_MC13192_timer1(); /* In case the timeout is being used, disable it also */
168 1 if (PLME_set_trx_state_request(IDLE_MODE) == SUCCESS) /* Attempt to disable the timer */
169 1 {
170 2 return SUCCESS;
171 2 }
172 1 else
173 1 {
174 2 return ERROR;
175 2 }
176 1 }
177
C51 COMPILER V7.06 SIMPLE_MAC 09/18/2006 21:57:30 PAGE 4
178 /**************************************************************
179 * Function: Set MC13192 CLKo frequency
180 * Parameters: frequency value enumeration (0-7)
181 * Return: status
182 * Notes:
183 * FREQ OUTPUT_FREQ
184 * 0 16MHz (Recommended default)
185 * 1 8MHz
186 * 2 4MHz
187 * 3 2MHz
188 * 4 1MHz
189 * 5 62.5kHz
190 * 6 32.786kHz
191 * 7 16.393kHz
192 **************************************************************/
193 int MLME_set_MC13192_clock_rate(__uint8__ freq)
194 {
195 1 __uint8__ status;
196 1 status = PLME_set_MC13192_clock_rate(freq);
197 1 return status;
198 1 }
199
200 /**************************************************************
201 * Function: Set MC13192 timer frequency
202 * Parameters: frequency value enumeration (0-7)
203 * Return: status
204 * Notes:
205 * FREQ OUTPUT_FREQ
206 * 0 2MHz
207 * 1 1MHz
208 * 2 500kHz
209 * 3 250kHz (Recommended default)
210 * 4 125kHz
211 * 5 62.5kHz
212 * 6 31.25kHz
213 * 7 15.625kHz
214 **************************************************************/
215 int MLME_set_MC13192_tmr_prescale (__uint8__ freq)
216 {
217 1 __uint8__ status;
218 1 status = PLME_set_MC13192_tmr_prescale (freq);
219 1 return status;
220 1 }
221
222 /**************************************************************
223 * Function: Measure channel energy
224 * Parameters: none
225 * Return: energy
226 * Notes:
227 * Actual power returned is: -(power/2)
228 * Global calibration required for accuracy (from MLME_MC13192_FE_gain_adjust).
229 **************************************************************/
230 __uint8__ MLME_energy_detect (void)
231 {
232 1 __uint8__ power;
233 1 power = PLME_energy_detect();
234 1 return power;
235 1 }
236
237 /**************************************************************
238 * Function: Report energy from last successful RX packet
239 * Parameters: none
C51 COMPILER V7.06 SIMPLE_MAC 09/18/2006 21:57:30 PAGE 5
240 * Return: energy
241 * Notes:
242 * Actual power returned is: -(power/2)
243 * Global calibration required for accuracy (from MLME_MC13192_FE_gain_adjust).
244 **************************************************************/
245 __uint8__ MLME_link_quality (void)
246 {
247 1 __uint8__ power;
248 1 power = PLME_link_quality ();
249 1 return power;
250 1 }
251
252 /**************************************************************
253 * Function: Force the MC13192 into a soft reset condition
254 * Parameters: none
255 * Return: status
256 **************************************************************/
257 int MLME_MC13192_soft_reset(void)
258 {
259 1 /* Performs a soft reset of MC13192 via writing to register 0*/
260 1 int status;
261 1 status = PLME_MC13192_soft_reset();
262 1 return status;
263 1 }
264
265 /**************************************************************
266 * Function: Adjust the MC13192s crystal trim value
267 * Parameters: trim value (0-255)
268 * Return: status
269 **************************************************************/
270 int MLME_MC13192_xtal_adjust(__uint8__ req_value)
271 {
272 1 int status;
273 1 status = PLME_MC13192_xtal_adjust(req_value);
274 1 return status;
275 1 }
276
277 /**************************************************************
278 * Function: Adjust the MC13192s gain compensator
279 * Parameters: gain compensation value (0 to 255. 128 is center point)
280 * Return: status
281 **************************************************************/
282 int MLME_MC13192_FE_gain_adjust(__uint8__ gain_value)
283 {
284 1 int status;
285 1 status = PLME_MC13192_FE_gain_adjust(gain_value);
286 1 return status;
287 1 }
288
289 /**************************************************************
290 * Function: Adjust the Output power of the transmitter
291 * Parameters: Course Value
292 * Return: status
293 **************************************************************/
294 int MLME_MC13192_PA_output_adjust(__uint8__ pa_value)
295 {
296 1 int status;
297 1 status = PLME_MC13192_PA_output_adjust(pa_value);
298 1 return status;
299 1 }
300
301 /**************************************************************
C51 COMPILER V7.06 SIMPLE_MAC 09/18/2006 21:57:30 PAGE 6
302 * Function: Reads the version number of the IC
303 * Parameters: none
304 * Return: The version number of the IC.
305 *
306 **************************************************************/
307 __uint8__ MLME_get_rfic_version(void)
308 {
309 1 __uint8__ version;
310 1 version = PLME_get_rfic_version();
311 1 return version;
312 1 }
313
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 176 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 5
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -