Hi,
I'm trying to run/port arduino sketch on Teensy 3.0. The sketch is located here
https://neseweb.de/wp-content/plugins/download-monitor/download.php?id=1
Here's the failing code snippet:
Here are the errors:
Do I need to import something ? I'm seeing TCCR0A register used in core_pins.h file, but importing it didn't help...
Thanks,
Lauris
I'm trying to run/port arduino sketch on Teensy 3.0. The sketch is located here
https://neseweb.de/wp-content/plugins/download-monitor/download.php?id=1
Here's the failing code snippet:
Code:
void TimerInit() {
cli();
TCCR0A = 0;// set entire TCCR0A register to 0
TCCR0B = 0;// same for TCCR0B
TCNT0 = 0;//initialize counter value to 0
OCR0A = 99;//= (16*10^6) / (2500*64) - 1 (must be <256)
TCCR0A |= (1 << WGM01);// turn on CTC mode
TCCR0B |= (1 << CS11) | (1 << CS10);
TIMSK0 |= (1 << OCIE0A);// enable timer compare interrupt
sei();
}
Here are the errors:
Code:
Receive_433.ino: In function 'void TimerInit()':
Receive_433:75: error: 'TCCR0A' was not declared in this scope
Receive_433:76: error: 'TCCR0B' was not declared in this scope
Receive_433:77: error: 'TCNT0' was not declared in this scope
Receive_433:78: error: 'OCR0A' was not declared in this scope
Receive_433:79: error: 'WGM01' was not declared in this scope
Receive_433:80: error: 'CS11' was not declared in this scope
Receive_433:80: error: 'CS10' was not declared in this scope
Receive_433:81: error: 'TIMSK0' was not declared in this scope
Receive_433:81: error: 'OCIE0A' was not declared in this scope
Receive_433.ino: At global scope:
Receive_433:86: error: expected constructor, destructor, or type conversion before '(' token
Do I need to import something ? I'm seeing TCCR0A register used in core_pins.h file, but importing it didn't help...
Thanks,
Lauris