📄 stm8s207r.h
字号:
/* STM8S207R.h */
/* Copyright (c) 2003-2008 STMicroelectronics */
#ifndef __STM8S207R__
#define __STM8S207R__
/* STM8S207R */
/* Check MCU name */
#ifdef MCU_NAME
#define STM8S207R 1
#if (MCU_NAME != STM8S207R)
#error "wrong include file STM8S207R.h for chosen MCU!"
#endif
#endif
#define STVD7_EXTERN
#ifdef __HIWARE__
/* Required to avoid errors at link time, as the Metrowerks compiler */
/* prohibits multiple definitions of the same variable. */
/* In order to define once the registers, add */
/* "#define __DEFINE_REGISTERS_STVD7_INCLUDE__" */
/* before including this file in one of your application files. */
#ifndef __DEFINE_REGISTERS_STVD7_INCLUDE__
#undef STVD7_EXTERN
#define STVD7_EXTERN extern
#endif
#endif
#ifdef __CSMC__
#define DEF_8BIT_REG_AT(NAME,ADDRESS) volatile unsigned char NAME @ADDRESS
#define DEF_16BIT_REG_AT(NAME,ADDRESS) volatile unsigned int NAME @ADDRESS
#endif
#ifdef __HIWARE__
#define DEF_8BIT_REG_AT(NAME,ADDRESS) STVD7_EXTERN volatile unsigned char NAME @ADDRESS
#define DEF_16BIT_REG_AT(NAME,ADDRESS) STVD7_EXTERN volatile unsigned int NAME @ADDRESS
#endif
#ifdef __RAISONANCE__
#define DEF_8BIT_REG_AT(NAME,ADDRESS) at ADDRESS hreg NAME
#define DEF_16BIT_REG_AT(NAME,ADDRESS) at ADDRESS hreg16 NAME
#endif
/* Port A */
/*****************************************************************/
/* Port A data output latch register */
DEF_8BIT_REG_AT(PA_ODR,0x5000);
/* Port A input pin value register */
DEF_8BIT_REG_AT(PA_IDR,0x5001);
/* Port A data direction register */
DEF_8BIT_REG_AT(PA_DDR,0x5002);
/* Port A control register 1 */
DEF_8BIT_REG_AT(PA_CR1,0x5003);
/* Port A control register 2 */
DEF_8BIT_REG_AT(PA_CR2,0x5004);
/* Port B */
/*****************************************************************/
/* Port B data output latch register */
DEF_8BIT_REG_AT(PB_ODR,0x5005);
/* Port B input pin value register */
DEF_8BIT_REG_AT(PB_IDR,0x5006);
/* Port B data direction register */
DEF_8BIT_REG_AT(PB_DDR,0x5007);
/* Port B control register 1 */
DEF_8BIT_REG_AT(PB_CR1,0x5008);
/* Port B control register 2 */
DEF_8BIT_REG_AT(PB_CR2,0x5009);
/* Port C */
/*****************************************************************/
/* Port C data output latch register */
DEF_8BIT_REG_AT(PC_ODR,0x500a);
/* Port C input pin value register */
DEF_8BIT_REG_AT(PC_IDR,0x500b);
/* Port C data direction register */
DEF_8BIT_REG_AT(PC_DDR,0x500c);
/* Port C control register 1 */
DEF_8BIT_REG_AT(PC_CR1,0x500d);
/* Port C control register 2 */
DEF_8BIT_REG_AT(PC_CR2,0x500e);
/* Port D */
/*****************************************************************/
/* Port D data output latch register */
DEF_8BIT_REG_AT(PD_ODR,0x500f);
/* Port D input pin value register */
DEF_8BIT_REG_AT(PD_IDR,0x5010);
/* Port D data direction register */
DEF_8BIT_REG_AT(PD_DDR,0x5011);
/* Port D control register 1 */
DEF_8BIT_REG_AT(PD_CR1,0x5012);
/* Port D control register 2 */
DEF_8BIT_REG_AT(PD_CR2,0x5013);
/* Port E */
/*****************************************************************/
/* Port E data output latch register */
DEF_8BIT_REG_AT(PE_ODR,0x5014);
/* Port E input pin value register */
DEF_8BIT_REG_AT(PE_IDR,0x5015);
/* Port E data direction register */
DEF_8BIT_REG_AT(PE_DDR,0x5016);
/* Port E control register 1 */
DEF_8BIT_REG_AT(PE_CR1,0x5017);
/* Port E control register 2 */
DEF_8BIT_REG_AT(PE_CR2,0x5018);
/* Port F */
/*****************************************************************/
/* Port F data output latch register */
DEF_8BIT_REG_AT(PF_ODR,0x5019);
/* Port F input pin value register */
DEF_8BIT_REG_AT(PF_IDR,0x501a);
/* Port F data direction register */
DEF_8BIT_REG_AT(PF_DDR,0x501b);
/* Port F control register 1 */
DEF_8BIT_REG_AT(PF_CR1,0x501c);
/* Port F control register 2 */
DEF_8BIT_REG_AT(PF_CR2,0x501d);
/* Port G */
/*****************************************************************/
/* Port G data output latch register */
DEF_8BIT_REG_AT(PG_ODR,0x501e);
/* Port G input pin value register */
DEF_8BIT_REG_AT(PG_IDR,0x501f);
/* Port G data direction register */
DEF_8BIT_REG_AT(PG_DDR,0x5020);
/* Port G control register 1 */
DEF_8BIT_REG_AT(PG_CR1,0x5021);
/* Port G control register 2 */
DEF_8BIT_REG_AT(PG_CR2,0x5022);
/* Port I */
/*****************************************************************/
/* Port I data output latch register */
DEF_8BIT_REG_AT(PI_ODR,0x5028);
/* Port I input pin value register */
DEF_8BIT_REG_AT(PI_IDR,0x5029);
/* Port I data direction register */
DEF_8BIT_REG_AT(PI_DDR,0x502a);
/* Port I control register 1 */
DEF_8BIT_REG_AT(PI_CR1,0x502b);
/* Port I control register 2 */
DEF_8BIT_REG_AT(PI_CR2,0x502c);
/* Flash */
/*****************************************************************/
/* Flash control register 1 */
DEF_8BIT_REG_AT(FLASH_CR1,0x505a);
/* Flash control register 2 */
DEF_8BIT_REG_AT(FLASH_CR2,0x505b);
/* Flash complementary control register 2 */
DEF_8BIT_REG_AT(FLASH_NCR2,0x505c);
/* Flash protection register */
DEF_8BIT_REG_AT(FLASH_FPR,0x505d);
/* Flash complementary protection register */
DEF_8BIT_REG_AT(FLASH_NFPR,0x505e);
/* Flash in-application programming status register */
DEF_8BIT_REG_AT(FLASH_IAPSR,0x505f);
/* Flash Program memory unprotection register */
DEF_8BIT_REG_AT(FLASH_PUKR,0x5062);
/* Data EEPROM unprotection register */
DEF_8BIT_REG_AT(FLASH_DUKR,0x5064);
/* External Interrupt Control Register (ITC) */
/*****************************************************************/
/* External interrupt control register 1 */
DEF_8BIT_REG_AT(EXTI_CR1,0x50a0);
/* External interrupt control register 2 */
DEF_8BIT_REG_AT(EXTI_CR2,0x50a1);
/* Reset (RST) */
/*****************************************************************/
/* Reset status register 1 */
DEF_8BIT_REG_AT(RST_SR,0x50b3);
/* Clock Control (CLK) */
/*****************************************************************/
/* Internal clock control register */
DEF_8BIT_REG_AT(CLK_ICKR,0x50c0);
/* External clock control register */
DEF_8BIT_REG_AT(CLK_ECKR,0x50c1);
/* Clock master status register */
DEF_8BIT_REG_AT(CLK_CMSR,0x50c3);
/* Clock master switch register */
DEF_8BIT_REG_AT(CLK_SWR,0x50c4);
/* Clock switch control register */
DEF_8BIT_REG_AT(CLK_SWCR,0x50c5);
/* Clock divider register */
DEF_8BIT_REG_AT(CLK_CKDIVR,0x50c6);
/* Peripheral clock gating register 1 */
DEF_8BIT_REG_AT(CLK_PCKENR1,0x50c7);
/* Clock security system register */
DEF_8BIT_REG_AT(CLK_CSSR,0x50c8);
/* Configurable clock control register */
DEF_8BIT_REG_AT(CLK_CCOR,0x50c9);
/* Peripheral clock gating register 2 */
DEF_8BIT_REG_AT(CLK_PCKENR2,0x50ca);
/* CAN clock control register */
DEF_8BIT_REG_AT(CLK_CANCCR,0x50cb);
/* HSI clock calibration trimming register */
DEF_8BIT_REG_AT(CLK_HSITRIMR,0x50cc);
/* SWIM clock control register */
DEF_8BIT_REG_AT(CLK_SWIMCCR,0x50cd);
/* Window Watchdog (WWDG) */
/*****************************************************************/
/* WWDG Control Register */
DEF_8BIT_REG_AT(WWDG_CR,0x50d1);
/* WWDR Window Register */
DEF_8BIT_REG_AT(WWDG_WR,0x50d2);
/* Independent Watchdog (IWDG) */
/*****************************************************************/
/* IWDG Key Register */
DEF_8BIT_REG_AT(IWDG_KR,0x50e0);
/* IWDG Prescaler Register */
DEF_8BIT_REG_AT(IWDG_PR,0x50e1);
/* IWDG Reload Register */
DEF_8BIT_REG_AT(IWDG_RLR,0x50e2);
/* Auto Wake-Up (AWU) */
/*****************************************************************/
/* AWU Control/Status Register */
DEF_8BIT_REG_AT(AWU_CSR,0x50f0);
/* AWU asynchronous prescaler buffer register */
DEF_8BIT_REG_AT(AWU_APR,0x50f1);
/* AWU Timebase selection register */
DEF_8BIT_REG_AT(AWU_TBR,0x50f2);
/* Beeper (BEEP) */
/*****************************************************************/
/* BEEP Control/Status Register */
DEF_8BIT_REG_AT(BEEP_CSR,0x50f3);
/* Serial Peripheral Interface (SPI) */
/*****************************************************************/
/* SPI Control Register 1 */
DEF_8BIT_REG_AT(SPI_CR1,0x5200);
/* SPI Control Register 2 */
DEF_8BIT_REG_AT(SPI_CR2,0x5201);
/* SPI Interrupt Control Register */
DEF_8BIT_REG_AT(SPI_ICR,0x5202);
/* SPI Status Register */
DEF_8BIT_REG_AT(SPI_SR,0x5203);
/* SPI Data Register */
DEF_8BIT_REG_AT(SPI_DR,0x5204);
/* SPI CRC Polynomial Register */
DEF_8BIT_REG_AT(SPI_CRCPR,0x5205);
/* SPI Rx CRC Register */
DEF_8BIT_REG_AT(SPI_RXCRCR,0x5206);
/* SPI Tx CRC Register */
DEF_8BIT_REG_AT(SPI_TXCRCR,0x5207);
/* I2C Bus Interface (I2C) */
/*****************************************************************/
/* I2C control register 1 */
DEF_8BIT_REG_AT(I2C_CR1,0x5210);
/* I2C control register 2 */
DEF_8BIT_REG_AT(I2C_CR2,0x5211);
/* I2C frequency register */
DEF_8BIT_REG_AT(I2C_FREQR,0x5212);
/* I2C Own address register low */
DEF_8BIT_REG_AT(I2C_OARL,0x5213);
/* I2C Own address register high */
DEF_8BIT_REG_AT(I2C_OARH,0x5214);
/* I2C data register */
DEF_8BIT_REG_AT(I2C_DR,0x5216);
/* I2C status register 1 */
DEF_8BIT_REG_AT(I2C_SR1,0x5217);
/* I2C status register 2 */
DEF_8BIT_REG_AT(I2C_SR2,0x5218);
/* I2C status register 3 */
DEF_8BIT_REG_AT(I2C_SR3,0x5219);
/* I2C interrupt control register */
DEF_8BIT_REG_AT(I2C_ITR,0x521a);
/* I2C Clock control register low */
DEF_8BIT_REG_AT(I2C_CCRL,0x521b);
/* I2C Clock control register high */
DEF_8BIT_REG_AT(I2C_CCRH,0x521c);
/* I2C TRISE register */
DEF_8BIT_REG_AT(I2C_TRISER,0x521d);
/* I2C packet error checking register */
DEF_8BIT_REG_AT(I2C_PECR,0x521e);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -