?? cklf.lst
字號(hào):
C51 COMPILER V7.50 CKLF 04/09/2009 10:12:52 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE CKLF
OBJECT MODULE PLACED IN .\build\cklf.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\..\..\arch\nrf24lu1\cklf.c LARGE OMF2 OPTIMIZE(9,SPEED) BROWSE INCDIR
-(..\common;..\..\..\..\comp\protocol\wdp\common\;..\..\..\..\comp\protocol\wdp\host\;..\..\..\..\arch\hal\include;..\..\
-..\..\arch\hal\nrf24lu1;..\..\..\..\arch\nrf24lu1;..\common;..\..\..\..\comp\protocol\fap) DEBUG PRINT(.\lst\cklf.lst) O
-BJECT(.\build\cklf.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: 2290 $
12 */
13
14 /** @file
15 * Implementation of the CKLF module for nRF24LU1.
16 * @author Ole Saether
17 */
18
19 #include <Nordic\reg24lu1.h>
20 #include "cklf.h"
21
22 static uint16_t wd_cnt;
23
24 void cklf_regxc_write(uint8_t addr, uint16_t val)
25 {
26 1 REGXH = val >> 8;
27 1 REGXL = val & 0xff;
28 1 REGXC = addr;
29 1 }
30
31 uint16_t cklf_regxc_read(uint8_t addr)
32 {
33 1 uint16_t val;
34 1
35 1 REGXC = addr;
36 1 val = (uint16_t)REGXH;
37 1 val <<= 8;
38 1 val |= (uint16_t)REGXL;
39 1 return val;
40 1 }
41
42 void cklf_rtc_disable(void)
43 {
44 1 cklf_regxc_write(WRTCDIS, 0);
45 1 }
46
47 void cklf_rtc_init(uint8_t cnt_h, uint16_t cnt_l)
48 {
49 1 cklf_regxc_write(WRTCDIS, 0); // Disable RTC timer before updating latch
50 1 WUF = 0; // Clear any pending interrupts
51 1 cklf_regxc_write(WGTIMER, (uint16_t)cnt_h); // Program MS part first
52 1 cklf_regxc_write(WRTCLAT, cnt_l); // Write LS part and enable RTC
C51 COMPILER V7.50 CKLF 04/09/2009 10:12:52 PAGE 2
53 1 }
54
55 uint16_t cklf_rtc_read_lsw(void)
56 {
57 1 return cklf_regxc_read(RRTC);
58 1 }
59
60 uint8_t cklf_rtc_read_msb(void)
61 {
62 1 return (uint8_t)(cklf_regxc_read(RGTIMER) >> 8);
63 1 }
64
65 void cklf_rtc_wait(void)
66 {
67 1 while(WUF == 0) // Wait until IEX6 is set
68 1 ;
69 1 WUF = 0;
70 1 }
71
72 void cklf_wdog_init(uint16_t cnt)
73 {
74 1 wd_cnt = cnt;
75 1 cklf_regxc_write(WWD, wd_cnt);
76 1 }
77
78 void cklf_wdog_feed(void)
79 {
80 1 cklf_regxc_write(WWD, wd_cnt);
81 1 }
82
83 void cklf_gpio_wakeup(uint16_t wcon1, uint16_t wcon0)
84 {
85 1 cklf_regxc_write(WWCON1, wcon1);
86 1 cklf_regxc_write(WWCON0, wcon0);
87 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 138 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 2 ----
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)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -