📄 radio_esb.lst
字号:
C51 COMPILER V8.08 RADIO_ESB 01/02/2009 11:50:58 PAGE 1
C51 COMPILER V8.08, COMPILATION OF MODULE RADIO_ESB
OBJECT MODULE PLACED IN .\obj\radio_esb.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE esb\radio_esb.c LARGE OMF2 OPTIMIZE(9,SPEED) BROWSE INCDIR(l01_bfb;..\..\..
-\arch\hal\include) DEFINE(nRF24L01__) DEBUG PRINT(.\lst\radio_esb.lst) OBJECT(.\obj\radio_esb.obj)
line level source
1 /* Copyright (c) 2007 Nordic Semiconductor. All Rights Reserved.
2 *
3 * The information contained herein is property of Nordic Semiconductor ASA.
4 * Terms and conditions of usage are described in detail in NORDIC
5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
6 *
7 * Licensees are granted free, non-transferable use of the information. NO
8 * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
9 * the file.
10 *
11 * $LastChangedRevision: 2185 $
12 */
13
14 /** @ingroup ESB
15 * @file
16 * Initialise the radio in Enhanced ShockBurst mode. This is done by opening
17 * @b pipe0 with auto ACK and with auto retransmits.
18 *
19 * @author Per Kristian Schanke
20 */
21
22 #include "hal_nrf.h"
23 #include "radio_esb.h"
24 #include "system.h"
25 #include "radio.h"
26
27 void radio_esb_init (const uint8_t *address, hal_nrf_operation_mode_t operational_mode)
28 {
29 1 hal_nrf_close_pipe(HAL_NRF_ALL); // First close all radio pipes
30 1 // Pipe 0 and 1 open by default
31 1 hal_nrf_open_pipe(HAL_NRF_PIPE0, true); // Then open pipe0, w/autoack
32 1 // Changed from sb/radio_sb.c
33 1
34 1 hal_nrf_set_crc_mode(HAL_NRF_CRC_16BIT); // Operates in 16bits CRC mode
35 1 hal_nrf_set_auto_retr(RF_RETRANSMITS, RF_RETRANS_DELAY);
36 1 // Enables auto retransmit.
37 1 // 3 retrans with 250ms delay
38 1 // Changed from sb/radio_sb.c
39 1
40 1 hal_nrf_set_address_width(HAL_NRF_AW_5BYTES); // 5 bytes address width
41 1 hal_nrf_set_address(HAL_NRF_TX, address); // Set device's addresses
42 1 hal_nrf_set_address(HAL_NRF_PIPE0, address); // Sets recieving address on
43 1 // pipe0
44 1
45 1 if(operational_mode == HAL_NRF_PTX) // Mode depentant settings
46 1 {
47 2 hal_nrf_set_operation_mode(HAL_NRF_PTX); // Enter TX mode
48 2 }
49 1 else
50 1 {
51 2 hal_nrf_set_operation_mode(HAL_NRF_PRX); // Enter RX mode
52 2 hal_nrf_set_rx_pload_width((uint8_t)HAL_NRF_PIPE0, RF_PAYLOAD_LENGTH);
53 2 // Pipe0 expect
54 2 // PAYLOAD_LENGTH byte payload
C51 COMPILER V8.08 RADIO_ESB 01/02/2009 11:50:58 PAGE 2
55 2 // PAYLOAD_LENGTH in radio.h
56 2 }
57 1
58 1 hal_nrf_set_rf_channel(RF_CHANNEL); // Operating on static channel
59 1 // Defined in radio.h.
60 1 // Frequenzy =
61 1 // 2400 + RF_CHANNEL
62 1 hal_nrf_set_power_mode(HAL_NRF_PWR_UP); // Power up device
63 1
64 1 start_timer(RF_POWER_UP_DELAY); // Wait for the radio to
65 1 wait_for_timer(); // power up
66 1
67 1 radio_set_status (RF_IDLE); // Radio now ready
68 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 122 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- 4
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 + -