Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Blink.cpp
- *
- * Created: 2020/02/16 16:03:50
- * Author : mumou
- */
- #include <avr/io.h>
- #include <util/delay.h>
- #define LED_bp 2 // PE2
- #define LED_bm (1<<LED_bp)
- int main(void)
- {
- PORTE.DIRSET = LED_bm;
- PORTE.OUTCLR = LED_bm;
- /* Replace with your application code */
- while (1)
- {
- _delay_ms(1000);
- if(PORTE.OUT & LED_bm){
- PORTE.OUTCLR = LED_bm;
- }else{
- PORTE.OUTSET = LED_bm;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement