include/asm-arm/arch/S3C2410.h
— Port A (GPA): 23-output port
— Port B (GPB): 11-input/output port
— Port C (GPC): 16-input/output port
— Port D (GPD): 16-input/output port
— Port E (GPE): 16-input/output port
— Port F (GPF): 8-input/output port
— Port G (GPG): 16-input/output port
— Port H (GPH): 11-input/output port
#define GPIO_C8 MAKE_GPIO_NUM(PORTC_OFS, 8)
#define MAKE_GPIO_NUM(p, o) ((p << GPIO_PORT_SHIFTT) | (o << GPIO_OFS_SHIFT))
#define GPIO_OFS_SHIFT 0
#define GPIO_PORT_SHIFTT 8
#define PORTA_OFS 0
#define PORTB_OFS 1
#define PORTC_OFS 2
#define PORTD_OFS 3
#define PORTE_OFS 4
#define PORTF_OFS 5
#define PORTG_OFS 6
#define PORTH_OFS 7
MAKE_GPIO_NUM(2, 8) 即:
( 2 << 8 | 8 << 0)
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |