ehayon / beaglebone-gpio Goto Github PK
View Code? Open in Web Editor NEWA GPIO library for the BeagleBone and Raspberry Pi embedded linux boards
License: MIT License
A GPIO library for the BeagleBone and Raspberry Pi embedded linux boards
License: MIT License
Hello ehayon
I got the following situation ,,,
I have to change a pin on my BeagleBone (INPUT or OUTPUT) many times in my c program.
At boot the pin is input. and has high impedance.
During my program I change the pin as output ( pinMode(P8_44,OUTPUT,7,PULLUP) ; ) and I write to it HIGH or LOW ( digitalWrite(P8_44,HIGH) ; or digitalWrite(P8_44,LOW) ; ) .
When I make again the pin input ( pinMode(P8_44,INPUT,7,PULLUP) ; ), the pin does not have high impedance.
Looking at the sysfs I got that the pin is INPUT.
thank you in advanced for your help
Changed these lines in gpio.c
map[(ADCSTEPCONFIG1-MMAP_OFFSET)/4] = 0x00<<19 | ADC_AVG16<<2 | 0x01;
the averaging is set by bit 2-4 (TRM 12.5.20) not 0-2 and I changed the mode to 01 = SW enabled, continuous. With one-shot the call to analogRead() returns the value from the previous call to analogRead(), in continous mode you get the current value. There may be a better way to do this.
Also there needs to be at least one call to adc_init() in the setup otherwise the above does not get set. I assumed that this line would do it, but it was not calling adc_init(), because I guess the clock was already enabled.
if(map[(CM_WKUP_ADC_TSC_CLKCTRL-MMAP_OFFSET)/4] & CM_WKUP_IDLEST_DISABLED)
adc_init();
Hi, I get this error when use pins with high id bank.
For example:
digitalRead(P8_44);
Any idea?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.