Howdy folks! A new Teensy 3.1 user here, starting off using the Arduino IDE.
Well, it has been a while since I programmed in C/++, usually I work with Javascript, SQL, etc, and I'm running into a few hurdles. I'm hoping someone can help me find an elegant solution.
Starting off with the Teensy 3.1 blink example Implemented with IntervalTimer, I've been fiddling around and have run across the issue where if I define
The compiler is telling me the function is defined elsewhere. Of course! IntervalTimer implements pit0_isr, the compiler would be faulty if it didn't error when I try to define it a second time.
Is there any way that I can prevent the compiler from examining IntervalTimer (or other core libraries)?
Update: 2014-04-07
Scratch that, I've gone into the IntervalTimer.cpp and modified the following lines...
This aught to enable me to configure PIT_TCTRL for chain mode outside of IntervalTimer and avoid IntervalTimer overwriting the chain mode configuration.
Well, it has been a while since I programmed in C/++, usually I work with Javascript, SQL, etc, and I'm running into a few hurdles. I'm hoping someone can help me find an elegant solution.
Starting off with the Teensy 3.1 blink example Implemented with IntervalTimer, I've been fiddling around and have run across the issue where if I define
Code:
void pit0_isr(void){
...
}
The compiler is telling me the function is defined elsewhere. Of course! IntervalTimer implements pit0_isr, the compiler would be faulty if it didn't error when I try to define it a second time.
Is there any way that I can prevent the compiler from examining IntervalTimer (or other core libraries)?
Update: 2014-04-07
Scratch that, I've gone into the IntervalTimer.cpp and modified the following lines...
Code:
// *PIT_TCTRL = 0;
*PIT_TCTRL &= 4; //disable TIE, TEN, but enable CHN if CHN 1
*PIT_LDVAL = newValue;
// *PIT_TCTRL = 3;
*PIT_TCTRL |= 3;
This aught to enable me to configure PIT_TCTRL for chain mode outside of IntervalTimer and avoid IntervalTimer overwriting the chain mode configuration.
Last edited: