I have been porting the Low Power Labs RFM69 library to Energia for MSP & LM4F. Porting is an overstatement since I all I really had to change was the interrupt pin and this:
select(){
noInterrupts();
......
}
unselect(){
....
Interrupts();
}
As I understand it, Arduino uses a pretty simple Interrupt model called External Interrupts where there are 3 Pins designated for incoming interrupts. Energia allows interrupts on any P1 or P2 pin. I think the noInterrupts() function call locks the entire IRQ system and also everything else when using a Launchpad.
I tried several approaches to turning off the RFM interrupt in the select() function but have been successful doing this:
select(){
pinMode(RF69_IRQ_PIN, OUTPUT);
...
}
unselect(){
...
pinMode(RF69_IRQ_PIN,INPUT);
}
Is this an appropriate way to do this? and should noInterrupts() be avoided?
B
PS: Many thanks to the team for Energia! The documentation pages for attachinterrupt() & detachInterrupt() wasn't updated from the Arduino pages; I appreciate the effort required, could a notice at the top of unmodified pages be added warning of possible differences in Energia?
select(){
noInterrupts();
......
}
unselect(){
....
Interrupts();
}
As I understand it, Arduino uses a pretty simple Interrupt model called External Interrupts where there are 3 Pins designated for incoming interrupts. Energia allows interrupts on any P1 or P2 pin. I think the noInterrupts() function call locks the entire IRQ system and also everything else when using a Launchpad.
I tried several approaches to turning off the RFM interrupt in the select() function but have been successful doing this:
select(){
pinMode(RF69_IRQ_PIN, OUTPUT);
...
}
unselect(){
...
pinMode(RF69_IRQ_PIN,INPUT);
}
Is this an appropriate way to do this? and should noInterrupts() be avoided?
B
PS: Many thanks to the team for Energia! The documentation pages for attachinterrupt() & detachInterrupt() wasn't updated from the Arduino pages; I appreciate the effort required, could a notice at the top of unmodified pages be added warning of possible differences in Energia?