[Armadillo:03227] Re: Armadillo-500 GPIO入出力(CON16)について

nakai email@hidden
2008年 8月 1日 (金) 17:01:51 JST


nakai$B$G$9!#(B

> $B;X<($7$FD:$$$?DL$j$K!"(B"PC:~/atmark-dist$ make linux image"
> $B$r<B9T$7!"=q$-9~$_$r9T$C$?$H$3$m!">e<j$/$$$-$^$7$?!*(B
> $B$"$j$,$H$&$4$6$$$^$7$?!#(B

$B$h$+$C$?$G$9!#(B

> $B$H$7$F$*$j$^$7$?$,!">e5--!(Bmake config$B$,ITMW$@$C$?(B
> $B$H$$$&;v$G$7$g$&$+!#:#8e$N:n6H$N$?$a$K$b65$($F(B
> $B$$$?$@$1$J$$$G$7$g$&$+!#(B

$BI,MW$"$j$^$;$s$h!)(B
$B-"$N$_$7$F$G$-$?%$%a!<%8$r=q$-9~$_$9$l$P(BOK$B$G$9!#(B

tftp$B%5!<%P$N8x3+%G%#%l%/%H%j$K%3%T!<$7K:$l$H$+$,860x$8$c$J$$$G$7$g$&$+!)(B


$BM?2lED!!D+;K(B $B$5$s$O=q$-$^$7$?(B:
> $B$*@$OC$K$J$C$F$*$j$^$9!#(B
> $BM?2lED$G$9!#(B
> 
> $B;X<($7$FD:$$$?DL$j$K!"(B"PC:~/atmark-dist$ make linux image"
> $B$r<B9T$7!"=q$-9~$_$r9T$C$?$H$3$m!">e<j$/$$$-$^$7$?!*(B
> $B$"$j$,$H$&$4$6$$$^$7$?!#(B
> 
> $B:#$^$G9T$C$F$$$?%S%k%I<j=g$H$7$^$7$F$O!"(B
> $B-!(BPC:~/atmark-dist$ make config
> $B-"(BPC:~/atmark-dist$ make
> $B-#(Btftp$B$K$F(B"linux.bin.gz"$B$H(B"romfs.img.gz"$B$N=q$-9~$_(B
> 
> $B$H$7$F$*$j$^$7$?$,!">e5--!(Bmake config$B$,ITMW$@$C$?(B
> $B$H$$$&;v$G$7$g$&$+!#:#8e$N:n6H$N$?$a$K$b65$($F(B
> $B$$$?$@$1$J$$$G$7$g$&$+!#(B
> 
> $B$h$m$7$/$*4j$$CW$7$^$9!#(B
> 
> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]On Behalf Of nakai
> Sent: Friday, August 01, 2008 4:20 PM
> To: Armadillo series general discussion list
> Subject: [Armadillo:03225] Re: Armadillo-500 GPIO$BF~=PNO(B(CON16)$B$K$D$$$F(B
> 
> 
> nakai$B$G$9!#(B
> 
>> $B;n$7$K$G$9$,!"(B"armadillo5x0_gpio.c"$B$N!"(B
>> #define DESCRIPTION	"Armadillo-5x0 GPIO Sample driver"
>> $BItJ,$r(B
>> #define DESCRIPTION	"Armadillo-5x0 GPIO Sample driver_080731"
>> $B$KJQ99$7!"%S%k%I$r<B9T$7$F$_$^$7$?$,!"(B
>> $B5/F0%m%0$K$O!"$3$l$^$GI=<($5$l$F$$$?!"(B
>> "gpio:Armadillo-5x0 GPIO Sample driver [Rev.1.00]"
>> $B$H$7$+I=<($5$l$^$;$s$G$7$?!#(B
>> "_080731"$B$NItJ,$,I=<($5$l$J$$$3$H$H!"4X78$,$"$k$N$G$7$g$&$+!#(B
> 
> $B$3$l!"%S%k%I$+=q$-49$($,$&$^$/$$$C$F$^$;$s$M!#(B
> $B%S%k%I$K$O!"(B
> PC:~/atmark-dist$ make linux image
> $B$H$7$F!"(Bimages/linux.bin.gz$B$r=q$-49$($F$/$@$5$$!#(B
> 
> $B>e5-$N$h$&$K$7$F$^$9$+!)(B
> 
> 
> $BM?2lED!!D+;K(B $B$5$s$O=q$-$^$7$?(B:
>> $BM?2lED$G$9!#(B
>>
>>> $B%F%9%H%W%m%0%i%`$r<B9T$9$k$H(B
>>> $B%(%i!<=*N;$8$c$J$/!"@5>o=*N;$9$k$N$G$9$h$M!)(B
>> $B$O$$!"$=$NDL$j$G$9!#(B
>> ioctl$B4X?t$G(BGPIO$B!J(BCON16$B!K$N(BDirection$B$N=q$-9~$_$H!"(B
>> Data$B$NFI$_9~$_$,$G$-$l$P$H;W$C$F$*$j$^$9!#(B
>>
>>> $B5$$K$J$k$N$O!"(B
>>> #define DEBUG
>>> $B$NDj5A0LCV!#(B
>>> #if defined(DEBUG)
>>> $B$h$j$bA0$KDj5A$7$F$$$^$9$+!)(B
>> $BDj5A0LCV$K4X$7$^$7$F$b!"4V0c$($J$/!"(B"#if defined(DEBUG)"$B$h$j(B
>> $BA0$KDj5A$7$F$*$j$^$9!#(B
>>
>> $B;n$7$K$G$9$,!"(B"armadillo5x0_gpio.c"$B$N!"(B
>> #define DESCRIPTION	"Armadillo-5x0 GPIO Sample driver"
>> $BItJ,$r(B
>> #define DESCRIPTION	"Armadillo-5x0 GPIO Sample driver_080731"
>> $B$KJQ99$7!"%S%k%I$r<B9T$7$F$_$^$7$?$,!"(B
>> $B5/F0%m%0$K$O!"$3$l$^$GI=<($5$l$F$$$?!"(B
>> "gpio:Armadillo-5x0 GPIO Sample driver [Rev.1.00]"
>> $B$H$7$+I=<($5$l$^$;$s$G$7$?!#(B
>> "_080731"$B$NItJ,$,I=<($5$l$J$$$3$H$H!"4X78$,$"$k$N$G$7$g$&$+!#(B
>>
>> $B$*<j?t$*3]$1$7$^$9$,!"$h$m$7$/$*4j$$CW$7$^$9!#(B
>>
>> -----Original Message-----
>> From: email@hidden
>> [mailto:email@hidden]On Behalf Of nakai
>> Sent: Friday, August 01, 2008 3:41 PM
>> To: Armadillo series general discussion list
>> Subject: [Armadillo:03222] Re: Armadillo-500 GPIO$BF~=PNO(B(CON16)$B$K$D$$$F(B
>>
>>
>> nakai$B$G$9!#(B
>>
>>>> $B$5$l$k>l9g$O!"(B
>>>> 	cat /dev/gpio
>>>> $B$H%3%^%s%I$r<B9T$9$k$H!"(B
>>>> armadillo_gpio_open()
>>>> $B$HI=<($5$l$^$9$+!)(B
>>> cat$B$r<B9T$7$^$7$?$H$3$m!"(B"armadillo_gpio_open()"$B$OI=<($5$l$:!"(B
>>> "cat: Read error: Invalid argument"$B$,I=<($5$l$k>uBV$H$J$C$F(B
>>> $B$*$j$^$9!#(B
>> $B$3$l$OLdBj$J$$$N$G$9!#(B
>> read$B4X?t$rMQ0U$7$F$J$$$N$G!#!#(B
>>
>> $B%"%W%j$bLdBj$J$5$=$&$G$9$M!#(B
>> $B%F%9%H%W%m%0%i%`$r<B9T$9$k$H(B
>> $B%(%i!<=*N;$8$c$J$/!"@5>o=*N;$9$k$N$G$9$h$M!)(B
>>
>> $B5$$K$J$k$N$O!"(B
>> #define DEBUG
>> $B$NDj5A0LCV!#(B
>>
>> #if defined(DEBUG)
>>
>> $B$h$j$bA0$KDj5A$7$F$$$^$9$+!)(B
>>
>> $BM?2lED!!D+;K(B $B$5$s$O=q$-$^$7$?(B:
>>> $BM?2lED$G$9!#(B
>>> $B$*@$OC$K$J$C$F$*$j$^$9!#(B
>>>
>>>> $B$3$3$G$N(B"printk$B$G5-=R$5$l$?FbMF(B"$B$H$O2?$r;X$7$F$^$9$+!)(B
>>>> armadillo5x0_gpio_ioctl()$BFb$N(Bprintk$B$N$b$N$O$G$^$;$s$h!)(B
>>> "printk$B$G5-=R$5$l$?FbMF(B"$B$H$O!"(B"KDEBUG_FUNC()"$B$d(B
>>> "KDEBUG_INFO()"$B$NItJ,$r;X$7$F$$$^$7$?$,!"5/F0%m%0(B
>>> $B$K$O=PNO$5$l$J$$$H$$$&;v$G$9$M!#?=$7Lu$"$j$^$;$s!#(B
>>>
>>>> $B%F%9%H%W%m%0%i%`E=$C$F$b$i$($^$9$+!)(B
>>> $B0J2<$,%F%9%H%W%m%0%i%`$H$J$j$^$9!#(B
>>> int main(int argc, char **argv)
>>> {
>>>     int fd;
>>>     int ret;
>>>     unsigned int data = 0;
>>>
>>> 	fd = open("/dev/gpio", O_RDWR);
>>> 	if (fd < 0) {
>>> 		printf("!! open error\n");
>>> 		return -1;
>>> 	}
>>> 	ret = ioctl(fd, 0, &data);
>>> 	printf("data = 0x%x\n", data);
>>>
>>> 	if (ret < 0) {
>>> 		printf("!! ioctl error : ret = %d\n", ret);
>>> 		return -1;
>>> 	}
>>> 	close(fd);
>>>     return(0);
>>> }
>>>
>>>> gpio:Armadillo-5x0 GPIO Sample driver
>>>> $B$H5/F0%m%0$KI=<($5$l$^$9$+!)(B
>>>> $B$5$l$J$$>l9g$O!"(Bconfig$B$G%I%i%$%PL58z$H$J$C$F$$$k$H;W$$$^$9!#(B
>>> "gpio:Armadillo-5x0 GPIO Sample driver"$B$O!"5/F0%m%0$K(B
>>> $BI=<($5$l$F$*$j$^$9$N$G!"M-8z$K$J$C$F$$$k$H;W$o$l$^$9!#(B
>>>
>>>> $B$5$l$k>l9g$O!"(B
>>>> 	cat /dev/gpio
>>>> $B$H%3%^%s%I$r<B9T$9$k$H!"(B
>>>> armadillo_gpio_open()
>>>> $B$HI=<($5$l$^$9$+!)(B
>>> cat$B$r<B9T$7$^$7$?$H$3$m!"(B"armadillo_gpio_open()"$B$OI=<($5$l$:!"(B
>>> "cat: Read error: Invalid argument"$B$,I=<($5$l$k>uBV$H$J$C$F(B
>>> $B$*$j$^$9!#(B
>>>
>>> $B$d$O$j!"%S%k%I$KLdBj$,$"$k$H$$$&$3$H$G$7$g$&$+!#(B
>>> $B$*K;$7$$$H$O;W$$$^$9$,!"$h$m$7$/$*4j$$CW$7$^$9!#(B
>>>
>>>
>>> -----Original Message-----
>>> From: email@hidden
>>> [mailto:email@hidden]On Behalf Of nakai
>>> Sent: Friday, August 01, 2008 12:32 PM
>>> To: Armadillo series general discussion list
>>> Subject: [Armadillo:03219] Re: Armadillo-500 GPIO$BF~=PNO(B(CON16)$B$K$D$$$F(B
>>>
>>>
>>> nakai$B$G$9!#(B
>>>
>>>> $B$7$+$7!"5/F0%m%0$K$O(Bprintk$B$G5-=R$5$l$?FbMF$,=P$F$3$J$+$C$?0Y!"(B
>>> $B$3$3$G$N(B"printk$B$G5-=R$5$l$?FbMF(B"$B$H$O2?$r;X$7$F$^$9$+!)(B
>>> armadillo5x0_gpio_ioctl()$BFb$N(Bprintk$B$N$b$N$O$G$^$;$s$h!)(B
>>>
>>>> $B%S%k%I$email@hidden$7$F$$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io_ioctl()$B$NJQ99(B
>>>> $B!!!!!!!!!!(Bunsigned int val;
>>>> 	KDEBUG_FUNC();
>>>> 	if (cmd) {
>>>> 	$B!!!!!!(B//writel();
>>>> 	}
>>>> 	else {
>>>> 	$B!!!!!!(Bval = readl(0x53FCC000);
>>>> 	$B!!!!!!(Barg = val;
>>>> 	$B!!!!!!(BKDEBUG_INFO("arg=%x",arg);
>>>> 	}
>>>> $B-"%S%k%I!J(Blinux.bin.gz$B!?(Bromfs.img.gz$B$N:email@hidden!K(B
>>>> $B-#%U%i%C%7%e%a%b%j=q$-49$((B
>>>>
>>>> $B$7$+$7!"5/F0%m%0$K$O(Bprintk$B$G5-=R$5$l$?FbMF$,=P$F$3$J$+$C$?0Y!"(B
>>>> $B%S%k%I$email@hidden$7$F$$$J$$$N$G$O$H;W$C$F$*$j$^$9!#(B
>>>> $B$^$?!"%F%9%H%W%m%0%i%`$H$7$^$7$F!"(B/dev/gpio$B$r(Bopen$B8e!"(Bioc$B#t(Bl$B$r(B
>>>> $B;n$7$F$_$^$7$?$,!">e<j$/$$$+$J$$>u67$G$9!#(B
>>>> $BF1$8$h$&$J7P83$,$"$j!"%"%I%P%$%9$7$FD:$1$kJ}$,$*$i$l$^$7$?$i!"(B
>>>> $B$465<(4j$$$^$9!#$h$m$7$/$*4j$$CW$7$^$9!#(B
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: email@hidden
>>>> [mailto:email@hidden] On Behalf Of nakai
>>>> Sent: Tuesday, July 29, 2008 7:47 PM
>>>> To: Armadillo series general discussion list
>>>> Subject: [Armadillo:03202] Re: Armadillo-500 GPIO$BF~=PNO(B(CON16)$B$K$D$$$F(B
>>>>
>>>> nakai$B$G$9!#(B
>>>>
>>>>> GPIO$B$N%"%/%;%9<jCJ$H$7$^$7$F$O!"%G%P%$%9%U%!%$%k$N(B
>>>>> "/dev/gpio"$B$r%*!<%W%s$7!"(Bioctl$B4X?t$GF~=PNO$N$?$a$N(B
>>>>> $B%G!<%?$rF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>>> $BM?2lED!!D+;K(B $B$5$s$O=q$-$^$7$?(B:
>>>>> $BM?2lED$H?=$7$^$9!#(B
>>>>>
>>>>> Armadillo-500$B$K4X$7$^$7$F!"30It%9%$%C%A$+$i$NF~NO$H!"(B
>>>>> $B%i%s%email@hidden!J30It=PNO!K$r9T$&$?$a!"%$%s%?%U%'!<%9$G$"$k(B
>>>>> "CON16"$B$K%3%M%/%?$r<h$jIU$1!"(BGPIO$B$NF~=PNO@)8f$r(B
>>>>> $B9T$*$&$H;n$_$F$*$j$^$9!#(B
>>>>>
>>>>> GPIO$B$N%"%/%;%9<jCJ$H$7$^$7$F$O!"%G%P%$%9%U%!%$%k$N(B
>>>>> "/dev/gpio"$B$r%*!<%W%s$7!"(Bioctl$B4X?t$GF~=PNO$N$?$a$N(B
>>>>> $B%G!<%?$rFI$_=q$-$7$h$&$H$7$F$*$j$^$9$,!"(Bioctl$B$N0z?t$r(B
>>>>> $B$I$N$h$&$email@hidden$9$l$P$h$$$+$,J,$+$i$:email@hidden$7$F$*$j$^$9!#(B
>>>>>
>>>>> $B$^$?!"(BGPIO$B$GMxMQ$7$?$$2U=j$O!"(BCON16$B!'(BGPIO10$B!A(B19$B!J(B+3V$B!K(B
>>>>> $B$K$J$j$^$9$,!"%G%P%$%9%I%i%$%P$OMQ0U$5$l$F$$$J$$$N$G$7$g$&$+!#(B
>>>>>
>>>>> $B;29M$H$J$k%5%$%H$d!"%5%s%W%k$N%G%P%$%9%I%i%$%P$J$I$N(B
>>>>> $B>pJs$r$4B8CN$NJ}$,$*$i$l$^$7$?$i!"$465<(4j$$$^$9!#(B
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> armadillo mailing list
>>>>> email@hidden
>>>>> http://lists.atmark-techno.com/mailman/listinfo/armadillo
>>>> _______________________________________________
>>>> armadillo mailing list
>>>> email@hidden
>>>> http://lists.atmark-techno.com/mailman/listinfo/armadillo
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> armadillo mailing list
>>>> email@hidden
>>>> http://lists.atmark-techno.com/mailman/listinfo/armadillo
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> armadillo mailing list
>>> email@hidden
>>> http://lists.atmark-techno.com/mailman/listinfo/armadillo
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> armadillo mailing list
>> email@hidden
>> http://lists.atmark-techno.com/mailman/listinfo/armadillo
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> armadillo mailing list
> email@hidden
> http://lists.atmark-techno.com/mailman/listinfo/armadillo



armadillo メーリングリストの案内