📄 mcf5222x_gpio.h
字号:
/*
* File: mcf5222x_gpio.h
* Purpose: Register and bit definitions
*/
#ifndef __MCF5222x_GPIO_H__
#define __MCF5222x_GPIO_H__
/*********************************************************************
*
* General Purpose I/O (GPIO)
*
*********************************************************************/
/* Register read/write macros */
#define MCF_GPIO_PORTNQ (*(vuint8 *)(&__IPSBAR[0x100008]))
#define MCF_GPIO_PORTAN (*(vuint8 *)(&__IPSBAR[0x10000A]))
#define MCF_GPIO_PORTAS (*(vuint8 *)(&__IPSBAR[0x10000B]))
#define MCF_GPIO_PORTQS (*(vuint8 *)(&__IPSBAR[0x10000C]))
#define MCF_GPIO_PORTTA (*(vuint8 *)(&__IPSBAR[0x10000E]))
#define MCF_GPIO_PORTTC (*(vuint8 *)(&__IPSBAR[0x10000F]))
#define MCF_GPIO_PORTUA (*(vuint8 *)(&__IPSBAR[0x100011]))
#define MCF_GPIO_PORTUB (*(vuint8 *)(&__IPSBAR[0x100012]))
#define MCF_GPIO_PORTUC (*(vuint8 *)(&__IPSBAR[0x100013]))
#define MCF_GPIO_PORTDD (*(vuint8 *)(&__IPSBAR[0x100014]))
#define MCF_GPIO_DDRNQ (*(vuint8 *)(&__IPSBAR[0x100020]))
#define MCF_GPIO_DDRAN (*(vuint8 *)(&__IPSBAR[0x100022]))
#define MCF_GPIO_DDRAS (*(vuint8 *)(&__IPSBAR[0x100023]))
#define MCF_GPIO_DDRQS (*(vuint8 *)(&__IPSBAR[0x100024]))
#define MCF_GPIO_DDRTA (*(vuint8 *)(&__IPSBAR[0x100026]))
#define MCF_GPIO_DDRTC (*(vuint8 *)(&__IPSBAR[0x100027]))
#define MCF_GPIO_DDRUA (*(vuint8 *)(&__IPSBAR[0x100029]))
#define MCF_GPIO_DDRUB (*(vuint8 *)(&__IPSBAR[0x10002A]))
#define MCF_GPIO_DDRUC (*(vuint8 *)(&__IPSBAR[0x10002B]))
#define MCF_GPIO_DDRDD (*(vuint8 *)(&__IPSBAR[0x10002C]))
#define MCF_GPIO_SETNQ (*(vuint8 *)(&__IPSBAR[0x100038]))
#define MCF_GPIO_SETAN (*(vuint8 *)(&__IPSBAR[0x10003A]))
#define MCF_GPIO_SETAS (*(vuint8 *)(&__IPSBAR[0x10003B]))
#define MCF_GPIO_SETQS (*(vuint8 *)(&__IPSBAR[0x10003C]))
#define MCF_GPIO_SETTA (*(vuint8 *)(&__IPSBAR[0x10003E]))
#define MCF_GPIO_SETTC (*(vuint8 *)(&__IPSBAR[0x10003F]))
#define MCF_GPIO_SETUA (*(vuint8 *)(&__IPSBAR[0x100041]))
#define MCF_GPIO_SETUB (*(vuint8 *)(&__IPSBAR[0x100042]))
#define MCF_GPIO_SETUC (*(vuint8 *)(&__IPSBAR[0x100043]))
#define MCF_GPIO_SETDD (*(vuint8 *)(&__IPSBAR[0x100044]))
#define MCF_GPIO_CLRNQ (*(vuint8 *)(&__IPSBAR[0x100050]))
#define MCF_GPIO_CLRAN (*(vuint8 *)(&__IPSBAR[0x100052]))
#define MCF_GPIO_CLRAS (*(vuint8 *)(&__IPSBAR[0x100053]))
#define MCF_GPIO_CLRQS (*(vuint8 *)(&__IPSBAR[0x100054]))
#define MCF_GPIO_CLRTA (*(vuint8 *)(&__IPSBAR[0x100056]))
#define MCF_GPIO_CLRTC (*(vuint8 *)(&__IPSBAR[0x100057]))
#define MCF_GPIO_CLRUA (*(vuint8 *)(&__IPSBAR[0x100059]))
#define MCF_GPIO_CLRUB (*(vuint8 *)(&__IPSBAR[0x10005A]))
#define MCF_GPIO_CLRUC (*(vuint8 *)(&__IPSBAR[0x10005B]))
#define MCF_GPIO_CLRDD (*(vuint8 *)(&__IPSBAR[0x10005C]))
#define MCF_GPIO_PNQPAR (*(vuint16*)(&__IPSBAR[0x100068]))
#define MCF_GPIO_PANPAR (*(vuint8 *)(&__IPSBAR[0x10006A]))
#define MCF_GPIO_PASPAR (*(vuint8 *)(&__IPSBAR[0x10006B]))
#define MCF_GPIO_PQSPAR (*(vuint16*)(&__IPSBAR[0x10006C]))
#define MCF_GPIO_PTAPAR (*(vuint8 *)(&__IPSBAR[0x10006E]))
#define MCF_GPIO_PTCPAR (*(vuint8 *)(&__IPSBAR[0x10006F]))
#define MCF_GPIO_PUAPAR (*(vuint8 *)(&__IPSBAR[0x100071]))
#define MCF_GPIO_PUBPAR (*(vuint8 *)(&__IPSBAR[0x100072]))
#define MCF_GPIO_PUCPAR (*(vuint8 *)(&__IPSBAR[0x100073]))
#define MCF_GPIO_PDDPAR (*(vuint8 *)(&__IPSBAR[0x100074]))
#define MCF_GPIO_PSSR (*(vuint32*)(&__IPSBAR[0x100078]))
#define MCF_GPIO_PDSR (*(vuint32*)(&__IPSBAR[0x10007C]))
/* Bit definitions and macros for MCF_GPIO_PORTNQ */
#define MCF_GPIO_PORTNQ_PORTNQ0 (0x01)
#define MCF_GPIO_PORTNQ_PORTNQ1 (0x02)
#define MCF_GPIO_PORTNQ_PORTNQ2 (0x04)
#define MCF_GPIO_PORTNQ_PORTNQ3 (0x08)
#define MCF_GPIO_PORTNQ_PORTNQ4 (0x10)
#define MCF_GPIO_PORTNQ_PORTNQ5 (0x20)
#define MCF_GPIO_PORTNQ_PORTNQ6 (0x40)
#define MCF_GPIO_PORTNQ_PORTNQ7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTAN */
#define MCF_GPIO_PORTAN_PORTAN0 (0x01)
#define MCF_GPIO_PORTAN_PORTAN1 (0x02)
#define MCF_GPIO_PORTAN_PORTAN2 (0x04)
#define MCF_GPIO_PORTAN_PORTAN3 (0x08)
#define MCF_GPIO_PORTAN_PORTAN4 (0x10)
#define MCF_GPIO_PORTAN_PORTAN5 (0x20)
#define MCF_GPIO_PORTAN_PORTAN6 (0x40)
#define MCF_GPIO_PORTAN_PORTAN7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTAS */
#define MCF_GPIO_PORTAS_PORTAS0 (0x01)
#define MCF_GPIO_PORTAS_PORTAS1 (0x02)
#define MCF_GPIO_PORTAS_PORTAS2 (0x04)
#define MCF_GPIO_PORTAS_PORTAS3 (0x08)
#define MCF_GPIO_PORTAS_PORTAS4 (0x10)
#define MCF_GPIO_PORTAS_PORTAS5 (0x20)
#define MCF_GPIO_PORTAS_PORTAS6 (0x40)
#define MCF_GPIO_PORTAS_PORTAS7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTQS */
#define MCF_GPIO_PORTQS_PORTQS0 (0x01)
#define MCF_GPIO_PORTQS_PORTQS1 (0x02)
#define MCF_GPIO_PORTQS_PORTQS2 (0x04)
#define MCF_GPIO_PORTQS_PORTQS3 (0x08)
#define MCF_GPIO_PORTQS_PORTQS4 (0x10)
#define MCF_GPIO_PORTQS_PORTQS5 (0x20)
#define MCF_GPIO_PORTQS_PORTQS6 (0x40)
#define MCF_GPIO_PORTQS_PORTQS7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTTA */
#define MCF_GPIO_PORTTA_PORTTA0 (0x01)
#define MCF_GPIO_PORTTA_PORTTA1 (0x02)
#define MCF_GPIO_PORTTA_PORTTA2 (0x04)
#define MCF_GPIO_PORTTA_PORTTA3 (0x08)
#define MCF_GPIO_PORTTA_PORTTA4 (0x10)
#define MCF_GPIO_PORTTA_PORTTA5 (0x20)
#define MCF_GPIO_PORTTA_PORTTA6 (0x40)
#define MCF_GPIO_PORTTA_PORTTA7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTTC */
#define MCF_GPIO_PORTTC_PORTTC0 (0x01)
#define MCF_GPIO_PORTTC_PORTTC1 (0x02)
#define MCF_GPIO_PORTTC_PORTTC2 (0x04)
#define MCF_GPIO_PORTTC_PORTTC3 (0x08)
#define MCF_GPIO_PORTTC_PORTTC4 (0x10)
#define MCF_GPIO_PORTTC_PORTTC5 (0x20)
#define MCF_GPIO_PORTTC_PORTTC6 (0x40)
#define MCF_GPIO_PORTTC_PORTTC7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTUA */
#define MCF_GPIO_PORTUA_PORTUA0 (0x01)
#define MCF_GPIO_PORTUA_PORTUA1 (0x02)
#define MCF_GPIO_PORTUA_PORTUA2 (0x04)
#define MCF_GPIO_PORTUA_PORTUA3 (0x08)
#define MCF_GPIO_PORTUA_PORTUA4 (0x10)
#define MCF_GPIO_PORTUA_PORTUA5 (0x20)
#define MCF_GPIO_PORTUA_PORTUA6 (0x40)
#define MCF_GPIO_PORTUA_PORTUA7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTUB */
#define MCF_GPIO_PORTUB_PORTUB0 (0x01)
#define MCF_GPIO_PORTUB_PORTUB1 (0x02)
#define MCF_GPIO_PORTUB_PORTUB2 (0x04)
#define MCF_GPIO_PORTUB_PORTUB3 (0x08)
#define MCF_GPIO_PORTUB_PORTUB4 (0x10)
#define MCF_GPIO_PORTUB_PORTUB5 (0x20)
#define MCF_GPIO_PORTUB_PORTUB6 (0x40)
#define MCF_GPIO_PORTUB_PORTUB7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTUC */
#define MCF_GPIO_PORTUC_PORTUC0 (0x01)
#define MCF_GPIO_PORTUC_PORTUC1 (0x02)
#define MCF_GPIO_PORTUC_PORTUC2 (0x04)
#define MCF_GPIO_PORTUC_PORTUC3 (0x08)
#define MCF_GPIO_PORTUC_PORTUC4 (0x10)
#define MCF_GPIO_PORTUC_PORTUC5 (0x20)
#define MCF_GPIO_PORTUC_PORTUC6 (0x40)
#define MCF_GPIO_PORTUC_PORTUC7 (0x80)
/* Bit definitions and macros for MCF_GPIO_PORTDD */
#define MCF_GPIO_PORTDD_PORTDD0 (0x01)
#define MCF_GPIO_PORTDD_PORTDD1 (0x02)
#define MCF_GPIO_PORTDD_PORTDD2 (0x04)
#define MCF_GPIO_PORTDD_PORTDD3 (0x08)
#define MCF_GPIO_PORTDD_PORTDD4 (0x10)
#define MCF_GPIO_PORTDD_PORTDD5 (0x20)
#define MCF_GPIO_PORTDD_PORTDD6 (0x40)
#define MCF_GPIO_PORTDD_PORTDD7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRNQ */
#define MCF_GPIO_DDRNQ_DDRNQ0 (0x01)
#define MCF_GPIO_DDRNQ_DDRNQ1 (0x02)
#define MCF_GPIO_DDRNQ_DDRNQ2 (0x04)
#define MCF_GPIO_DDRNQ_DDRNQ3 (0x08)
#define MCF_GPIO_DDRNQ_DDRNQ4 (0x10)
#define MCF_GPIO_DDRNQ_DDRNQ5 (0x20)
#define MCF_GPIO_DDRNQ_DDRNQ6 (0x40)
#define MCF_GPIO_DDRNQ_DDRNQ7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRAN */
#define MCF_GPIO_DDRAN_DDRAN0 (0x01)
#define MCF_GPIO_DDRAN_DDRAN1 (0x02)
#define MCF_GPIO_DDRAN_DDRAN2 (0x04)
#define MCF_GPIO_DDRAN_DDRAN3 (0x08)
#define MCF_GPIO_DDRAN_DDRAN4 (0x10)
#define MCF_GPIO_DDRAN_DDRAN5 (0x20)
#define MCF_GPIO_DDRAN_DDRAN6 (0x40)
#define MCF_GPIO_DDRAN_DDRAN7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRAS */
#define MCF_GPIO_DDRAS_DDRAS0 (0x01)
#define MCF_GPIO_DDRAS_DDRAS1 (0x02)
#define MCF_GPIO_DDRAS_DDRAS2 (0x04)
#define MCF_GPIO_DDRAS_DDRAS3 (0x08)
#define MCF_GPIO_DDRAS_DDRAS4 (0x10)
#define MCF_GPIO_DDRAS_DDRAS5 (0x20)
#define MCF_GPIO_DDRAS_DDRAS6 (0x40)
#define MCF_GPIO_DDRAS_DDRAS7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRQS */
#define MCF_GPIO_DDRQS_DDRQS0 (0x01)
#define MCF_GPIO_DDRQS_DDRQS1 (0x02)
#define MCF_GPIO_DDRQS_DDRQS2 (0x04)
#define MCF_GPIO_DDRQS_DDRQS3 (0x08)
#define MCF_GPIO_DDRQS_DDRQS4 (0x10)
#define MCF_GPIO_DDRQS_DDRQS5 (0x20)
#define MCF_GPIO_DDRQS_DDRQS6 (0x40)
#define MCF_GPIO_DDRQS_DDRQS7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRTA */
#define MCF_GPIO_DDRTA_DDRTA0 (0x01)
#define MCF_GPIO_DDRTA_DDRTA1 (0x02)
#define MCF_GPIO_DDRTA_DDRTA2 (0x04)
#define MCF_GPIO_DDRTA_DDRTA3 (0x08)
#define MCF_GPIO_DDRTA_DDRTA4 (0x10)
#define MCF_GPIO_DDRTA_DDRTA5 (0x20)
#define MCF_GPIO_DDRTA_DDRTA6 (0x40)
#define MCF_GPIO_DDRTA_DDRTA7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRTC */
#define MCF_GPIO_DDRTC_DDRTC0 (0x01)
#define MCF_GPIO_DDRTC_DDRTC1 (0x02)
#define MCF_GPIO_DDRTC_DDRTC2 (0x04)
#define MCF_GPIO_DDRTC_DDRTC3 (0x08)
#define MCF_GPIO_DDRTC_DDRTC4 (0x10)
#define MCF_GPIO_DDRTC_DDRTC5 (0x20)
#define MCF_GPIO_DDRTC_DDRTC6 (0x40)
#define MCF_GPIO_DDRTC_DDRTC7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRUA */
#define MCF_GPIO_DDRUA_DDRUA0 (0x01)
#define MCF_GPIO_DDRUA_DDRUA1 (0x02)
#define MCF_GPIO_DDRUA_DDRUA2 (0x04)
#define MCF_GPIO_DDRUA_DDRUA3 (0x08)
#define MCF_GPIO_DDRUA_DDRUA4 (0x10)
#define MCF_GPIO_DDRUA_DDRUA5 (0x20)
#define MCF_GPIO_DDRUA_DDRUA6 (0x40)
#define MCF_GPIO_DDRUA_DDRUA7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRUB */
#define MCF_GPIO_DDRUB_DDRUB0 (0x01)
#define MCF_GPIO_DDRUB_DDRUB1 (0x02)
#define MCF_GPIO_DDRUB_DDRUB2 (0x04)
#define MCF_GPIO_DDRUB_DDRUB3 (0x08)
#define MCF_GPIO_DDRUB_DDRUB4 (0x10)
#define MCF_GPIO_DDRUB_DDRUB5 (0x20)
#define MCF_GPIO_DDRUB_DDRUB6 (0x40)
#define MCF_GPIO_DDRUB_DDRUB7 (0x80)
/* Bit definitions and macros for MCF_GPIO_DDRUC */
#define MCF_GPIO_DDRUC_DDRUC0 (0x01)
#define MCF_GPIO_DDRUC_DDRUC1 (0x02)
#define MCF_GPIO_DDRUC_DDRUC2 (0x04)
#define MCF_GPIO_DDRUC_DDRUC3 (0x08)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -