W7500x.h


CS – CMOS/Schmitt trigger input buffer select
P - PAD
YA – Analog Input (connect to ADC input)
Y – Digital Input
IE – Input buffer enable
인터럽트가 아니고, 입력버퍼.
1일때, 루프백신호 Y가 활성화 된다.(출력신호가 다시 들어옴. 어디다 쓰지?)
CS – CMOS/Schmitt trigger input buffer select
PU – Pull-up enable
A – Digital Output
DS – Driving strength select
L일때, 속도가 더 빠르다.
GPIO관련 레지스터는 3가지.
#define GPIOA ((GPIO_TypeDef *) (GPIOA_BASE) )
#define GPIOB ((GPIO_TypeDef *) (GPIOB_BASE) )
#define GPIOC ((GPIO_TypeDef *) (GPIOC_BASE) )
#define PA_AFSR ((P_Port_Def *) (P_AFSR_BASE + 0x00000000UL)) /* PA_XX Pad Alternate Function Select Register */
#define PB_AFSR ((P_Port_Def *) (P_AFSR_BASE + 0x00000040UL)) /* PB_XX Pad Alternate Function Select Register */
#define PC_AFSR ((P_Port_Def *) (P_AFSR_BASE + 0x00000080UL)) /* PC_XX Pad Alternate Function Select Register */
#define PA_PCR ((P_Port_Def *) (P_PCR_BASE + 0x00000000UL)) /* PA_XX Pad Control Register */
#define PB_PCR ((P_Port_Def *) (P_PCR_BASE + 0x00000040UL)) /* PB_XX Pad Control Register */
#define PC_PCR ((P_Port_Def *) (P_PCR_BASE + 0x00000080UL)) /* PC_XX Pad Control Register */
typedef struct
{
__IO uint32_t DATA; /* DATA Register (R/W), offset : 0x000 */
__IO uint32_t DATAOUT; /* Data Output Latch Register (R/W), offset : 0x004 */
uint32_t RESERVED0[2];
__IO uint32_t OUTENSET; /* Output Enable Set Register (R/W) offset : 0x010 */
__IO uint32_t OUTENCLR; /* Output Enable Clear Register (R/W) offset : 0x014 */
__IO uint32_t RESERVED1; /* Alternate Function Set Register (R/W) offset : 0x018 */
__IO uint32_t RESERVED2; /* Alternate Function Clear Register (R/W) offset : 0x01C */
__IO uint32_t INTENSET; /* Interrupt Enable Set Register (R/W) offset : 0x020 */
__IO uint32_t INTENCLR; /* Interrupt Enable Clear Register (R/W) offset : 0x024 */
__IO uint32_t INTTYPESET; /* Interrupt Type Set Register (R/W) offset : 0x028 */
__IO uint32_t INTTYPECLR; /* Interrupt Type Clear Register (R/W) offset : 0x02C */
__IO uint32_t INTPOLSET; /* Interrupt Polarity Set Register (R/W) offset : 0x030 */
__IO uint32_t INTPOLCLR; /* Interrupt Polarity Clear Register (R/W) offset : 0x034 */
union {
__I uint32_t INTSTATUS; /* Interrupt Status Register (R/ ) offset : 0x038 */
__O uint32_t INTCLEAR; /* Interrupt Clear Register ( /W) offset : 0x038 */
}Interrupt;
uint32_t RESERVED3[241];
__IO uint32_t LB_MASKED[256]; /* Lower byte Masked Access Register (R/W) offset : 0x400 - 0x7FC */
__IO uint32_t UB_MASKED[256]; /* Upper byte Masked Access Register (R/W) offset : 0x800 - 0xBFC */
} GPIO_TypeDef;
8비트 CPU보다 훨씬 복잡해보인다..