fork(1) download
  1. #include <avr/io.h>
  2. #include <avr/interrupt.h>
  3. #include <avr/sleep.h>
  4. #include <util/delay.h>
  5.  
  6.  
  7. static void setup_pwm(void) {
  8. PLLCSR |= (1 << PCKE);
  9. _delay_us(100);
  10. DDRB |= (1 << PB1);
  11. OCR1C = 0xff;
  12. TCCR1 |= (1 << PWM1A) | (1 << COM1A1) | (1 << CS10);
  13. TIMSK |= (1 << TOIE1);
  14. }
  15.  
  16. ISR(TIM1_OVF_vect) {
  17. ++OCR1A;
  18. }
  19.  
  20. int main(void) {
  21. setup_pwm();
  22. sei()
  23. for (;;) {
  24. sleep_mode();
  25. }
  26. return 0;
  27. }
  28.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:20: fatal error: avr/io.h: No such file or directory
 #include <avr/io.h>
                    ^
compilation terminated.
stdout
Standard output is empty