From: Neil C. <nc...@ba...> - 2007-04-12 15:36:45
|
Just to summarise. I have modified the ucb1x00-assabet.c file (attached) this gives access to all 4 ADC channels rather than just 3. They are also named ADC0, ADC1, ADC2 and ADC3 to make more sense than the old names of vcharger, vbatt, batt_temp so to install: from buildroot: 1. make ARCH=arm CROSS_COMPILE='pwd'/../staging_dir/arm-linux- menuconfig Device drivers - Input device support - Touchscreens - UCB1400 Touchscreen support save 2. copy the attached file to build_arm_nofpu/linux-2.6.18gum/drivers/mfd directory & modify the /Makefile/ in the same directory to include /ucb1x00-assabet.o/ - attach this to the UCB1400 line with the other *.o's 3. make ARCH=arm CROSS_COMPILE='pwd'/../staging_dir/arm-linux- 4. If it fails to make first time around then run make again! Not sure why this is the case! I don't understand why this might be. Perhaps make dependencies and order of execution? 5. cd <gumstix-buildroot> make 6. When you have transferred the image to the gumstix then: # modprobe snd_pxa2xx_ac97 # modprobe ucb1x00-core # modprobe ucb1x00-assabet you can read the values by: # cat /sys/class/ucb1x00/ucb1x00/ADn where n =1..3 you can also access the 10 IO lines with: # echo "GPIO out set" > /proc/gpio/UCB1400-0-n where n =0..9 out and set can be changed for /in/ and /clear/ as desired! or use # cat /proc/gpio/UCB1400-0-n to read from the port. Hope this is of some help to someone else using GPSstix. BTW - each ADC is 10 bits and can handle voltages up to 7.5V peak. Neil Neil Cobbett wrote: > HI Pascal, > > I did /make/ again and this time no errors! It's working! > > Perhaps the order in which make runs needs tweaking. Second time through > it passed with no errors. I also made some modules rather than built in > by running /make menuconfig./ Not sure what the exact fix was. > > Now have ADC working 0 to 7.5V Peak on three channels. Now need to > modify the ucb1x00-assabet.c to get all 4 channels. Also rename them to > ADC0-4 rather than the vcharger, vbatt, batt_temp. > > Thanks for your help! > > Neil > > > Pascal wrote: > >> Neil Cobbett wrote: >> >> >>> I get: >>> >>> >> >> >>> CONFIG_TOUCHSCREEN_UCB1400=y >>> CONFIG_SND_AC97_BUS=y >>> >>> >> So you have the touchscreen driver configured as built-in, >> not as a module. I have no idea why this affects rtc-lib.c, >> but you could try to fix that in menuconfig. >> >> Pascal >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> > > > -- > This message (and any attachments) is for the recipient only. NERC is subject > to the Freedom of Information Act 2000 and the contents of this email and any > reply you make may be disclosed by NERC unless it is exempt from release under > the Act. Any material supplied to NERC may be stored in an electronic > records management system. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > -- This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. |