Skip to content
Snippets Groups Projects
Select Git revision
  • b7feb37c71e38a2a25780357d72babe2e41a3a36
  • master default protected
2 results

SwitchListController.java

Blame
  • blink-8.c 374 B
    #include <avr/io.h>
    #include <avr/interrupt.h>
    #include <stdint.h>
    
    ISR (INT0_vect)  /* PD2 */
    {
      PORTD ^= 0x40;
    }
    
    int main (void)
    {
      cli ();
      EICRA = 1 << ISC00 | 1 << ISC01;  /* INT0: steigende Flanke */
      EIMSK = 1 << INT0;  /* INT0 einschalten */
      sei ();
      DDRD = 0xff;   /* binär: 1111 1111 */
      PORTD = 0x40;  /* binär: 0100 0000 */
      while (1);
      return 0;
    }