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