notaz.gp2x.de
/
teensytas.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update teensy3 lib to latest, use new vector change mechanism
[teensytas.git]
/
main.c
diff --git
a/main.c
b/main.c
index
5c99ee3
..
37be879
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-26,11
+26,7
@@
void yield(void)
{
}
{
}
-static void pin0_irq(void)
-{
-}
-
-void portb_isr(void)
+static void my_portb_isr(void)
{
uint32_t isfr;
{
uint32_t isfr;
@@
-58,7
+54,8
@@
int main(void)
// t pin 0 20 6 8 7 14 2
// * - note: tl/tr mixed in most docs
pinMode(0, INPUT);
// t pin 0 20 6 8 7 14 2
// * - note: tl/tr mixed in most docs
pinMode(0, INPUT);
- attachInterrupt(0, pin0_irq, CHANGE);
+ attachInterrupt(0, my_portb_isr, CHANGE);
+ attachInterruptVector(IRQ_PORTB, my_portb_isr);
pinMode( 2, OUTPUT);
pinMode(14, OUTPUT);
pinMode( 2, OUTPUT);
pinMode(14, OUTPUT);