Created
August 2, 2021 07:24
-
-
Save raek/d12e76fed8020f7b9f4d4613dbe0a120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/delay.h> | |
int main(int argc, char **argv) | |
{ | |
DDRD |= 1<<0; | |
PORTD |= 1<<0; | |
_delay_ms(500); | |
PORTD &= ~(1<<0); | |
_delay_ms(500); | |
sei(); | |
// an interrupt left active by the bootloader will be triggered, | |
// which will run __bad_interrupt which resets the program | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment