Cheers for the info. Yeah, i'm trying to stray away from arduino code as I want to learn C and avr's.
The thing is this code is just an attempt at creating a signal based on scaling the clock which is to be incorporated in a different project. Problem there is that the timings are down to ~50us.
I can't use the util/delay.h library like this
void my_delay(uint32_t time) {
_delay_us(time);
}
void main(void) {
my_delay(100);
blinkon;
my_delay(100);
blinkoff;
}
as it create massive hexfile. The
_delay_us has to be called with a constant, not a variable. That's why i'm creating my own.