【VSCode PlatformIO】STC8单片机开发专用头文件内容分享


  • 相关篇《【VSCode PlatformIO】STC15单片机开发专用头文件内容分享》

如果使用VSCode PlatformIO开发STC单片机,自带所提供的型号的头文件很有限,除非自己添加,像STC系列单片机一些型号的头文件还没有只能依赖8052头文件使用,而8052的头文件所提供的的特殊功能寄存器是有限的。

自制STC8型号的头文件的话,需要参照8052或者STC12头文件参考来补充STC8型号的头文件。

  • VSCode PlatformIO平台的 SDCC编译器自带的头文件路径:C:\Users\Administrator\.platformio\packages\toolchain-sdcc\include

具体型号的51单片机的头文件在:C:\Users\Administrator\.platformio\packages\toolchain-sdcc\include\mcs51

VSCode PlatformIO开发的STC8系列单片机所需的SDCC头文件

  • 为了让大家少采坑这里附上已经修改好的STC8.h头文件.
  • stc8.h文件内容如下:请自行复制保存为stc8.h文件,就不在分享文件了。
  • stc8.h头文件内容如下:
#ifndef __STC8_H_
#define __STC8_H_
#include <8051.h>     /* load definitions for the 8051 core */
#include <compiler.h>
#include<lint.h>//包含SDCC_mcs51定义
#include <stdbool.h>//添加此头文件目的是为了在调用的地方可以直接使用寄存器名字来赋值,而不会出线波浪线
#ifdef REG8051_H
#undef REG8051_H
#endif
///包含本头文件后,不用另外再包含"REG51.H"//内核特殊功能寄存器
__sfr __at  (0xe0) ACC;
__sfr __at  (0xf0) B;
__sfr __at  (0xd0) PSW;
__sbit __at (0xd7) CY;
__sbit __at (0xd6) AC;
__sbit __at (0xd5) F0;
__sbit __at (0xd4) RS1;
__sbit __at (0xd3) RS0;
__sbit __at (0xd2) OV;
__sbit __at (0xd0) P;
__sfr __at  (0x81) SP;
__sfr __at  (0x82) DPL;
__sfr __at  (0x83) DPH;
__sfr __at  (0xae) TA;
__sfr __at  (0xe3) DPS;
__sfr __at  (0xe4) DPL1;
__sfr __at  (0xe5) DPH1;//I/O 口特殊功能寄存器
__sfr __at (0x80) P0;
__sfr __at (0x90) P1;
__sfr __at (0xa0) P2;
__sfr __at (0xb0) P3;
__sfr __at (0xc0) P4;
__sfr __at (0xc8) P5;
__sfr __at (0xe8) P6;
__sfr __at (0xf8) P7;
__sfr __at (0x94) P0M0;
__sfr __at (0x93) P0M1;
__sfr __at (0x92) P1M0;
__sfr __at (0x91) P1M1;
__sfr __at (0x96) P2M0;
__sfr __at (0x95) P2M1;
__sfr __at (0xb2) P3M0;
__sfr __at (0xb1) P3M1;
__sfr __at (0xb4) P4M0;
__sfr __at (0xb3) P4M1;
__sfr __at (0xca) P5M0;
__sfr __at (0xc9) P5M1;
__sfr __at (0xcc) P6M0;
__sfr __at (0xcb) P6M1;
__sfr __at (0xe2) P0M0;
__sfr __at (0xe1) P7M1;__sbit __at (0x80) P00;
__sbit __at (0x81) P01;
__sbit __at (0x82) P02;
__sbit __at (0x83) P03;
__sbit __at (0x84) P04;
__sbit __at (0x85) P05;
__sbit __at (0x86) P06;
__sbit __at (0x87) P07;
__sbit __at (0x90) P10;
__sbit __at (0x91) P11;
__sbit __at (0x92) P12;
__sbit __at (0x93) P13;
__sbit __at (0x94) P14;
__sbit __at (0x95) P15;
__sbit __at (0x96) P16;
__sbit __at (0x97) P17;
__sbit __at (0xa0) P20;
__sbit __at (0xa1) P21;
__sbit __at (0xa2) P22;
__sbit __at (0xa3) P23;
__sbit __at (0xa4) P24;
__sbit __at (0xa5) P25;
__sbit __at (0xa6) P26;
__sbit __at (0xa7) P27;
__sbit __at (0xb0) P30;
__sbit __at (0xb1) P31;
__sbit __at (0xb2) P32;
__sbit __at (0xb3) P33;
__sbit __at (0xb4) P34;
__sbit __at (0xb5) P35;
__sbit __at (0xb6) P36;
__sbit __at (0xb7) P37;
__sbit __at (0xc0) P40;
__sbit __at (0xc1) P41;
__sbit __at (0xc2) P42;
__sbit __at (0xc3) P43;
__sbit __at (0xc4) P44;
__sbit __at (0xc5) P45;
__sbit __at (0xc6) P46;
__sbit __at (0xc7) P47;
__sbit __at (0xc8) P50;
__sbit __at (0xc9) P51;
__sbit __at (0xca) P52;
__sbit __at (0xcb) P53;
__sbit __at (0xcc) P54;
__sbit __at (0xcd) P55;
__sbit __at (0xce) P56;
__sbit __at (0xcf) P57;
__sbit __at (0xe8) P60;
__sbit __at (0xe9) P61;
__sbit __at (0xea) P62;
__sbit __at (0xeb) P63;
__sbit __at (0xec) P64;
__sbit __at (0xed) P65;
__sbit __at (0xee) P66;
__sbit __at (0xef) P67;
__sbit __at (0xf8) P70;
__sbit __at (0xf9) P71;
__sbit __at (0xfa) P72;
__sbit __at (0xfb) P73;
__sbit __at (0xfc) P74;
__sbit __at (0xfd) P75;
__sbit __at (0xfe) P76;
__sbit __at (0xff) P77;//如下特殊功能寄存器位于扩展RAM区域
//访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写
#define P0PU        (*(unsigned char volatile xdata *)0xfe10)
#define P1PU        (*(unsigned char volatile xdata *)0xfe11)
#define P2PU        (*(unsigned char volatile xdata *)0xfe12)
#define P3PU        (*(unsigned char volatile xdata *)0xfe13)
#define P4PU        (*(unsigned char volatile xdata *)0xfe14)
#define P5PU        (*(unsigned char volatile xdata *)0xfe15)
#define P6PU        (*(unsigned char volatile xdata *)0xfe16)
#define P7PU        (*(unsigned char volatile xdata *)0xfe17)
#define P0NCS       (*(unsigned char volatile xdata *)0xfe18)
#define P1NCS       (*(unsigned char volatile xdata *)0xfe19)
#define P2NCS       (*(unsigned char volatile xdata *)0xfe1a)
#define P3NCS       (*(unsigned char volatile xdata *)0xfe1b)
#define P4NCS       (*(unsigned char volatile xdata *)0xfe1c)
#define P5NCS       (*(unsigned char volatile xdata *)0xfe1d)
#define P6NCS       (*(unsigned char volatile xdata *)0xfe1e)
#define P7NCS       (*(unsigned char volatile xdata *)0xfe1f)//系统管理特殊功能寄存器
__sfr __at (0x87) PCON;
#define SMOD        0x80
#define SMOD0       0x40
#define LVDF        0x20
#define POF         0x10
#define GF1         0x08
#define GF0         0x04
#define PD          0x02
#define IDL         0x01
__sfr __at (0x8e) AUXR;
#define T0x12       0x80
#define T1x12       0x40
#define UART_M0x6   0x20
#define T2R         0x10
#define T2_CT       0x08
#define T2x12       0x04
#define EXTRAM      0x02
#define S1ST2       0x01
__sfr __at (0x97) AUXR2;
#define TXLNRX      0x10
__sfr __at (0xa1) BUS_SPEED;
__sfr __at (0xa2) P_SW1;
__sfr __at (0xba) P_SW2;
#define EAXFR       0x80
__sfr __at (0xbb) VOCTRL;
__sfr __at (0xff) RSTCFG;//如下特殊功能寄存器位于扩展RAM区域
//访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写
#define CKSEL       (*(unsigned char volatile xdata *)0xfe00)
#define CLKDIV      (*(unsigned char volatile xdata *)0xfe01)
#define IRC24MCR    (*(unsigned char volatile xdata *)0xfe02)
#define XOSCCR      (*(unsigned char volatile xdata *)0xfe03)
#define IRC32KCR    (*(unsigned char volatile xdata *)0xfe04)//中断特殊功能寄存器
__sfr __at  (0xa8) IE;
__sbit __at (0xaf) EA;
__sbit __at (0xae) ELVD;
__sbit __at (0xad) EADC;
__sbit __at (0xac) ES;
__sbit __at (0xab) ET1;
__sbit __at (0xaa) EX1;
__sbit __at (0xa9) ET0;
__sbit __at (0xa8) EX0;
__sfr __at  (0xaf) IE2;
#define ET4         0x40
#define ET3         0x20
#define ES4         0x10
#define ES3         0x08
#define ET2         0x04
#define ESPI        0x02
#define ES2         0x01
__sfr __at  (0xb8) IP;
__sbit __at (0xbf) PPCA;
__sbit __at (0xbe) PLVD;
__sbit __at (0xbd) PADC;
__sbit __at (0xbc) PS;
__sbit __at (0xbb) PT1;
__sbit __at (0xba) PX1;
__sbit __at (0xb9) PT0;
__sbit __at (0xb8) PX0;
__sfr __at  (0xb5) IP2
#define PI2C        0x40
#define PCMP        0x20
#define PX4         0x10
#define PPWMFD      0x08
#define PPWM        0x04
#define PSPI        0x02
#define PS2         0x01
__sfr __at (0xb7) IPH;
#define PPCAH       0x80
#define PLVDH       0x40
#define PADCH       0x20
#define PSH         0x10
#define PT1H        0x08
#define PX1H        0x04
#define PT0H        0x02
#define PX0H        0x01
__sfr __at (0xb6) IP2H;
#define PI2CH       0x40
#define PCMPH       0x20
#define PX4H        0x10
#define PPWMFDH     0x08
#define PPWMH       0x04
#define PSPIH       0x02
#define PS2H        0x01
__sfr __at (0x8f) INTCLKO;
#define EX4         0x40
#define EX3         0x20
#define EX2         0x10
#define T2CLKO      0x04
#define T1CLKO      0x02
#define T0CLKO      0x01
__sfr __at (0xef) AUXINTIF;
#define INT4IF      0x40
#define INT3IF      0x20
#define INT2IF      0x10
#define T4IF        0x04
#define T3IF        0x02
#define T2IF        0x01//定时器特殊功能寄存器
__sfr __at  (0x88) TCON;
__sbit __at (0x8f) TF1;
__sbit __at (0x8e) TR1;
__sbit __at (0x8d) TF0;
__sbit __at (0x8c) TR0;
__sbit __at (0x8b) IE1;
__sbit __at (0x8a) IT1;
__sbit __at (0x89) IE0;
__sbit __at (0x88) IT0;
__sfr __at  (0x89) TMOD;
#define T1_GATE     0x80
#define T1_CT       0x40
#define T1_M1       0x20
#define T1_M0       0x10
#define T0_GATE     0x08
#define T0_CT       0x04
#define T0_M1       0x02
#define T0_M0       0x01
__sfr __at (0x8a) TL0;
__sfr __at (0x8b) TL1;
__sfr __at (0x8c) TH0;
__sfr __at (0x8d) TH1;
__sfr __at (0xd1) T4T3M;
#define T4R         0x80
#define T4_CT       0x40
#define T4x12       0x20
#define T4CLKO      0x10
#define T3R         0x08
#define T3_CT       0x04
#define T3x12       0x02
#define T3CLKO      0x01
__sfr __at (0xd2) T4H;
__sfr __at (0xd3) T4L;
__sfr __at (0xd4) T3H;
__sfr __at (0xd5) T3L;
__sfr __at (0xd6) T2H;
__sfr __at (0xd7) T2L;
__sfr __at (0xd2) TH4;
__sfr __at (0xd3) TL4;
__sfr __at (0xd4) TH3;
__sfr __at (0xd5) TL3;
__sfr __at (0xd6) TH2;
__sfr __at (0xd7) TL2;
__sfr __at (0xaa) WKTCL;
__sfr __at (0xab) WKTCH;
#define WKTEN       0x80
__sfr __at (0xc1) WDT_CONTR;
#define WDT_FLAG    0x80
#define EN_WDT      0x20
#define CLR_WDT     0x10
#define IDL_WDT     0x08//串行口特殊功能寄存器
__sfr __at  (0x98) SCON;
__sbit __at (0x9f) SM0;
__sbit __at (0x9e) SM1;
__sbit __at (0x9d) SM2;
__sbit __at (0x9c) REN;
__sbit __at (0x9b) TB8;
__sbit __at (0x9a) RB8;
__sbit __at (0x99) TI;
__sbit __at (0x98) RI;
__sfr __at  (0x99) SBUF;
__sfr __at  (0x9a) S2CON;
#define S2SM0       0x80
#define S2ST4       0x40
#define S2SM2       0x20
#define S2REN       0x10
#define S2TB8       0x08
#define S2RB8       0x04
#define S2TI        0x02
#define S2RI        0x01
__sfr __at (0x9b) S2BUF;
__sfr __at (0xac) S3CON;
#define S3SM0       0x80
#define S3ST4       0x40
#define S3SM2       0x20
#define S3REN       0x10
#define S3TB8       0x08
#define S3RB8       0x04
#define S3TI        0x02
#define S3RI        0x01
__sfr __at (0xad) S3BUF;
__sfr __at (0x84) S4CON;
#define S4SM0       0x80
#define S4ST4       0x40
#define S4SM2       0x20
#define S4REN       0x10
#define S4TB8       0x08
#define S4RB8       0x04
#define S4TI        0x02
#define S4RI        0x01
__sfr __at (0x85) S4BUF;
__sfr __at (0xa9) SADDR;
__sfr __at (0xb9) SADEN;//ADC 特殊功能寄存器
__sfr __at (0xbc) ADC_CONTR;
#define ADC_POWER   0x80
#define ADC_START   0x40
#define ADC_FLAG    0x20
__sfr __at (0xbd) ADC_RES;
__sfr __at (0xbe) ADC_RESL;
__sfr __at (0xde) ADCCFG;
#define ADC_RESFMT  0x20//SPI 特殊功能寄存器
__sfr __at (0xcd) SPSTAT;
#define SPIF        0x80
#define WCOL        0x40
__sfr __at (0xce) SPCTL;
#define SSIG        0x80
#define SPEN        0x40
#define DORD        0x20
#define MSTR        0x10
#define CPOL        0x08
#define CPHA        0x04
__sfr __at (0xcf) SPDAT;//IAP/ISP 特殊功能寄存器
__sfr __at (0xc2) IAP_DATA;
__sfr __at (0xc3) IAP_ADDRH;
__sfr __at (0xc4) IAP_ADDRL;
__sfr __at (0xc5) IAP_CMD;
#define IAP_IDL     0x00
#define IAP_READ    0x01
#define IAP_WRITE   0x02
#define IAP_ERASE   0x03
__sfr __at (0xc6) IAP_TRIG;
__sfr __at (0xc7) IAP_CONTR;
#define IAPEN       0x80
#define SWBS        0x40
#define SWRST       0x20
#define CMD_FAIL    0x10
__sfr __at (0xc2) ISP_DATA;
__sfr __at (0xc3) ISP_ADDRH;
__sfr __at (0xc4) ISP_ADDRL;
__sfr __at (0xc5) ISP_CMD;
__sfr __at (0xc6) ISP_TRIG;
__sfr __at (0xc7) ISP_CONTR;//比较器特殊功能寄存器
__sfr __at (0xe6) CMPCR1;
#define CMPEN       0x80
#define CMPIF       0x40
#define PIE         0x20
#define NIE         0x10
#define PIS         0x08
#define NIS         0x04
#define CMPOE       0x02
#define CMPRES      0x01
__sfr __at (0xe7) CMPCR2;
#define INVCMPO     0x80
#define DISFLT      0x40//PCA/PWM 特殊功能寄存器
__sfr __at  (0xd8) CCON;
__sbit __at (0xdf) CF;
__sbit __at (0xde) CR;
__sbit __at (0xdb) CCF3;
__sbit __at (0xda) CCF2;
__sbit __at (0xd9) CCF1;
__sbit __at (0xd8) CCF0;
__sfr __at  (0xd9) CMOD;
#define CIDL        0x80
#define ECF         0x01
__sfr __at (0xe9) CL;
__sfr __at (0xf9) CH;
__sfr __at (0xda) CCAPM0;
#define ECOM0       0x40
#define CCAPP0      0x20
#define CCAPN0      0x10
#define MAT0        0x08
#define TOG0        0x04
#define PWM0        0x02
#define ECCF0       0x01
__sfr __at (0xdb) CCAPM1;
#define ECOM1       0x40
#define CCAPP1      0x20
#define CCAPN1      0x10
#define MAT1        0x08
#define TOG1        0x04
#define PWM1        0x02
#define ECCF1       0x01
__sfr __at (0xdc) CCAPM2;
#define ECOM2       0x40
#define CCAPP2      0x20
#define CCAPN2      0x10
#define MAT2        0x08
#define TOG2        0x04
#define PWM2        0x02
#define ECCF2       0x01
__sfr __at (0xdd) CCAPM3;
#define ECOM3       0x40
#define CCAPP3      0x20
#define CCAPN3      0x10
#define MAT3        0x08
#define TOG3        0x04
#define PWM3        0x02
#define ECCF3       0x01
__sfr __at (0xea) CCAP0L;
__sfr __at (0xeb) CCAP1L;
__sfr __at (0xec) CCAP2L;
__sfr __at (0xed) CCAP3L;
__sfr __at (0xfa) CCAP0H;
__sfr __at (0xfb) CCAP1H;
__sfr __at (0xfc) CCAP2H;
__sfr __at (0xfd) CCAP3H;
__sfr __at (0xf2) PCA_PWM0;
__sfr __at (0xf3) PCA_PWM1;
__sfr __at (0xf4) PCA_PWM2;
__sfr __at (0xf5) PCA_PWM3;//增强型PWM波形发生器特殊功能寄存器
__sfr __at (0xf1) PWMCFG;
#define CBIF        0x80
#define ETADC       0x40
__sfr __at (0xf6) PWMIF;
#define C7IF        0x80
#define C6IF        0x40
#define C5IF        0x20
#define C4IF        0x10
#define C3IF        0x08
#define C2IF        0x04
#define C1IF        0x02
#define C0IF        0x01
__sfr __at (0xf7) PWMFDCR;
#define INVCMP      0x80
#define INVIO       0x40
#define ENFD        0x20
#define FLTFLIO     0x10
#define EFDI        0x08
#define FDCMP       0x04
#define FDIO        0x02
#define FDIF        0x01
__sfr __at (0xfe) PWMCR;
#define ENPWM       0x80
#define ECBI        0x40//如下特殊功能寄存器位于扩展RAM区域
//访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写
#define PWMC        (*(unsigned int  volatile xdata *)0xfff0)
#define PWMCH       (*(unsigned char volatile xdata *)0xfff0)
#define PWMCL       (*(unsigned char volatile xdata *)0xfff1)
#define PWMCKS      (*(unsigned char volatile xdata *)0xfff2)
#define TADCP       (*(unsigned char volatile xdata *)0xfff3)
#define TADCPH      (*(unsigned char volatile xdata *)0xfff3)
#define TADCPL      (*(unsigned char volatile xdata *)0xfff4)
#define PWM0T1      (*(unsigned int  volatile xdata *)0xff00)
#define PWM0T1H     (*(unsigned char volatile xdata *)0xff00)
#define PWM0T1L     (*(unsigned char volatile xdata *)0xff01)
#define PWM0T2      (*(unsigned int  volatile xdata *)0xff02)
#define PWM0T2H     (*(unsigned char volatile xdata *)0xff02)
#define PWM0T2L     (*(unsigned char volatile xdata *)0xff03)
#define PWM0CR      (*(unsigned char volatile xdata *)0xff04)
#define PWM0HLD     (*(unsigned char volatile xdata *)0xff05)
#define PWM1T1      (*(unsigned int  volatile xdata *)0xff10)
#define PWM1T1H     (*(unsigned char volatile xdata *)0xff10)
#define PWM1T1L     (*(unsigned char volatile xdata *)0xff11)
#define PWM1T2      (*(unsigned int  volatile xdata *)0xff12)
#define PWM1T2H     (*(unsigned char volatile xdata *)0xff12)
#define PWM1T2L     (*(unsigned char volatile xdata *)0xff13)
#define PWM1CR      (*(unsigned char volatile xdata *)0xff14)
#define PWM1HLD     (*(unsigned char volatile xdata *)0xff15)
#define PWM2T1      (*(unsigned int  volatile xdata *)0xff20)
#define PWM2T1H     (*(unsigned char volatile xdata *)0xff20)
#define PWM2T1L     (*(unsigned char volatile xdata *)0xff21)
#define PWM2T2      (*(unsigned int  volatile xdata *)0xff22)
#define PWM2T2H     (*(unsigned char volatile xdata *)0xff22)
#define PWM2T2L     (*(unsigned char volatile xdata *)0xff23)
#define PWM2CR      (*(unsigned char volatile xdata *)0xff24)
#define PWM2HLD     (*(unsigned char volatile xdata *)0xff25)
#define PWM3T1      (*(unsigned int  volatile xdata *)0xff30)
#define PWM3T1H     (*(unsigned char volatile xdata *)0xff30)
#define PWM3T1L     (*(unsigned char volatile xdata *)0xff31)
#define PWM3T2      (*(unsigned int  volatile xdata *)0xff32)
#define PWM3T2H     (*(unsigned char volatile xdata *)0xff32)
#define PWM3T2L     (*(unsigned char volatile xdata *)0xff33)
#define PWM3CR      (*(unsigned char volatile xdata *)0xff34)
#define PWM3HLD     (*(unsigned char volatile xdata *)0xff35)
#define PWM4T1      (*(unsigned int  volatile xdata *)0xff40)
#define PWM4T1H     (*(unsigned char volatile xdata *)0xff40)
#define PWM4T1L     (*(unsigned char volatile xdata *)0xff41)
#define PWM4T2      (*(unsigned int  volatile xdata *)0xff42)
#define PWM4T2H     (*(unsigned char volatile xdata *)0xff42)
#define PWM4T2L     (*(unsigned char volatile xdata *)0xff43)
#define PWM4CR      (*(unsigned char volatile xdata *)0xff44)
#define PWM4HLD     (*(unsigned char volatile xdata *)0xff45)
#define PWM5T1      (*(unsigned int  volatile xdata *)0xff50)
#define PWM5T1H     (*(unsigned char volatile xdata *)0xff50)
#define PWM5T1L     (*(unsigned char volatile xdata *)0xff51)
#define PWM5T2      (*(unsigned int  volatile xdata *)0xff52)
#define PWM5T2H     (*(unsigned char volatile xdata *)0xff52)
#define PWM5T2L     (*(unsigned char volatile xdata *)0xff53)
#define PWM5CR      (*(unsigned char volatile xdata *)0xff54)
#define PWM5HLD     (*(unsigned char volatile xdata *)0xff55)
#define PWM6T1      (*(unsigned int  volatile xdata *)0xff60)
#define PWM6T1H     (*(unsigned char volatile xdata *)0xff60)
#define PWM6T1L     (*(unsigned char volatile xdata *)0xff61)
#define PWM6T2      (*(unsigned int  volatile xdata *)0xff62)
#define PWM6T2H     (*(unsigned char volatile xdata *)0xff62)
#define PWM6T2L     (*(unsigned char volatile xdata *)0xff63)
#define PWM6CR      (*(unsigned char volatile xdata *)0xff64)
#define PWM6HLD     (*(unsigned char volatile xdata *)0xff65)
#define PWM7T1      (*(unsigned int  volatile xdata *)0xff70)
#define PWM7T1H     (*(unsigned char volatile xdata *)0xff70)
#define PWM7T1L     (*(unsigned char volatile xdata *)0xff71)
#define PWM7T2      (*(unsigned int  volatile xdata *)0xff72)
#define PWM7T2H     (*(unsigned char volatile xdata *)0xff72)
#define PWM7T2L     (*(unsigned char volatile xdata *)0xff73)
#define PWM7CR      (*(unsigned char volatile xdata *)0xff74)
#define PWM7HLD     (*(unsigned char volatile xdata *)0xff75)//I2C特殊功能寄存器
//如下特殊功能寄存器位于扩展RAM区域
//访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写
#define I2CCFG      (*(unsigned char volatile xdata *)0xfe80)
#define ENI2C       0x80
#define MSSL        0x40
#define I2CMSCR     (*(unsigned char volatile xdata *)0xfe81)
#define EMSI        0x80
#define I2CMSST     (*(unsigned char volatile xdata *)0xfe82)
#define MSBUSY      0x80
#define MSIF        0x40
#define MSACKI      0x02
#define MSACKO      0x01
#define I2CSLCR     (*(unsigned char volatile xdata *)0xfe83)
#define ESTAI       0x40
#define ERXI        0x20
#define ETXI        0x10
#define ESTOI       0x08
#define SLRST       0x01
#define I2CSLST     (*(unsigned char volatile xdata *)0xfe84)
#define SLBUSY      0x80
#define STAIF       0x40
#define RXIF        0x20
#define TXIF        0x10
#define STOIF       0x08
#define TXING       0x04
#define SLACKI      0x02
#define SLACKO      0x01
#define I2CSLADR    (*(unsigned char volatile xdata *)0xfe85)
#define I2CTXD      (*(unsigned char volatile xdata *)0xfe86)
#define I2CRXD      (*(unsigned char volatile xdata *)0xfe87)/#endif

【VSCode PlatformIO】STC8系列SDCC专用头文件内容分享相关推荐

  1. 【VSCode PlatformIO】STC15系列单片机开发专用头文件内容分享

    [VSCode PlatformIO]STC15系列单片机开发专用头文件内容分享 如果使用VSCode PlatformIO开发STC单片机,所提供的型号的头文件很有限,除非自己添加,像STC系列单片 ...

  2. 【VSCode PlatformIO】开发STC单片机头文件和常用外设驱动头文件获取方式

    [VSCode PlatformIO]开发STC单片机头文件和常用外设驱动头文件获取方式 相关篇<[VSCode PlatformIO] STC单片机开发头文件制作与添加方法> 相关篇&l ...

  3. 【STC头文件】STC8系列之STC8G头文件寄存器注释

    [STC头文件]STC8系列之STC8G头文件寄存器注释 特殊功能寄存器介绍 定时器/计数器工作方式寄存器(TMOD ) 符号 地址 B7 B6 B5 B4 B3 B2 B1 B0 TMOD(定时器模 ...

  4. VScode找不到C++万能头文件<bits/stdc++.h>解决办法

    VScode找不到C++万能头文件<bits/stdc++.h>解决办法 一.万能头文件介绍 万能头文件<bits/stdc++> 中包含了 C++中大部分头文件,在大部分做题 ...

  5. apue.h头文件内容

    apue.h是作者自己写的一个文件,包含了常用的头文件,系统不自带.其中包含了常用的头文件,以及出错处理函数的定义.使用起来确实很方便. apue.h内容如下: [cpp] #ifndef _APUE ...

  6. c++使用多个库的头文件内容里有名字相同问题

    首先说下结构体,如果两个头文件定义的结构体内容不一样,但名字一样,当一个文件同时包含着两个头文件的时候,就会报如下错误: 此时,在不修改头文件的情况下(最好不要改动,不然第三方库可能调用出错),使用命 ...

  7. vscode中找不到系统头文件 定义的问题

    操作系统:centos7 自带的编译器:gcc4.8.5,我安装了编译器:gcc11.2.1 打开zookepeer-client-c项目的时候出现这样的问题: 这几个定义在netdb.h中的宏和结构 ...

  8. MIT-BIN 心律失常数据库记录的头文件内容和含义

    用写字板 打开文件 100.hea,会显示下面的内容: 100 2 360 650000 100.dat 212 200 11 1024 995 -22131 0 MLII 100.dat 212 2 ...

  9. vscode无法识别头文件“cannot open source file “gnu/stubs-64.h“”

    使用vscode时,一直无法识别头文件,于是首先尝试: g++ -v -E -x c++ - 查看g++的包含路径 将路径添加到c_cpp_properties.json下 然后还是不好用... 又根 ...

最新文章

  1. mysql根据字段长度查询_SQL语句如何查询某一字符串字段长度等于某个值的所有记录...
  2. 如果宁静是 Oracle,万茜、张雨绮、黄圣依是什么?
  3. 网络工程原理与实践教程实验安排
  4. 【系列5】使用Dockerfile创建带weblogic的Centos Docker镜像
  5. Android——按钮的事件监听
  6. 为什么要学习C++,它到底能做什么?
  7. c语言之-umask()函数
  8. Flink的Group by window图示(转载)
  9. pyside2 镜像安装_pyside2 镜像安装_【PySide2学习笔记】0_下载安装
  10. php 开源 采集,迅睿CMS 火车头内容采集
  11. python撩妹代码_Python十行代码让你秒变撩妹达人!想学?
  12. OCS2007R2升级LyncSrv2013 PART1:基础准备
  13. 随机信号分析实验(matlab仿真实验)
  14. 计算机怎么屏幕保护,屏保设置在哪里设置 电脑屏保怎么设置
  15. 老机器上安装了kubuntu先尝试安装Manjaro但是鼠标按键无法使用彻底解决办法
  16. android获取路由器ip地址吗,查看路由器IP地址方法(管理后台地址)
  17. ImportError: cannot import name '_validate_lengths'
  18. Hibernate5相关特性参考
  19. SQL 练习题标准答案(点个赞呀)
  20. 爬虫技术:携程爬虫阳光问政数据

热门文章

  1. 有关n阶拉丁方阵的问题
  2. HTML5 Canvas | w3cschool菜鸟教程
  3. 天顶围棋 8 zenith 8_2019年第九届世界围棋巅峰对决盛大启幕 安徽阜阳点燃黑白激情...
  4. windows查看系统信息的方法
  5. 打印机 树莓派安装cpus_树莓派3-搭建网络打印机服务器(支持PC,IPhone,Android打印)...
  6. js 实现简单的下拉加载更多
  7. 使用JS代码简单实现九九乘法表
  8. hiredis异步操作模型
  9. 谷歌开源项目Chromium的源码获取与项目构建(Win7+vs10/vs13)
  10. CMakeList 中引用系统环境变量中的 include 文件,以及 lib 文件