8051-ELL库  beta 1.1.6
8051-ELL library API Document Center
STC15x_REG.h
浏览该文件的文档.
1 /*-----------------------------------------------------------------------
2 | FILE DESCRIPTION |
3 -----------------------------------------------------------------------*/
4 /*----------------------------------------------------------------------
5  - File name : STC8Ax_REG.h
6  - Author : zeweni
7  - Update date : 2020.02.06
8  - Copyright(C) : 2020-2021 zeweni. All rights reserved.
9 -----------------------------------------------------------------------*/
10 /*------------------------------------------------------------------------
11 | COPYRIGHT NOTICE |
12 ------------------------------------------------------------------------*/
13 /*
14  * Copyright (C) 2021, zeweni (17870070675@163.com)
15 
16  * This file is part of 8051 ELL low-layer libraries.
17 
18  * 8051 ELL low-layer libraries is free software: you can redistribute
19  * it and/or modify it under the terms of the Apache-2.0 License.
20 
21  * 8051 ELL low-layer libraries is distributed in the hope that it will
22  * be useful,but WITHOUT ANY WARRANTY; without even the implied warranty
23  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24  * Apache-2.0 License License for more details.
25 
26  * You should have received a copy of the Apache-2.0 License.8051 ELL
27  * low-layer libraries. If not, see <http://www.apache.org/licenses/>.
28 **/
29 /*-----------------------------------------------------------------------
30 | UPDATE NOTE |
31 -----------------------------------------------------------------------*/
42 #ifndef __STC8Ax_REG_H_
43 #define __STC8Ax_REG_H_
44 /*-----------------------------------------------------------------------
45 | INCLUDES |
46 -----------------------------------------------------------------------*/
47 
48 #include "STC8x_TYPE.h"
49 
50 /*-----------------------------------------------------------------------
51 | REGISTER |
52 -----------------------------------------------------------------------*/
53 
54 /*--------------------------------------------------------
55 | @Description: system management |
56 --------------------------------------------------------*/
57 
58 /* Base address define */
59 #define AUXR_ADDRESS 0x8EU
60 #define AUXR2_ADDRESS 0x97U
61 #define PER_SW1_ADDRESS 0xA2U
62 #define PER_SW2_ADDRESS 0xBAU
63 
64 /* register */
69 
70 #define EAXFR_ENABLE() P_SW2 |= 0x80
71 #define EAXFR_DISABLE() P_SW2 &= 0x7F
72 
73 /*--------------------------------------------------------
74 | @Description: System clock IO register structure |
75 --------------------------------------------------------*/
76 
77 typedef struct
78 {
79  __IO uint8_t CKSEL_REG; /*----Clock selection */
80 
81  __IO uint8_t CLKDIV_REG; /*----Clock frequency division */
82 
83  __IO uint8_t IRC24MCR_REG; /*----High internal 24MHz oscillator control */
84 
85  __IO uint8_t XOSCCR_REG; /*----External oscillator control */
86 
87  __IO uint8_t IRC32KCR_REG; /*----Internal 32KHz oscillator control */
88 
90 
91 
92 /*--------------------------------------------------------
93 | @Description: System clock peripherals |
94 --------------------------------------------------------*/
95 
96 #define IRTRIM_ADDRESS 0x9FU
97 #define LIRTRIM_ADDRESS 0x9EU
98 
99 /* System clock base address in the
100 internal expansion RAM area */
101 #define SYSCLK_BASE 0xFE00U
102 
103 #define CKSEL_ADDRESS (SYSCLK_BASE + 0x0000U)
104 #define CLKDIV_ADDRESS (SYSCLK_BASE + 0x0001U)
105 #define IRC24MCR_ADDRESS (SYSCLK_BASE + 0x0002U)
106 #define XOSCCR_ADDRESS (SYSCLK_BASE + 0x0003U)
107 #define IRC32KCR_ADDRESS (SYSCLK_BASE + 0x0004U)
108 
109 /* Define type of SYSCLK */
110 
111 #define SYSCLK (* (SYSCLK_TypeDef xdata *) SYSCLK_BASE)
112 
113 /* SYSCLIL register */
114 
115 #define CKSEL ( *(__IO uint8_t xdata *) CKSEL_ADDRESS)
116 #define CLKDIV ( *(__IO uint8_t xdata *) CLKDIV_ADDRESS)
117 #define IRC24MCR ( *(__IO uint8_t xdata *)IRC24MCR_ADDRESS)
118 #define XOSCCR ( *(__IO uint8_t xdata *) XOSCCR_ADDRESS)
119 #define IRC32KCR ( *(__IO uint8_t xdata *)IRC32KCR_ADDRESS)
120 
121 /* IRC frequency adjustment register */
122 
125 
126 #define IRC_24M (*(__I uint8_t idata *)0xFB)
127 
128 /*--------------------------------------------------------
129 | @Description: Power peripherals |
130 --------------------------------------------------------*/
131 
132 /* Power base address */
133 #define PCON_ADDRESS 0x87U
134 #define VOCTRL_ADDRESS 0xBBU
135 
136 /* Power register */
139 
140 /*--------------------------------------------------------
141 | @Description: ISR peripherals |
142 --------------------------------------------------------*/
143 
144 /* ISR base address */
145 #define IE_ADDRESS 0xA8U
146 #define IE2_ADDRESS 0xAFU
147 #define IP_ADDRESS 0xB8U
148 #define IP2_ADDRESS 0xB5U
149 #define IPH_ADDRESS 0xB7U
150 #define IP2H_ADDRESS 0xB6U
151 #define INTCLKO_ADDRESS 0x8FU
152 #define AUXINTIF_ADDRESS 0xEFU
153 
154 /* IE2 */
155 #define ET4 0x40
156 #define ET3 0x20
157 #define ES4 0x10
158 #define ES3 0x08
159 #define ET2 0x04
160 #define ESPI 0x02
161 #define ES2 0x01
162 
163 /* IP2 */
164 #define PI2C 0x40
165 #define PCMP 0x20
166 #define PX4 0x10
167 #define PPWMFD 0x08
168 #define PPWM 0x04
169 #define PSPI 0x02
170 #define PS2 0x01
171 
172 /* IPH */
173 #define PPCAH 0x80
174 #define PLVDH 0x40
175 #define PADCH 0x20
176 #define PSH 0x10
177 #define PT1H 0x08
178 #define PX1H 0x04
179 #define PT0H 0x02
180 #define PX0H 0x01
181 
182 /* IP2H */
183 #define PI2CH 0x40
184 #define PCMPH 0x20
185 #define PX4H 0x10
186 #define PPWMFDH 0x08
187 #define PPWMH 0x04
188 #define PSPIH 0x02
189 #define PS2H 0x01
190 
191 /* INTCLKO */
192 #define EX4 0x40
193 #define EX3 0x20
194 #define EX2 0x10
195 #define T2CLKO 0x04
196 #define T1CLKO 0x02
197 #define T0CLKO 0x01
198 
199 /* AUXINTIF */
200 #define INT4IF 0x40
201 #define INT3IF 0x20
202 #define INT2IF 0x10
203 #define T4IF 0x04
204 #define T3IF 0x02
205 #define T2IF 0x01
206 
207 /* ISR register */
216 
217 sbit EA = IE^7;
218 sbit ELVD = IE^6;
219 sbit EADC = IE^5;
220 sbit ES = IE^4;
221 sbit ET1 = IE^3;
222 sbit EX1 = IE^2;
223 sbit ET0 = IE^1;
224 sbit EX0 = IE^0;
225 
226 sbit PPCA = IP^7;
227 sbit PLVD = IP^6;
228 sbit PADC = IP^5;
229 sbit PS = IP^4;
230 sbit PT1 = IP^3;
231 sbit PX1 = IP^2;
232 sbit PT0 = IP^1;
233 sbit PX0 = IP^0;
234 
235 /*--------------------------------------------------------
236 | @Description: GPIO peripherals |
237 --------------------------------------------------------*/
238 
239 /* Base address define */
240 #define GPIO_BASE 0x80U
241 #define PxM1_BASE 0x93U
242 #define PxM0_BASE 0x94U
243 #define BUS_SPEED_ADDRESS 0xA1U
244 
245 /* There are internal extended
246 ram areas below */
247 #define PxPU_BASE 0xFE10U
248 #define PxNCS_BASE 0xFE18U
249 #define PxSR_BASE 0xFE20U
250 #define PxDR_BASE 0xFE28U
251 #define PxIE_BASE 0xFE30U
252 
253 /* GPIO address define */
254 #define GPIO_P0_ADDRESS GPIO_BASE
255 #define GPIO_P1_ADDRESS 0x90U
256 #define GPIO_P2_ADDRESS 0xA0U
257 #define GPIO_P3_ADDRESS 0xB0U
258 #define GPIO_P4_ADDRESS 0xC0U
259 #define GPIO_P5_ADDRESS 0xC8U
260 #define GPIO_P6_ADDRESS 0xE8U
261 #define GPIO_P7_ADDRESS 0xF8U
262 
263 /*PxMx address define*/
264 #define P0M1_ADDRESS PxM1_BASE
265 #define P1M1_ADDRESS 0x91U
266 #define P2M1_ADDRESS 0x95U
267 #define P3M1_ADDRESS 0xB1U
268 #define P4M1_ADDRESS 0xB3U
269 #define P5M1_ADDRESS 0xC9U
270 #define P6M1_ADDRESS 0xCBU
271 #define P7M1_ADDRESS 0xE1U
272 
273 #define P0M0_ADDRESS PxM0_BASE
274 #define P1M0_ADDRESS 0x92U
275 #define P2M0_ADDRESS 0x96U
276 #define P3M0_ADDRESS 0xB2U
277 #define P4M0_ADDRESS 0xB4U
278 #define P5M0_ADDRESS 0xCAU
279 #define P6M0_ADDRESS 0xCCU
280 #define P7M0_ADDRESS 0xE2U
281 
282 /*GPIO pull up address */
283 #define P0PU_ADDRESS (PxPU_BASE + 0x00U)
284 #define P1PU_ADDRESS (PxPU_BASE + 0x01U)
285 #define P2PU_ADDRESS (PxPU_BASE + 0x02U)
286 #define P3PU_ADDRESS (PxPU_BASE + 0x03U)
287 #define P4PU_ADDRESS (PxPU_BASE + 0x04U)
288 #define P5PU_ADDRESS (PxPU_BASE + 0x05U)
289 #define P6PU_ADDRESS (PxPU_BASE + 0x06U)
290 #define P7PU_ADDRESS (PxPU_BASE + 0x07U)
291 
292 #define GPIO_P0PU_ADDRESS (PxPU_BASE + 0x00U)
293 #define GPIO_P1PU_ADDRESS (PxPU_BASE + 0x01U)
294 #define GPIO_P2PU_ADDRESS (PxPU_BASE + 0x02U)
295 #define GPIO_P3PU_ADDRESS (PxPU_BASE + 0x03U)
296 #define GPIO_P4PU_ADDRESS (PxPU_BASE + 0x04U)
297 #define GPIO_P5PU_ADDRESS (PxPU_BASE + 0x05U)
298 #define GPIO_P6PU_ADDRESS (PxPU_BASE + 0x06U)
299 #define GPIO_P7PU_ADDRESS (PxPU_BASE + 0x07U)
300 
301 /*GPIO schmidt trigger address */
302 #define P0NCS_ADDRESS (PxNCS_BASE + 0x00U)
303 #define P1NCS_ADDRESS (PxNCS_BASE + 0x01U)
304 #define P2NCS_ADDRESS (PxNCS_BASE + 0x02U)
305 #define P3NCS_ADDRESS (PxNCS_BASE + 0x03U)
306 #define P4NCS_ADDRESS (PxNCS_BASE + 0x04U)
307 #define P5NCS_ADDRESS (PxNCS_BASE + 0x05U)
308 #define P6NCS_ADDRESS (PxNCS_BASE + 0x06U)
309 #define P7NCS_ADDRESS (PxNCS_BASE + 0x07U)
310 
311 #define GPIO_P0NCS_ADDRESS (PxNCS_BASE + 0x00U)
312 #define GPIO_P1NCS_ADDRESS (PxNCS_BASE + 0x01U)
313 #define GPIO_P2NCS_ADDRESS (PxNCS_BASE + 0x02U)
314 #define GPIO_P3NCS_ADDRESS (PxNCS_BASE + 0x03U)
315 #define GPIO_P4NCS_ADDRESS (PxNCS_BASE + 0x04U)
316 #define GPIO_P5NCS_ADDRESS (PxNCS_BASE + 0x05U)
317 #define GPIO_P6NCS_ADDRESS (PxNCS_BASE + 0x06U)
318 #define GPIO_P7NCS_ADDRESS (PxNCS_BASE + 0x07U)
319 
320 /* GPIO level conversion address */
321 #define P0SR_ADDRESS (PxSR_BASE + 0x00U)
322 #define P1SR_ADDRESS (PxSR_BASE + 0x01U)
323 #define P2SR_ADDRESS (PxSR_BASE + 0x02U)
324 #define P3SR_ADDRESS (PxSR_BASE + 0x03U)
325 #define P4SR_ADDRESS (PxSR_BASE + 0x04U)
326 #define P5SR_ADDRESS (PxSR_BASE + 0x05U)
327 #define P6SR_ADDRESS (PxSR_BASE + 0x06U)
328 #define P7SR_ADDRESS (PxSR_BASE + 0x07U)
329 
330 #define GPIO_P0SR_ADDRESS (PxSR_BASE + 0x00U)
331 #define GPIO_P1SR_ADDRESS (PxSR_BASE + 0x01U)
332 #define GPIO_P2SR_ADDRESS (PxSR_BASE + 0x02U)
333 #define GPIO_P3SR_ADDRESS (PxSR_BASE + 0x03U)
334 #define GPIO_P4SR_ADDRESS (PxSR_BASE + 0x04U)
335 #define GPIO_P5SR_ADDRESS (PxSR_BASE + 0x05U)
336 #define GPIO_P6SR_ADDRESS (PxSR_BASE + 0x06U)
337 #define GPIO_P7SR_ADDRESS (PxSR_BASE + 0x07U)
338 
339 /* GPIO drive current address */
340 #define P0DR_ADDRESS (PxDR_BASE + 0x00U)
341 #define P1DR_ADDRESS (PxDR_BASE + 0x01U)
342 #define P2DR_ADDRESS (PxDR_BASE + 0x02U)
343 #define P3DR_ADDRESS (PxDR_BASE + 0x03U)
344 #define P4DR_ADDRESS (PxDR_BASE + 0x04U)
345 #define P5DR_ADDRESS (PxDR_BASE + 0x05U)
346 #define P6DR_ADDRESS (PxDR_BASE + 0x06U)
347 #define P7DR_ADDRESS (PxDR_BASE + 0x07U)
348 
349 #define GPIO_P0DR_ADDRESS (PxDR_BASE + 0x00U)
350 #define GPIO_P1DR_ADDRESS (PxDR_BASE + 0x01U)
351 #define GPIO_P2DR_ADDRESS (PxDR_BASE + 0x02U)
352 #define GPIO_P3DR_ADDRESS (PxDR_BASE + 0x03U)
353 #define GPIO_P4DR_ADDRESS (PxDR_BASE + 0x04U)
354 #define GPIO_P5DR_ADDRESS (PxDR_BASE + 0x05U)
355 #define GPIO_P6DR_ADDRESS (PxDR_BASE + 0x06U)
356 #define GPIO_P7DR_ADDRESS (PxDR_BASE + 0x07U)
357 
358 /* GPIO intput enable address*/
359 #define P0IE_ADDRESS (PxIE_BASE + 0x00U)
360 #define P1IE_ADDRESS (PxIE_BASE + 0x01U)
361 #define P3IE_ADDRESS (PxIE_BASE + 0x03U)
362 
363 /* GPIO register */
372 
381 
382 /* GPIO register */
383 sbit P00 = P0^0;
384 sbit P01 = P0^1;
385 sbit P02 = P0^2;
386 sbit P03 = P0^3;
387 sbit P04 = P0^4;
388 sbit P05 = P0^5;
389 sbit P06 = P0^6;
390 sbit P07 = P0^7;
391 
392 /* Pin register */
393 sbit P10 = P1^0;
394 sbit P11 = P1^1;
395 sbit P12 = P1^2;
396 sbit P13 = P1^3;
397 sbit P14 = P1^4;
398 sbit P15 = P1^5;
399 sbit P16 = P1^6;
400 sbit P17 = P1^7;
401 
402 sbit P20 = P2^0;
403 sbit P21 = P2^1;
404 sbit P22 = P2^2;
405 sbit P23 = P2^3;
406 sbit P24 = P2^4;
407 sbit P25 = P2^5;
408 sbit P26 = P2^6;
409 sbit P27 = P2^7;
410 
411 sbit P30 = P3^0;
412 sbit P31 = P3^1;
413 sbit P32 = P3^2;
414 sbit P33 = P3^3;
415 sbit P34 = P3^4;
416 sbit P35 = P3^5;
417 sbit P36 = P3^6;
418 sbit P37 = P3^7;
419 
420 sbit P40 = P4^0;
421 sbit P41 = P4^1;
422 sbit P42 = P4^2;
423 sbit P43 = P4^3;
424 sbit P44 = P4^4;
425 
426 sbit P50 = P5^0;
427 sbit P51 = P5^1;
428 sbit P52 = P5^2;
429 sbit P53 = P5^3;
430 sbit P54 = P5^4;
431 sbit P55 = P5^5;
432 sbit P56 = P5^6;
433 sbit P57 = P5^7;
434 
435 sbit P60 = P6^0;
436 sbit P61 = P6^1;
437 sbit P62 = P6^2;
438 sbit P63 = P6^3;
439 sbit P64 = P6^4;
440 sbit P65 = P6^5;
441 sbit P66 = P6^6;
442 sbit P67 = P6^7;
443 
444 sbit P70 = P7^0;
445 sbit P71 = P7^1;
446 sbit P72 = P7^2;
447 sbit P73 = P7^3;
448 sbit P74 = P7^4;
449 sbit P75 = P7^5;
450 sbit P76 = P7^6;
451 sbit P77 = P7^7;
452 
453 /* GPIO mode register */
462 
471 
472 /* GPIO mode register */
481 
490 
491 /* Bus speed control register */
493 
494 /* GPIO Driver register */
495 #define PxPU(PxPU_ADDRESS) ( *(__IO uint8_t xdata *) PxPU_ADDRESS)
496 #define PxSR(PxSR_ADDRESS) ( *(__IO uint8_t xdata *) PxSR_ADDRESS)
497 #define PxDR(PxDR_ADDRESS) ( *(__IO uint8_t xdata *) PxDR_ADDRESS)
498 #define PxIE(PxDR_ADDRESS) ( *(__IO uint8_t xdata *) PxIE_ADDRESS)
499 #define PxNCS(PxNCS_ADDRESS) ( *(__IO uint8_t xdata *) PxNCS_ADDRESS)
500 
501 #define P0PU ( *(__IO uint8_t xdata *) P0PU_ADDRESS)
502 #define P1PU ( *(__IO uint8_t xdata *) P1PU_ADDRESS)
503 #define P2PU ( *(__IO uint8_t xdata *) P2PU_ADDRESS)
504 #define P3PU ( *(__IO uint8_t xdata *) P3PU_ADDRESS)
505 #define P4PU ( *(__IO uint8_t xdata *) P4PU_ADDRESS)
506 #define P5PU ( *(__IO uint8_t xdata *) P5PU_ADDRESS)
507 #define P6PU ( *(__IO uint8_t xdata *) P6PU_ADDRESS)
508 #define P7PU ( *(__IO uint8_t xdata *) P7PU_ADDRESS)
509 
510 #define P0SR ( *(__IO uint8_t xdata *) P0SR_ADDRESS)
511 #define P1SR ( *(__IO uint8_t xdata *) P1SR_ADDRESS)
512 #define P2SR ( *(__IO uint8_t xdata *) P2SR_ADDRESS)
513 #define P3SR ( *(__IO uint8_t xdata *) P3SR_ADDRESS)
514 #define P4SR ( *(__IO uint8_t xdata *) P4SR_ADDRESS)
515 #define P5SR ( *(__IO uint8_t xdata *) P5SR_ADDRESS)
516 #define P6SR ( *(__IO uint8_t xdata *) P6SR_ADDRESS)
517 #define P7SR ( *(__IO uint8_t xdata *) P7SR_ADDRESS)
518 
519 #define P0DR ( *(__IO uint8_t xdata *) P0DR_ADDRESS)
520 #define P1DR ( *(__IO uint8_t xdata *) P1DR_ADDRESS)
521 #define P2DR ( *(__IO uint8_t xdata *) P2DR_ADDRESS)
522 #define P3DR ( *(__IO uint8_t xdata *) P3DR_ADDRESS)
523 #define P4DR ( *(__IO uint8_t xdata *) P4DR_ADDRESS)
524 #define P5DR ( *(__IO uint8_t xdata *) P5DR_ADDRESS)
525 #define P6DR ( *(__IO uint8_t xdata *) P6DR_ADDRESS)
526 #define P7DR ( *(__IO uint8_t xdata *) P7DR_ADDRESS)
527 
528 #define P0IE ( *(__IO uint8_t xdata *) P0IE_ADDRESS)
529 #define P1IE ( *(__IO uint8_t xdata *) P1IE_ADDRESS)
530 #define P3IE ( *(__IO uint8_t xdata *) P3IE_ADDRESS)
531 //#define P2IE ( *(__IO uint8_t xdata *) P2IE_ADDRESS)
532 //#define P4IE ( *(__IO uint8_t xdata *) P4IE_ADDRESS)
533 //#define P5IE ( *(__IO uint8_t xdata *) P5IE_ADDRESS)
534 //#define P6IE ( *(__IO uint8_t xdata *) P6IE_ADDRESS)
535 //#define P7IE ( *(__IO uint8_t xdata *) P7IE_ADDRESS)
536 
537 #define P0NCS ( *(__IO uint8_t xdata *) P0NCS_ADDRESS)
538 #define P1NCS ( *(__IO uint8_t xdata *) P1NCS_ADDRESS)
539 #define P2NCS ( *(__IO uint8_t xdata *) P2NCS_ADDRESS)
540 #define P3NCS ( *(__IO uint8_t xdata *) P3NCS_ADDRESS)
541 #define P4NCS ( *(__IO uint8_t xdata *) P4NCS_ADDRESS)
542 #define P5NCS ( *(__IO uint8_t xdata *) P5NCS_ADDRESS)
543 #define P6NCS ( *(__IO uint8_t xdata *) P6NCS_ADDRESS)
544 #define P7NCS ( *(__IO uint8_t xdata *) P7NCS_ADDRESS)
545 
546 /*--------------------------------------------------------
547 | @Description: WDT peripherals |
548 --------------------------------------------------------*/
549 
550 /* Base address define */
551 
552 #define WDT_ADDRESS 0xC1U
553 #define RSTCFG_ADDRESS 0xFFU
554 
555 /* WDT register */
557 //sfr IAP_CONTR = IAR_ADDRESS;
559 
560 /*--------------------------------------------------------
561 | @Description: TIMER peripherals |
562 --------------------------------------------------------*/
563 
564 /* Base address define */
565 #define TCON_ADDRESS 0x88U
566 #define TMOD_ADDRESS 0x89U
567 #define T0L_ADDRESS 0x8AU
568 #define T1L_ADDRESS 0x8BU
569 #define T0H_ADDRESS 0x8CU
570 #define T1H_ADDRESS 0x8DU
571 #define T4T3M_ADDRESS 0xD1U
572 #define T4H_ADDRESS 0xD2U
573 #define T4L_ADDRESS 0xD3U
574 #define T3H_ADDRESS 0xD4U
575 #define T3L_ADDRESS 0xD5U
576 #define T2H_ADDRESS 0xD6U
577 #define T2L_ADDRESS 0xD7U
578 #define WKTCL_ADDRESS 0xAAU
579 #define WKTCH_ADDRESS 0xABU
580 
581 /* TMOD */
582 #define T1_GATE 0x80
583 #define T1_CT 0x40
584 #define T1_M1 0x20
585 #define T1_M0 0x10
586 #define T0_GATE 0x08
587 #define T0_CT 0x04
588 #define T0_M1 0x02
589 #define T0_M0 0x01
590 
591 /* T4T3 */
592 #define T4R 0x80
593 #define T4_CT 0x40
594 #define T4x12 0x20
595 #define T4CLKO 0x10
596 #define T3R 0x08
597 #define T3_CT 0x04
598 #define T3x12 0x02
599 #define T3CLKO 0x01
600 
601 /* WKTCH */
602 #define WKTEN 0x80
603 
604 /* WDT_CONTR */
605 #define WDT_FLAG 0x80
606 #define EN_WDT 0x20
607 #define CLR_WDT 0x10
608 #define IDL_WDT 0x08
609 
610 /* TIMER register */
630 
631 sbit TF1 = TCON^7;
632 sbit TR1 = TCON^6;
633 sbit TF0 = TCON^5;
634 sbit TR0 = TCON^4;
635 sbit IE1 = TCON^3;
636 sbit IE0 = TCON^1;
637 
638 /* Clock frequency address of timer5 */
639 
640 #define FWTH (*(__I uint8_t idata *)0xF8)
641 #define FWTL (*(__I uint8_t idata *)0xF9)
642 
643 /*--------------------------------------------------------
644 | @Description: EXTI peripherals |
645 --------------------------------------------------------*/
646 
647 /* EXTI register */
648 sbit IT0 = TCON^0;
649 sbit IT1 = TCON^2;
650 
651 /*--------------------------------------------------------
652 | @Description: UART peripherals |
653 --------------------------------------------------------*/
654 
655 /* Base address define */
656 
657 #define SCON_ADDRESS 0x98U
658 #define SBUF_ADDRESS 0x99U
659 #define S2CON_ADDRESS 0x9AU
660 #define S2BUF_ADDRESS 0x9BU
661 #define S3CON_ADDRESS 0xACU
662 #define S3BUF_ADDRESS 0xADU
663 #define S4CON_ADDRESS 0x84U
664 #define S4BUF_ADDRESS 0x85U
665 #define SADDR_ADDRESS 0xA9U
666 #define SADEN_ADDRESS 0xB9U
667 
668 /* S2CON */
669 #define S2SM0 0x80
670 #define S2ST4 0x40
671 #define S2SM2 0x20
672 #define S2REN 0x10
673 #define S2TB8 0x08
674 #define S2RB8 0x04
675 #define S2TI 0x02
676 #define S2RI 0x01
677 
678 /* S3CON */
679 #define S3SM0 0x80
680 #define S3ST4 0x40
681 #define S3SM2 0x20
682 #define S3REN 0x10
683 #define S3TB8 0x08
684 #define S3RB8 0x04
685 #define S3TI 0x02
686 #define S3RI 0x01
687 
688 /* S4CON */
689 #define S4SM0 0x80
690 #define S4ST4 0x40
691 #define S4SM2 0x20
692 #define S4REN 0x10
693 #define S4TB8 0x08
694 #define S4RB8 0x04
695 #define S4TI 0x02
696 #define S4RI 0x01
697 
698 /* UART register */
699 
710 
711 sbit SM0 = SCON^7;
712 sbit SM1 = SCON^6;
713 sbit SM2 = SCON^5;
714 sbit REN = SCON^4;
715 sbit TB8 = SCON^3;
716 sbit RB8 = SCON^2;
717 sbit TI = SCON^1;
718 sbit RI = SCON^0;
719 
720 /*--------------------------------------------------------
721 | @Description: COMP peripherals |
722 --------------------------------------------------------*/
723 
724 /* Base address define */
725 #define CMPCR1_ADDRESS 0xE6U
726 #define CMPCR2_ADDRESS 0xE7U
727 
728 /* CMPCR1 */
729 #define CMPEN 0x80
730 #define CMPIF 0x40
731 #define PIE 0x20
732 #define NIE 0x10
733 #define PIS 0x08
734 #define NIS 0x04
735 #define CMPOE 0x02
736 #define CMPRES 0x01
737 
738 /* CMPAR2 */
739 #define INVCMPO 0x80
740 #define DISFLT 0x40
741 
742 /* COMP register */
745 
746 /*--------------------------------------------------------
747 | @Description: ADC peripherals |
748 --------------------------------------------------------*/
749 
750 /* Base address define */
751 #define ADC_CONTR_ADDRESS 0xBCU
752 #define ADC_RES_ADDRESS 0xBDU
753 #define ADC_RESH_ADDRESS 0xBDU
754 #define ADC_RESL_ADDRESS 0xBEU
755 #define ADCCFG_ADDRESS 0xDEU
756 #define ADCTIM_ADDRESS 0xFEA8U
757 /* ADC_CONTR */
758 #define ADC_POWER 0x80
759 #define ADC_START 0x40
760 #define ADC_FLAG 0x20
761 
762 /* ADCCFG */
763 #define ADC_RESFMT 0x20
764 
765 
766 /* ADC register */
771 
772 #define ADCTIM (*(__IO uint8_t xdata *)ADCTIM_ADDRESS)
773 
774 /*--------------------------------------------------------
775 | @Description: EEPROM peripherals |
776 --------------------------------------------------------*/
777 
778 /* Base address define */
779 #define IAP_DATA_ADDRESS 0xC2U
780 #define IAP_ADDRH_ADDRESS 0xC3U
781 #define IAP_ADDRL_ADDRESS 0xC4U
782 #define IAP_CMD_ADDRESS 0xC5U
783 #define IAP_TRIG_ADDRESS 0xC6U
784 #define IAP_CONTR_ADDRESS 0xC7U
785 
786 #define ISP_DATA_ADDRESS 0xC2U
787 #define ISP_ADDRH_ADDRESS 0xC3U
788 #define ISP_ADDRL_ADDRESS 0xC4U
789 #define ISP_CMD_ADDRESS 0xC5U
790 #define ISP_TRIG_ADDRESS 0xC6U
791 #define ISP_CONTR_ADDRESS 0xC7U
792 
793 /* IAP_CMD */
794 #define IAP_IDL 0x00
795 #define IAP_READ 0x01
796 #define IAP_WRITE 0x02
797 #define IAP_ERASE 0x03
798 
799 /* IAP_CONTR */
800 #define IAPEN 0x80
801 #define SWBS 0x40
802 #define SWRST 0x20
803 #define CMD_FAIL 0x10
804 
805 /* EEPROM register */
812 
819 
820 /*--------------------------------------------------------
821 | @Description: PCA peripherals |
822 --------------------------------------------------------*/
823 
824 /* Base address define */
825 #define CCON_ADDRESS 0xD8U
826 #define CMOD_ADDRESS 0xD9U
827 #define CL_ADDRESS 0xE9U
828 #define CH_ADDRESS 0xF9U
829 #define CCAPM0_ADDRESS 0xDAU
830 #define CCAPM1_ADDRESS 0xDBU
831 #define CCAPM2_ADDRESS 0xDCU
832 #define CCAPM3_ADDRESS 0xDDU
833 #define CCAP0L_ADDRESS 0xEAU
834 #define CCAP1L_ADDRESS 0xEBU
835 #define CCAP2L_ADDRESS 0xECU
836 #define CCAP3L_ADDRESS 0xEDU
837 #define CCAP0H_ADDRESS 0xFAU
838 #define CCAP1H_ADDRESS 0xFBU
839 #define CCAP2H_ADDRESS 0xFCU
840 #define CCAP3H_ADDRESS 0xFDU
841 #define PCA_PWM0_ADDRESS 0xF2U
842 #define PCA_PWM1_ADDRESS 0xF3U
843 #define PCA_PWM2_ADDRESS 0xF4U
844 #define PCA_PWM3_ADDRESS 0xF5U
845 
846 /* CMOD */
847 #define CIDL 0x80
848 #define ECF 0x01
849 
850 /* CCAPM0 */
851 #define ECOM0 0x40
852 #define CCAPP0 0x20
853 #define CCAPN0 0x10
854 #define MAT0 0x08
855 #define TOG0 0x04
856 #define PWM0 0x02
857 #define ECCF0 0x01
858 
859 /* CCAPM1 */
860 #define ECOM1 0x40
861 #define CCAPP1 0x20
862 #define CCAPN1 0x10
863 #define MAT1 0x08
864 #define TOG1 0x04
865 #define PWM1 0x02
866 #define ECCF1 0x01
867 
868 /* CCAMP2 */
869 #define ECOM2 0x40
870 #define CCAPP2 0x20
871 #define CCAPN2 0x10
872 #define MAT2 0x08
873 #define TOG2 0x04
874 #define PWM2 0x02
875 #define ECCF2 0x01
876 
877 /* CCAPM3 */
878 #define ECOM3 0x40
879 #define CCAPP3 0x20
880 #define CCAPN3 0x10
881 #define MAT3 0x08
882 #define TOG3 0x04
883 #define PWM3 0x02
884 #define ECCF3 0x01
885 
886 /* PCA register */
899 
908 
909 sbit CF = CCON ^ 7;
910 sbit CR = CCON ^ 6;
911 sbit CCF3 = CCON ^ 3;
912 sbit CCF2 = CCON ^ 2;
913 sbit CCF1 = CCON ^ 1;
914 sbit CCF0 = CCON ^ 0;
915 
916 /*--------------------------------------------------------
917 | @Description: PWM peripherals |
918 --------------------------------------------------------*/
919 
920 /* Base address define */
921 #define PWMCFG_ADDRESS 0xF1U
922 #define PWMIF_ADDRESS 0xF6U
923 #define PWMFDCR_ADDRESS 0xF7U
924 #define PWMCR_ADDRESS 0xFEU
925 
926 #define PWM_BASE1 0xFFF0U
927 #define PWM0_BASE 0xFF00U
928 #define PWM1_BASE 0xFF10U
929 #define PWM2_BASE 0xFF20U
930 #define PWM3_BASE 0xFF30U
931 #define PWM4_BASE 0xFF40U
932 #define PWM5_BASE 0xFF50U
933 #define PWM6_BASE 0xFF60U
934 #define PWM7_BASE 0xFF70U
935 
936 #define PWMC_ADDRESS (PWM_BASE1 + 0x00U)
937 #define PWMCH_ADDRESS (PWMC_ADDRESS + 0x00U)
938 #define PWMCL_ADDRESS (PWMCH_ADDRESS + 0x01U)
939 #define PWMCKS_ADDRESS (PWMCL_ADDRESS + 0x01U)
940 
941 #define TADCP_ADDRESS (PWMCKS_ADDRESS + 0x01U)
942 #define TADCPH_ADDRESS (TADCP_ADDRESS + 0x00U)
943 #define TADCPL_ADDRESS (PWMCL_ADDRESS + 0x01U)
944 
945 #define PWM0T1_ADDRESS (PWM0_BASE + 0x00U)
946 #define PWM0T1H_ADDRESS (PWM0T1_ADDRESS + 0x00U)
947 #define PWM0T1L_ADDRESS (PWM0T1H_ADDRESS + 0x01U)
948 #define PWM0T2_ADDRESS (PWM0T1L_ADDRESS + 0x01U)
949 #define PWM0T2H_ADDRESS (PWM0T2_ADDRESS + 0x00U)
950 #define PWM0T2L_ADDRESS (PWM0T2H_ADDRESS + 0x01U)
951 #define PWM0CR_ADDRESS (PWM0T2L_ADDRESS + 0x01U)
952 #define PWM0HLD_ADDRESS (PWM0CR_ADDRESS + 0x01U)
953 
954 #define PWM1T1_ADDRESS (PWM1_BASE + 0x00U)
955 #define PWM1T1H_ADDRESS (PWM1T1_ADDRESS + 0x00U)
956 #define PWM1T1L_ADDRESS (PWM1T1H_ADDRESS + 0x01U)
957 #define PWM1T2_ADDRESS (PWM1T1L_ADDRESS + 0x01U)
958 #define PWM1T2H_ADDRESS (PWM1T2_ADDRESS + 0x00U)
959 #define PWM1T2L_ADDRESS (PWM1T2H_ADDRESS + 0x01U)
960 #define PWM1CR_ADDRESS (PWM1T2L_ADDRESS + 0x01U)
961 #define PWM1HLD_ADDRESS (PWM1CR_ADDRESS + 0x01U)
962 
963 #define PWM2T1_ADDRESS (PWM2_BASE + 0x00U)
964 #define PWM2T1H_ADDRESS (PWM2T1_ADDRESS + 0x00U)
965 #define PWM2T1L_ADDRESS (PWM2T1H_ADDRESS + 0x01U)
966 #define PWM2T2_ADDRESS (PWM2T1L_ADDRESS + 0x01U)
967 #define PWM2T2H_ADDRESS (PWM2T2_ADDRESS + 0x00U)
968 #define PWM2T2L_ADDRESS (PWM2T2H_ADDRESS + 0x01U)
969 #define PWM2CR_ADDRESS (PWM2T2L_ADDRESS + 0x01U)
970 #define PWM2HLD_ADDRESS (PWM2CR_ADDRESS + 0x01U)
971 
972 #define PWM3T1_ADDRESS (PWM3_BASE + 0x00U)
973 #define PWM3T1H_ADDRESS (PWM3T1_ADDRESS + 0x00U)
974 #define PWM3T1L_ADDRESS (PWM3T1H_ADDRESS + 0x01U)
975 #define PWM3T2_ADDRESS (PWM3T1L_ADDRESS + 0x01U)
976 #define PWM3T2H_ADDRESS (PWM3T2_ADDRESS + 0x00U)
977 #define PWM3T2L_ADDRESS (PWM3T2H_ADDRESS + 0x01U)
978 #define PWM3CR_ADDRESS (PWM3T2L_ADDRESS + 0x01U)
979 #define PWM3HLD_ADDRESS (PWM3CR_ADDRESS + 0x01U)
980 
981 #define PWM4T1_ADDRESS (PWM4_BASE + 0x00U)
982 #define PWM4T1H_ADDRESS (PWM4T1_ADDRESS + 0x00U)
983 #define PWM4T1L_ADDRESS (PWM4T1H_ADDRESS + 0x01U)
984 #define PWM4T2_ADDRESS (PWM4T1L_ADDRESS + 0x01U)
985 #define PWM4T2H_ADDRESS (PWM4T2_ADDRESS + 0x00U)
986 #define PWM4T2L_ADDRESS (PWM4T2H_ADDRESS + 0x01U)
987 #define PWM4CR_ADDRESS (PWM4T2L_ADDRESS + 0x01U)
988 #define PWM4HLD_ADDRESS (PWM4CR_ADDRESS + 0x01U)
989 
990 #define PWM5T1_ADDRESS (PWM5_BASE + 0x00U)
991 #define PWM5T1H_ADDRESS (PWM5T1_ADDRESS + 0x00U)
992 #define PWM5T1L_ADDRESS (PWM5T1H_ADDRESS + 0x01U)
993 #define PWM5T2_ADDRESS (PWM5T1L_ADDRESS + 0x01U)
994 #define PWM5T2H_ADDRESS (PWM5T2_ADDRESS + 0x00U)
995 #define PWM5T2L_ADDRESS (PWM5T2H_ADDRESS + 0x01U)
996 #define PWM5CR_ADDRESS (PWM5T2L_ADDRESS + 0x01U)
997 #define PWM5HLD_ADDRESS (PWM5CR_ADDRESS + 0x01U)
998 
999 #define PWM6T1_ADDRESS (PWM6_BASE + 0x00U)
1000 #define PWM6T1H_ADDRESS (PWM6T1_ADDRESS + 0x00U)
1001 #define PWM6T1L_ADDRESS (PWM6T1H_ADDRESS + 0x01U)
1002 #define PWM6T2_ADDRESS (PWM6T1L_ADDRESS + 0x01U)
1003 #define PWM6T2H_ADDRESS (PWM6T2_ADDRESS + 0x00U)
1004 #define PWM6T2L_ADDRESS (PWM6T2H_ADDRESS + 0x01U)
1005 #define PWM6CR_ADDRESS (PWM6T2L_ADDRESS + 0x01U)
1006 #define PWM6HLD_ADDRESS (PWM6CR_ADDRESS + 0x01U)
1007 
1008 #define PWM7T1_ADDRESS (PWM7_BASE + 0x00U)
1009 #define PWM7T1H_ADDRESS (PWM7T1_ADDRESS + 0x00U)
1010 #define PWM7T1L_ADDRESS (PWM7T1H_ADDRESS + 0x01U)
1011 #define PWM7T2_ADDRESS (PWM7T1L_ADDRESS + 0x01U)
1012 #define PWM7T2H_ADDRESS (PWM7T2_ADDRESS + 0x00U)
1013 #define PWM7T2L_ADDRESS (PWM7T2H_ADDRESS + 0x01U)
1014 #define PWM7CR_ADDRESS (PWM7T2L_ADDRESS + 0x01U)
1015 #define PWM7HLD_ADDRESS (PWM7CR_ADDRESS + 0x01U)
1016 
1017 /* PWMCFG */
1018 #define CBIF 0x80
1019 #define ETADC 0x40
1020 
1021 /* PWMIF */
1022 #define C7IF 0x80
1023 #define C6IF 0x40
1024 #define C5IF 0x20
1025 #define C4IF 0x10
1026 #define C3IF 0x08
1027 #define C2IF 0x04
1028 #define C1IF 0x02
1029 #define C0IF 0x01
1030 
1031 /* PWMFDCR */
1032 #define INVCMP 0x80
1033 #define INVIO 0x40
1034 #define ENFD 0x20
1035 #define FLTFLIO 0x10
1036 #define EFDI 0x08
1037 #define FDCMP 0x04
1038 #define FDIO 0x02
1039 #define FDIF 0x01
1040 
1041 /* PWMCR */
1042 #define ENPWM 0x80
1043 #define ECBI 0x40
1044 
1045 /* PWM register */
1050 
1051 #define PWMC (*(__IO uint16_t xdata *) PWMC_ADDRESS)
1052 #define PWMCH (*(__IO uint8_t xdata *) PWMCH_ADDRESS)
1053 #define PWMCL (*(__IO uint8_t xdata *) PWMCL_ADDRESS)
1054 #define PWMCKS (*(__IO uint8_t xdata *) PWMCKS_ADDRESS)
1055 #define TADCP (*(__IO uint8_t xdata *) TADCP_ADDRESS)
1056 #define TADCPH (*(__IO uint8_t xdata *) TADCPH_ADDRESS)
1057 #define TADCPL (*(__IO uint8_t xdata *) TADCPL_ADDRESS)
1058 
1059 #define PWMxT1(PWMxT1_ADDRESS) ( *(__IO uint16_t xdata *) PWMxT1_ADDRESS)
1060 #define PWMxT2(PWMxT2_ADDRESS) ( *(__IO uint16_t xdata *) PWMxT2_ADDRESS)
1061 #define PWMxCR(PWMxCR_ADDRESS) ( *(__IO uint8_t xdata *) PWMxCR_ADDRESS)
1062 #define PWMxHLD(PWMxHLD_ADDRESS) ( *(__IO uint8_t xdata *)PWMxHLD_ADDRESS)
1063 
1064 #define PWM0T1 (*(__IO uint16_t xdata *) PWM0T1_ADDRESS)
1065 #define PWM0T1H (*(__IO uint8_t xdata *)PWM0T1H_ADDRESS)
1066 #define PWM0T1L (*(__IO uint8_t xdata *)PWM0T1L_ADDRESS)
1067 #define PWM0T2 (*(__IO uint16_t xdata *) PWM0T2_ADDRESS)
1068 #define PWM0T2H (*(__IO uint8_t xdata *)PWM0T2H_ADDRESS)
1069 #define PWM0T2L (*(__IO uint8_t xdata *)PWM0T2L_ADDRESS)
1070 #define PWM0CR (*(__IO uint8_t xdata *) PWM0CR_ADDRESS)
1071 #define PWM0HLD (*(__IO uint8_t xdata *)PWM0HLD_ADDRESS)
1072 
1073 #define PWM1T1 (*(__IO uint16_t xdata *) PWM1T1_ADDRESS)
1074 #define PWM1T1H (*(__IO uint8_t xdata *)PWM1T1H_ADDRESS)
1075 #define PWM1T1L (*(__IO uint8_t xdata *)PWM1T1L_ADDRESS)
1076 #define PWM1T2 (*(__IO uint16_t xdata *) PWM1T2_ADDRESS)
1077 #define PWM1T2H (*(__IO uint8_t xdata *)PWM1T2H_ADDRESS)
1078 #define PWM1T2L (*(__IO uint8_t xdata *)PWM1T2L_ADDRESS)
1079 #define PWM1CR (*(__IO uint8_t xdata *) PWM1CR_ADDRESS)
1080 #define PWM1HLD (*(__IO uint8_t xdata *)PWM1HLD_ADDRESS)
1081 
1082 #define PWM2T1 (*(__IO uint16_t xdata *) PWM2T1_ADDRESS)
1083 #define PWM2T1H (*(__IO uint8_t xdata *)PWM2T1H_ADDRESS)
1084 #define PWM2T1L (*(__IO uint8_t xdata *)PWM2T1L_ADDRESS)
1085 #define PWM2T2 (*(__IO uint16_t xdata *) PWM2T2_ADDRESS)
1086 #define PWM2T2H (*(__IO uint8_t xdata *)PWM2T2H_ADDRESS)
1087 #define PWM2T2L (*(__IO uint8_t xdata *)PWM2T2L_ADDRESS)
1088 #define PWM2CR (*(__IO uint8_t xdata *) PWM2CR_ADDRESS)
1089 #define PWM2HLD (*(__IO uint8_t xdata *)PWM2HLD_ADDRESS)
1090 
1091 #define PWM3T1 (*(__IO uint16_t xdata *) PWM3T1_ADDRESS)
1092 #define PWM3T1H (*(__IO uint8_t xdata *)PWM3T1H_ADDRESS)
1093 #define PWM3T1L (*(__IO uint8_t xdata *)PWM3T1L_ADDRESS)
1094 #define PWM3T2 (*(__IO uint16_t xdata *) PWM3T2_ADDRESS)
1095 #define PWM3T2H (*(__IO uint8_t xdata *)PWM3T2H_ADDRESS)
1096 #define PWM3T2L (*(__IO uint8_t xdata *)PWM3T2L_ADDRESS)
1097 #define PWM3CR (*(__IO uint8_t xdata *) PWM3CR_ADDRESS)
1098 #define PWM3HLD (*(__IO uint8_t xdata *)PWM3HLD_ADDRESS)
1099 
1100 #define PWM4T1 (*(__IO uint16_t xdata *) PWM4T1_ADDRESS)
1101 #define PWM4T1H (*(__IO uint8_t xdata *)PWM4T1H_ADDRESS)
1102 #define PWM4T1L (*(__IO uint8_t xdata *)PWM4T1L_ADDRESS)
1103 #define PWM4T2 (*(__IO uint16_t xdata *) PWM4T2_ADDRESS)
1104 #define PWM4T2H (*(__IO uint8_t xdata *)PWM4T2H_ADDRESS)
1105 #define PWM4T2L (*(__IO uint8_t xdata *)PWM4T2L_ADDRESS)
1106 #define PWM4CR (*(__IO uint8_t xdata *) PWM4CR_ADDRESS)
1107 #define PWM4HLD (*(__IO uint8_t xdata *)PWM4HLD_ADDRESS)
1108 
1109 #define PWM5T1 (*(__IO uint16_t xdata *) PWM5T1_ADDRESS)
1110 #define PWM5T1H (*(__IO uint8_t xdata *)PWM5T1H_ADDRESS)
1111 #define PWM5T1L (*(__IO uint8_t xdata *)PWM5T1L_ADDRESS)
1112 #define PWM5T2 (*(__IO uint16_t xdata *) PWM5T2_ADDRESS)
1113 #define PWM5T2H (*(__IO uint8_t xdata *)PWM5T2H_ADDRESS)
1114 #define PWM5T2L (*(__IO uint8_t xdata *)PWM5T2L_ADDRESS)
1115 #define PWM5CR (*(__IO uint8_t xdata *) PWM5CR_ADDRESS)
1116 #define PWM5HLD (*(__IO uint8_t xdata *)PWM5HLD_ADDRESS)
1117 
1118 #define PWM6T1 (*(__IO uint16_t xdata *) PWM6T1_ADDRESS)
1119 #define PWM6T1H (*(__IO uint8_t xdata *)PWM6T1H_ADDRESS)
1120 #define PWM6T1L (*(__IO uint8_t xdata *)PWM6T1L_ADDRESS)
1121 #define PWM6T2 (*(__IO uint16_t xdata *) PWM6T2_ADDRESS)
1122 #define PWM6T2H (*(__IO uint8_t xdata *)PWM6T2H_ADDRESS)
1123 #define PWM6T2L (*(__IO uint8_t xdata *)PWM6T2L_ADDRESS)
1124 #define PWM6CR (*(__IO uint8_t xdata *) PWM6CR_ADDRESS)
1125 #define PWM6HLD (*(__IO uint8_t xdata *)PWM6HLD_ADDRESS)
1126 
1127 #define PWM7T1 (*(__IO uint16_t xdata *) PWM7T1_ADDRESS)
1128 #define PWM7T1H (*(__IO uint8_t xdata *)PWM7T1H_ADDRESS)
1129 #define PWM7T1L (*(__IO uint8_t xdata *)PWM7T1L_ADDRESS)
1130 #define PWM7T2 (*(__IO uint16_t xdata *) PWM7T2_ADDRESS)
1131 #define PWM7T2H (*(__IO uint8_t xdata *)PWM7T2H_ADDRESS)
1132 #define PWM7T2L (*(__IO uint8_t xdata *)PWM7T2L_ADDRESS)
1133 #define PWM7CR (*(__IO uint8_t xdata *) PWM7CR_ADDRESS)
1134 #define PWM7HLD (*(__IO uint8_t xdata *)PWM7HLD_ADDRESS)
1135 
1136 /*--------------------------------------------------------
1137 | @Description: SPI peripherals |
1138 --------------------------------------------------------*/
1139 
1140 /* Base address */
1141 #define SPSTAT_ADDRESS 0xCDU
1142 #define SPCTL_ADDRESS 0xCEU
1143 #define SPDAT_ADDRESS 0xCFU
1144 
1145 /* SPSTAT */
1146 #define SPIF 0x80
1147 #define WCOL 0x40
1148 
1149 /* SPCTL */
1150 #define SSIG 0x80
1151 #define SPEN 0x40
1152 #define DORD 0x20
1153 #define MSTR 0x10
1154 #define CPOL 0x08
1155 #define CPHA 0x04
1156 
1157 /* SPI register */
1161 
1162 /*--------------------------------------------------------
1163 | @Description: I2C peripherals |
1164 --------------------------------------------------------*/
1165 
1166 /* Base address */
1167 #define I2C_BASE 0xFE80U
1168 #define I2CCFG_ADDRESS (I2C_BASE + 0x00U)
1169 #define I2CMSCR_ADDRESS (I2C_BASE + 0x01U)
1170 #define I2CMSST_ADDRESS (I2C_BASE + 0x02U)
1171 #define I2CSLCR_ADDRESS (I2C_BASE + 0x03U)
1172 #define I2CSLST_ADDRESS (I2C_BASE + 0x04U)
1173 #define I2CSLADR_ADDRESS (I2C_BASE + 0x05U)
1174 #define I2CTXD_ADDRESS (I2C_BASE + 0x06U)
1175 #define I2CRXD_ADDRESS (I2C_BASE + 0x07U)
1176 
1177 /* I2CCFG */
1178 #define ENI2C 0x80
1179 #define MSSL 0x40
1180 
1181 /* I2CMSCR */
1182 #define EMSI 0x80
1183 
1184 /* I2CMSST */
1185 #define MSBUSY 0x80
1186 #define MSIF 0x40
1187 #define MSACKI 0x02
1188 #define MSACKO 0x01
1189 
1190 /* I2CSLCR */
1191 #define ESTAI 0x40
1192 #define ERXI 0x20
1193 #define ETXI 0x10
1194 #define ESTOI 0x08
1195 #define SLRST 0x01
1196 
1197 /* I2CSLST */
1198 #define SLBUSY 0x80
1199 #define STAIF 0x40
1200 #define RXIF 0x20
1201 #define TXIF 0x10
1202 #define STOIF 0x08
1203 #define TXING 0x04
1204 #define SLACKI 0x02
1205 #define SLACKO 0x01
1206 
1207 /* SPI register */
1208 
1209 #define I2CCFG (*(__IO uint8_t xdata *) I2CCFG_ADDRESS)
1210 #define I2CMSCR (*(__IO uint8_t xdata *) I2CMSCR_ADDRESS)
1211 #define I2CMSST (*(__IO uint8_t xdata *) I2CMSST_ADDRESS)
1212 #define I2CSLCR (*(__IO uint8_t xdata *) I2CSLCR_ADDRESS)
1213 #define I2CSLST (*(__IO uint8_t xdata * )I2CSLST_ADDRESS)
1214 #define I2CSLADR (*(__IO uint8_t xdata *)I2CSLADR_ADDRESS)
1215 #define I2CTXD (*(__IO uint8_t xdata *) I2CTXD_ADDRESS)
1216 #define I2CRXD (*(__IO uint8_t xdata *) I2CRXD_ADDRESS)
1217 
1218 
1219 #endif
1220 /*-----------------------------------------------------------------------
1221 | END OF FLIE (C) COPYRIGHT Gevico Electronics |
1222 -----------------------------------------------------------------------*/
unsigned char uint8_t
Definition: ELL_TYPE.h:72
#define __IO
Definition: ELL_TYPE.h:106
sfr P4M0
Definition: STC15x_REG.h:477
sbit P50
Definition: STC15x_REG.h:426
sbit P06
Definition: STC15x_REG.h:389
sfr P7M0
Definition: STC15x_REG.h:480
sfr T0L
Definition: STC15x_REG.h:613
#define PER_SW2_ADDRESS
Definition: STC15x_REG.h:62
#define P6M1_ADDRESS
Definition: STC15x_REG.h:270
sbit P76
Definition: STC15x_REG.h:450
sfr T4L
Definition: STC15x_REG.h:623
sfr ISP_ADDRH
Definition: STC15x_REG.h:814
#define GPIO_P0_ADDRESS
Definition: STC15x_REG.h:254
#define CMOD_ADDRESS
Definition: STC15x_REG.h:826
sfr P1
Definition: STC15x_REG.h:365
sbit P36
Definition: STC15x_REG.h:417
#define IAP_TRIG_ADDRESS
Definition: STC15x_REG.h:783
#define CMPCR1_ADDRESS
Definition: STC15x_REG.h:725
sfr CCON
Definition: STC15x_REG.h:887
#define AUXR_ADDRESS
Update note:
Definition: STC15x_REG.h:59
sfr TL1
Definition: STC15x_REG.h:618
sfr IPH
Definition: STC15x_REG.h:212
#define P0M0_ADDRESS
Definition: STC15x_REG.h:273
sfr P0
Definition: STC15x_REG.h:364
sbit P70
Definition: STC15x_REG.h:444
sbit PADC
Definition: STC15x_REG.h:228
sfr WDT_CONTR
Definition: STC15x_REG.h:556
#define S4BUF_ADDRESS
Definition: STC15x_REG.h:664
sfr CCAP1H
Definition: STC15x_REG.h:901
sfr P5
Definition: STC15x_REG.h:369
sbit PX0
Definition: STC15x_REG.h:233
sbit P24
Definition: STC15x_REG.h:406
sbit P10
Definition: STC15x_REG.h:393
sfr SPCTL
Definition: STC15x_REG.h:1159
sfr P_SW2
Definition: STC15x_REG.h:68
sfr WKTCL
Definition: STC15x_REG.h:628
sbit P13
Definition: STC15x_REG.h:396
sfr SPDAT
Definition: STC15x_REG.h:1160
sfr P0M1
Definition: STC15x_REG.h:454
sbit P40
Definition: STC15x_REG.h:420
#define PCA_PWM3_ADDRESS
Definition: STC15x_REG.h:844
sbit EX1
Definition: STC15x_REG.h:222
sbit TR0
Definition: STC15x_REG.h:634
#define GPIO_P3_ADDRESS
Definition: STC15x_REG.h:257
sfr P4
Definition: STC15x_REG.h:368
#define P6M0_ADDRESS
Definition: STC15x_REG.h:279
sfr CCAP1L
Definition: STC15x_REG.h:896
sbit P66
Definition: STC15x_REG.h:441
#define CCAP0L_ADDRESS
Definition: STC15x_REG.h:833
sfr ISP_DATA
Definition: STC15x_REG.h:813
#define IAP_ADDRH_ADDRESS
Definition: STC15x_REG.h:780
#define CCAP3H_ADDRESS
Definition: STC15x_REG.h:840
#define T1L_ADDRESS
Definition: STC15x_REG.h:568
sfr CMPCR1
Definition: STC15x_REG.h:743
sbit P77
Definition: STC15x_REG.h:451
sfr IAP_CONTR
Definition: STC15x_REG.h:811
sfr PCA_PWM0
Definition: STC15x_REG.h:904
sfr PWMIF
Definition: STC15x_REG.h:1047
sbit PT1
Definition: STC15x_REG.h:230
sfr BUS_SPEED
Definition: STC15x_REG.h:492
sbit SM0
Definition: STC15x_REG.h:711
#define CL_ADDRESS
Definition: STC15x_REG.h:827
sfr GPIO_P0M0
Definition: STC15x_REG.h:482
sfr CCAPM0
Definition: STC15x_REG.h:891
sbit P14
Definition: STC15x_REG.h:397
#define ADCCFG_ADDRESS
Definition: STC15x_REG.h:755
sbit P34
Definition: STC15x_REG.h:415
sfr S3CON
Definition: STC15x_REG.h:704
sbit P51
Definition: STC15x_REG.h:427
sbit P31
Definition: STC15x_REG.h:412
sbit P67
Definition: STC15x_REG.h:442
sfr GPIO_P1_IO
Definition: STC15x_REG.h:374
#define GPIO_P2_ADDRESS
Definition: STC15x_REG.h:256
sbit P33
Definition: STC15x_REG.h:414
sbit P73
Definition: STC15x_REG.h:447
#define ADC_RESL_ADDRESS
Definition: STC15x_REG.h:754
sbit P01
Definition: STC15x_REG.h:384
sfr ISP_TRIG
Definition: STC15x_REG.h:817
sbit PPCA
Definition: STC15x_REG.h:226
#define PWMCR_ADDRESS
Definition: STC15x_REG.h:924
sfr GPIO_P1M0
Definition: STC15x_REG.h:483
sbit P60
Definition: STC15x_REG.h:435
sbit P44
Definition: STC15x_REG.h:424
#define TCON_ADDRESS
Definition: STC15x_REG.h:565
sbit IT1
Definition: STC15x_REG.h:649
#define ADC_CONTR_ADDRESS
Definition: STC15x_REG.h:751
sbit P00
Definition: STC15x_REG.h:383
sbit TR1
Definition: STC15x_REG.h:632
#define RSTCFG_ADDRESS
Definition: STC15x_REG.h:553
#define P5M1_ADDRESS
Definition: STC15x_REG.h:269
sfr T4T3M
Definition: STC15x_REG.h:621
sfr CMPCR2
Definition: STC15x_REG.h:744
sbit P41
Definition: STC15x_REG.h:421
#define LIRTRIM_ADDRESS
Definition: STC15x_REG.h:97
sbit P15
Definition: STC15x_REG.h:398
sbit P32
Definition: STC15x_REG.h:413
sfr TL0
Definition: STC15x_REG.h:617
sbit P07
Definition: STC15x_REG.h:390
sfr GPIO_P2_IO
Definition: STC15x_REG.h:375
sbit CCF0
Definition: STC15x_REG.h:914
#define S2BUF_ADDRESS
Definition: STC15x_REG.h:660
sfr TH1
Definition: STC15x_REG.h:620
sfr IP2H
Definition: STC15x_REG.h:213
sfr S4CON
Definition: STC15x_REG.h:706
#define PER_SW1_ADDRESS
Definition: STC15x_REG.h:61
#define CCAP1L_ADDRESS
Definition: STC15x_REG.h:834
#define CCAP2H_ADDRESS
Definition: STC15x_REG.h:839
sfr INTCLKO
Definition: STC15x_REG.h:214
sfr T4H
Definition: STC15x_REG.h:622
#define CCAP1H_ADDRESS
Definition: STC15x_REG.h:838
sfr GPIO_P4M1
Definition: STC15x_REG.h:467
sbit CCF1
Definition: STC15x_REG.h:913
sfr GPIO_P2M0
Definition: STC15x_REG.h:484
sfr ISP_CMD
Definition: STC15x_REG.h:816
sfr P4M1
Definition: STC15x_REG.h:458
#define PCA_PWM1_ADDRESS
Definition: STC15x_REG.h:842
#define P0M1_ADDRESS
Definition: STC15x_REG.h:264
sfr T2L
Definition: STC15x_REG.h:627
#define IAP_CMD_ADDRESS
Definition: STC15x_REG.h:782
#define S2CON_ADDRESS
Definition: STC15x_REG.h:659
sfr LIRTRIM
Definition: STC15x_REG.h:124
sfr CCAP0L
Definition: STC15x_REG.h:895
#define CMPCR2_ADDRESS
Definition: STC15x_REG.h:726
sbit P72
Definition: STC15x_REG.h:446
#define T4H_ADDRESS
Definition: STC15x_REG.h:572
sbit IE1
Definition: STC15x_REG.h:635
sfr P2M0
Definition: STC15x_REG.h:475
sbit P65
Definition: STC15x_REG.h:440
sfr PCA_PWM1
Definition: STC15x_REG.h:905
sfr CCAP3L
Definition: STC15x_REG.h:898
sfr P5M0
Definition: STC15x_REG.h:478
#define GPIO_P4_ADDRESS
Definition: STC15x_REG.h:258
sbit P23
Definition: STC15x_REG.h:405
#define WKTCH_ADDRESS
Definition: STC15x_REG.h:579
sfr P3M0
Definition: STC15x_REG.h:476
#define IAP_CONTR_ADDRESS
Definition: STC15x_REG.h:784
sfr CCAP0H
Definition: STC15x_REG.h:900
sfr IP2
Definition: STC15x_REG.h:211
#define CCAPM2_ADDRESS
Definition: STC15x_REG.h:831
#define IPH_ADDRESS
Definition: STC15x_REG.h:149
sfr P6
Definition: STC15x_REG.h:370
#define T3L_ADDRESS
Definition: STC15x_REG.h:575
sfr ADC_RES
Definition: STC15x_REG.h:768
#define GPIO_P6_ADDRESS
Definition: STC15x_REG.h:260
sbit P20
Definition: STC15x_REG.h:402
sfr CCAPM2
Definition: STC15x_REG.h:893
sfr P6M1
Definition: STC15x_REG.h:460
sfr SPSTAT
Definition: STC15x_REG.h:1158
#define IE_ADDRESS
Definition: STC15x_REG.h:145
#define GPIO_P1_ADDRESS
Definition: STC15x_REG.h:255
sfr IE
Definition: STC15x_REG.h:208
#define BUS_SPEED_ADDRESS
Definition: STC15x_REG.h:243
sfr P_SW1
Definition: STC15x_REG.h:67
sfr P2
Definition: STC15x_REG.h:366
sbit P53
Definition: STC15x_REG.h:429
sbit SM1
Definition: STC15x_REG.h:712
#define PCA_PWM2_ADDRESS
Definition: STC15x_REG.h:843
sbit P71
Definition: STC15x_REG.h:445
#define ISP_ADDRH_ADDRESS
Definition: STC15x_REG.h:787
sbit PX1
Definition: STC15x_REG.h:231
sbit ET0
Definition: STC15x_REG.h:223
#define SADEN_ADDRESS
Definition: STC15x_REG.h:666
sfr IP
Definition: STC15x_REG.h:210
sfr ADCCFG
Definition: STC15x_REG.h:770
sfr GPIO_P6_IO
Definition: STC15x_REG.h:379
#define ISP_CONTR_ADDRESS
Definition: STC15x_REG.h:791
sfr GPIO_P6M0
Definition: STC15x_REG.h:488
#define S3BUF_ADDRESS
Definition: STC15x_REG.h:662
sbit P62
Definition: STC15x_REG.h:437
#define T1H_ADDRESS
Definition: STC15x_REG.h:570
sfr ISP_CONTR
Definition: STC15x_REG.h:818
sfr P7M1
Definition: STC15x_REG.h:461
sbit P37
Definition: STC15x_REG.h:418
sbit P42
Definition: STC15x_REG.h:422
sbit TI
Definition: STC15x_REG.h:717
#define TMOD_ADDRESS
Definition: STC15x_REG.h:566
sbit IE0
Definition: STC15x_REG.h:636
#define PWMIF_ADDRESS
Definition: STC15x_REG.h:922
#define T3H_ADDRESS
Definition: STC15x_REG.h:574
sbit P27
Definition: STC15x_REG.h:409
#define IE2_ADDRESS
Definition: STC15x_REG.h:146
sbit TF1
Definition: STC15x_REG.h:631
#define PCA_PWM0_ADDRESS
Definition: STC15x_REG.h:841
sfr GPIO_P1M1
Definition: STC15x_REG.h:464
sbit P52
Definition: STC15x_REG.h:428
#define CCAP3L_ADDRESS
Definition: STC15x_REG.h:836
#define T4T3M_ADDRESS
Definition: STC15x_REG.h:571
sfr IAP_DATA
Definition: STC15x_REG.h:806
sbit P25
Definition: STC15x_REG.h:407
#define WDT_ADDRESS
Definition: STC15x_REG.h:552
#define VOCTRL_ADDRESS
Definition: STC15x_REG.h:134
sbit P26
Definition: STC15x_REG.h:408
sbit TF0
Definition: STC15x_REG.h:633
#define PWMFDCR_ADDRESS
Definition: STC15x_REG.h:923
sbit P74
Definition: STC15x_REG.h:448
sfr GPIO_P3M0
Definition: STC15x_REG.h:485
sbit ES
Definition: STC15x_REG.h:220
sfr GPIO_P4_IO
Definition: STC15x_REG.h:377
sfr PCON
Definition: STC15x_REG.h:137
sfr S2CON
Definition: STC15x_REG.h:702
#define ISP_DATA_ADDRESS
Definition: STC15x_REG.h:786
#define CCAPM3_ADDRESS
Definition: STC15x_REG.h:832
#define SCON_ADDRESS
Definition: STC15x_REG.h:657
sfr GPIO_P0_IO
Definition: STC15x_REG.h:373
sfr CCAP2H
Definition: STC15x_REG.h:902
sfr T3H
Definition: STC15x_REG.h:624
#define IAP_DATA_ADDRESS
Definition: STC15x_REG.h:779
#define P2M0_ADDRESS
Definition: STC15x_REG.h:275
sfr P2M1
Definition: STC15x_REG.h:456
#define ISP_CMD_ADDRESS
Definition: STC15x_REG.h:789
sbit P43
Definition: STC15x_REG.h:423
sbit P05
Definition: STC15x_REG.h:388
#define T4L_ADDRESS
Definition: STC15x_REG.h:573
sfr SADDR
Definition: STC15x_REG.h:708
sbit P55
Definition: STC15x_REG.h:431
sbit ET1
Definition: STC15x_REG.h:221
sfr PWMFDCR
Definition: STC15x_REG.h:1048
sfr AUXR
Definition: STC15x_REG.h:65
sbit PS
Definition: STC15x_REG.h:229
sfr S4BUF
Definition: STC15x_REG.h:707
#define ISP_ADDRL_ADDRESS
Definition: STC15x_REG.h:788
sfr GPIO_P3_IO
Definition: STC15x_REG.h:376
sfr IAP_ADDRL
Definition: STC15x_REG.h:808
sbit EADC
Definition: STC15x_REG.h:219
sfr CCAPM1
Definition: STC15x_REG.h:892
sfr CL
Definition: STC15x_REG.h:889
#define P5M0_ADDRESS
Definition: STC15x_REG.h:278
sfr P1M0
Definition: STC15x_REG.h:474
sbit P12
Definition: STC15x_REG.h:395
sbit P75
Definition: STC15x_REG.h:449
sbit P16
Definition: STC15x_REG.h:399
sfr PCA_PWM3
Definition: STC15x_REG.h:907
sfr CH
Definition: STC15x_REG.h:890
sbit PT0
Definition: STC15x_REG.h:232
sfr AUXINTIF
Definition: STC15x_REG.h:215
sbit P02
Definition: STC15x_REG.h:385
sbit IT0
Definition: STC15x_REG.h:648
sfr GPIO_P3M1
Definition: STC15x_REG.h:466
sfr P5M1
Definition: STC15x_REG.h:459
#define P4M0_ADDRESS
Definition: STC15x_REG.h:277
sbit RB8
Definition: STC15x_REG.h:716
sbit P64
Definition: STC15x_REG.h:439
sfr P3M1
Definition: STC15x_REG.h:457
sfr CCAPM3
Definition: STC15x_REG.h:894
sfr S2BUF
Definition: STC15x_REG.h:703
#define WKTCL_ADDRESS
Definition: STC15x_REG.h:578
#define S3CON_ADDRESS
Definition: STC15x_REG.h:661
sfr RSTCFG
Definition: STC15x_REG.h:558
sfr GPIO_P6M1
Definition: STC15x_REG.h:469
sfr P1M1
Definition: STC15x_REG.h:455
sbit ELVD
Definition: STC15x_REG.h:218
#define T0H_ADDRESS
Definition: STC15x_REG.h:569
sfr ADC_CONTR
Definition: STC15x_REG.h:767
#define ADC_RESH_ADDRESS
Definition: STC15x_REG.h:753
sfr IAP_ADDRH
Definition: STC15x_REG.h:807
sfr GPIO_P5M1
Definition: STC15x_REG.h:468
sfr PWMCR
Definition: STC15x_REG.h:1049
#define IP2H_ADDRESS
Definition: STC15x_REG.h:150
#define ISP_TRIG_ADDRESS
Definition: STC15x_REG.h:790
sbit CF
Definition: STC15x_REG.h:909
#define P1M1_ADDRESS
Definition: STC15x_REG.h:265
sfr TMOD
Definition: STC15x_REG.h:612
sfr T3L
Definition: STC15x_REG.h:625
sbit P11
Definition: STC15x_REG.h:394
sbit TB8
Definition: STC15x_REG.h:715
#define P4M1_ADDRESS
Definition: STC15x_REG.h:268
sfr GPIO_P5_IO
Definition: STC15x_REG.h:378
sbit P63
Definition: STC15x_REG.h:438
#define INTCLKO_ADDRESS
Definition: STC15x_REG.h:151
#define AUXINTIF_ADDRESS
Definition: STC15x_REG.h:152
sfr IE2
Definition: STC15x_REG.h:209
sbit CCF2
Definition: STC15x_REG.h:912
#define T0L_ADDRESS
Definition: STC15x_REG.h:567
sfr GPIO_P7_IO
Definition: STC15x_REG.h:380
sfr SBUF
Definition: STC15x_REG.h:701
sfr ADC_RESL
Definition: STC15x_REG.h:769
#define P7M0_ADDRESS
Definition: STC15x_REG.h:280
#define IRTRIM_ADDRESS
Definition: STC15x_REG.h:96
sfr PWMCFG
Definition: STC15x_REG.h:1046
#define SPCTL_ADDRESS
Definition: STC15x_REG.h:1142
sfr VOCTRL
Definition: STC15x_REG.h:138
sfr T1L
Definition: STC15x_REG.h:614
sfr TH0
Definition: STC15x_REG.h:619
#define AUXR2_ADDRESS
Definition: STC15x_REG.h:60
sbit RI
Definition: STC15x_REG.h:718
sfr P0M0
Definition: STC15x_REG.h:473
#define CCAP0H_ADDRESS
Definition: STC15x_REG.h:837
sbit P04
Definition: STC15x_REG.h:387
sfr TCON
Definition: STC15x_REG.h:611
sbit P54
Definition: STC15x_REG.h:430
sbit REN
Definition: STC15x_REG.h:714
sfr CCAP2L
Definition: STC15x_REG.h:897
sbit P35
Definition: STC15x_REG.h:416
#define P3M1_ADDRESS
Definition: STC15x_REG.h:267
#define P1M0_ADDRESS
Definition: STC15x_REG.h:274
sfr T1H
Definition: STC15x_REG.h:616
sfr PCA_PWM2
Definition: STC15x_REG.h:906
#define SPSTAT_ADDRESS
Definition: STC15x_REG.h:1141
#define P3M0_ADDRESS
Definition: STC15x_REG.h:276
#define IP_ADDRESS
Definition: STC15x_REG.h:147
#define SBUF_ADDRESS
Definition: STC15x_REG.h:658
#define CCAPM0_ADDRESS
Definition: STC15x_REG.h:829
sfr GPIO_P2M1
Definition: STC15x_REG.h:465
#define PWMCFG_ADDRESS
Definition: STC15x_REG.h:921
sfr WKTCH
Definition: STC15x_REG.h:629
sfr P7
Definition: STC15x_REG.h:371
sbit P21
Definition: STC15x_REG.h:403
#define SPDAT_ADDRESS
Definition: STC15x_REG.h:1143
sfr GPIO_P4M0
Definition: STC15x_REG.h:486
sbit PLVD
Definition: STC15x_REG.h:227
#define P7M1_ADDRESS
Definition: STC15x_REG.h:271
sfr SCON
Definition: STC15x_REG.h:700
sfr GPIO_P5M0
Definition: STC15x_REG.h:487
sbit P61
Definition: STC15x_REG.h:436
#define CH_ADDRESS
Definition: STC15x_REG.h:828
#define P2M1_ADDRESS
Definition: STC15x_REG.h:266
sbit EA
Definition: STC15x_REG.h:217
sfr IRTRIM
Definition: STC15x_REG.h:123
#define SADDR_ADDRESS
Definition: STC15x_REG.h:665
#define GPIO_P7_ADDRESS
Definition: STC15x_REG.h:261
#define CCON_ADDRESS
Definition: STC15x_REG.h:825
sfr CCAP3H
Definition: STC15x_REG.h:903
sfr GPIO_P0M1
Definition: STC15x_REG.h:463
#define PCON_ADDRESS
Definition: STC15x_REG.h:133
sfr P3
Definition: STC15x_REG.h:367
sfr CMOD
Definition: STC15x_REG.h:888
sfr T2H
Definition: STC15x_REG.h:626
sfr P6M0
Definition: STC15x_REG.h:479
sbit SM2
Definition: STC15x_REG.h:713
#define CCAPM1_ADDRESS
Definition: STC15x_REG.h:830
sbit P17
Definition: STC15x_REG.h:400
#define T2L_ADDRESS
Definition: STC15x_REG.h:577
#define T2H_ADDRESS
Definition: STC15x_REG.h:576
sfr IAP_CMD
Definition: STC15x_REG.h:809
sfr IAP_TRIG
Definition: STC15x_REG.h:810
sfr SADEN
Definition: STC15x_REG.h:709
sbit P56
Definition: STC15x_REG.h:432
sbit CCF3
Definition: STC15x_REG.h:911
sbit P22
Definition: STC15x_REG.h:404
sfr S3BUF
Definition: STC15x_REG.h:705
sfr GPIO_P7M1
Definition: STC15x_REG.h:470
#define GPIO_P5_ADDRESS
Definition: STC15x_REG.h:259
sbit P03
Definition: STC15x_REG.h:386
sbit CR
Definition: STC15x_REG.h:910
sbit P30
Definition: STC15x_REG.h:411
sfr T0H
Definition: STC15x_REG.h:615
#define CCAP2L_ADDRESS
Definition: STC15x_REG.h:835
sbit EX0
Definition: STC15x_REG.h:224
#define S4CON_ADDRESS
Definition: STC15x_REG.h:663
sbit P57
Definition: STC15x_REG.h:433
#define IAP_ADDRL_ADDRESS
Definition: STC15x_REG.h:781
sfr ISP_ADDRL
Definition: STC15x_REG.h:815
sfr GPIO_P7M0
Definition: STC15x_REG.h:489
sfr AUXR2
Definition: STC15x_REG.h:66
Definition: STC15x_REG.h:78
__IO uint8_t IRC32KCR_REG
Definition: STC15x_REG.h:87
__IO uint8_t CKSEL_REG
Definition: STC15x_REG.h:79
__IO uint8_t IRC24MCR_REG
Definition: STC15x_REG.h:83
__IO uint8_t XOSCCR_REG
Definition: STC15x_REG.h:85
__IO uint8_t CLKDIV_REG
Definition: STC15x_REG.h:81