|
請問天嵌做的Linux2.6.30內核,已經包含EINT跟Timer中斷嗎??
還是說要自己移植進去的??目前都是用記憶體映射方式在控制GPIO
我的程式碼:
gpioPorts = (unsigned char *) mmap(0, getpagesize(),PROT_READ | PROT_WRITE, MAP_SHARED,gpio_fd, 0x56000000);
GPBCON = (unsigned int *) (gpioPorts + 0x10);
GPBDAT = (unsigned int *) (gpioPorts + 0x14);
GPBUP = (unsigned int *) (gpioPorts + 0x18);
GPECON = (unsigned int *) (gpioPorts + 0x40);
GPEDAT = (unsigned int *) (gpioPorts + 0x44);
GPEUP = (unsigned int *) (gpioPorts + 0x48);
GPFCON = (unsigned int *) (gpioPorts + 0x50);
GPFDAT = (unsigned int *) (gpioPorts + 0x54);
GPFUP = (unsigned int *) (gpioPorts + 0x58);
GPGCON = (unsigned int *) (gpioPorts + 0x60);
GPGDAT = (unsigned int *) (gpioPorts + 0x64);
GPGUP = (unsigned int *) (gpioPorts + 0x68);
我想請問下,如果天嵌內核已經有了我是不是直接一樣用記憶體映射方式宣告就可以了??
我看了S3C2440的datasheet,提到:EXTINT0 0x56000088 External Interrupt Control Register 0
是不是假設我要用到擴充的中斷,也直接寫成XXXX= (unsigned int *) (gpioPorts + 0x88);
|
|