tinchox3524 / arduino-pinchangeint

Automatically exported from code.google.com/p/arduino-pinchangeint
0 stars 0 forks source link

PCintPort not declared.... #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Ran example code, and own code....likel something simple I missed, but just 
checking...I don't see any mention of what or how to assign this port 
variable...
2.
3.

What is the expected output?  Interrupt Port declaration

 What do you see instead?  not assigned

What version of the product are you using? latest
On what operating system?Windows 7

Please provide any additional information below.

Trying to incorporate this library, but I don't see where the port is declared. 
 Maybe smarter people than me know by default, but thought I would ask before 
spending hours figuring it out.  Seems to me the example code should run right 
out of the box?

Original issue reported on code.google.com by cornwall...@gmail.com on 3 Apr 2013 at 3:56

GoogleCodeExporter commented 8 years ago
I'm not sure why you need to assign. I have a full example at the bottom of 
https://code.google.com/p/arduino-pinchangeint/wiki/Usage . This should show 
you what you need to do. Let me know if you have any questions about it.

Original comment by m...@schwager.com on 4 Apr 2013 at 3:03

GoogleCodeExporter commented 8 years ago
...btw, the definition is here in the code (this example for Port B):

#ifndef NO_PORTB_PINCHANGES
ISR(PORTBVECT) {
        #ifdef PINMODE
        PCintPort::s_PORT='B';
        #endif
        PCintPort::curr = portB.portInputReg;
        portB.PCint();
}
#endif

...You don't need to worry about which object you're using; the Interrupt 
vector is defined when you use the static function attachInterrupt, which does 
the heavy lifting of threading through the object structures to assign your 
interrupt routine to a given pin.

Original comment by m...@schwager.com on 4 Apr 2013 at 3:08

GoogleCodeExporter commented 8 years ago

Original comment by m...@schwager.com on 13 Apr 2013 at 4:14