Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define PB_OER ((volatile unsigned int*) (0xFFFFF400+0x0010))
- #define PB_PER ((volatile unsigned int*) (0xFFFFF400+0x0000))
- #define PB_MDER ((volatile unsigned int*) (0xFFFFF400+0x0050))
- #define PB_SODR ((volatile unsigned int*) (0xFFFFF400+0x0030))
- #define PB_CODR ((volatile unsigned int*) (0xFFFFF400+0x0034))
- #define PC_OER ((volatile unsigned int*) (0xFFFFF600+0x0010))
- #define PC_PER ((volatile unsigned int*) (0xFFFFF600+0x0000))
- #define PC_MDER ((volatile unsigned int*) (0xFFFFF600+0x0050))
- #define PC_SODR ((volatile unsigned int*) (0xFFFFF600+0x0030))
- #define PC_CODR ((volatile unsigned int*) (0xFFFFF600+0x0034))
- #define LED_DS1 8
- #define LED_DS2 29
- void dbgu_print_ascii(){}
- int main(void){
- volatile int i = 0;
- volatile int j = 0;
- *PB_OER = (1<<LED_DS1);
- *PB_PER = (1<<LED_DS1);
- *PB_MDER = (0<<LED_DS1);
- *PC_OER = (1<<LED_DS2);
- *PC_PER = (1<<LED_DS2);
- *PC_MDER = (0<<LED_DS2);
- while(1){
- while (j <= 300000) {j++;}
- *PB_SODR = (1<<LED_DS1); // gasi
- *PC_CODR = (1<<LED_DS2); // zapala
- while (i <= 300000){ i++;}
- *PB_CODR = (1<<LED_DS1); // zapala
- *PC_SODR = (1<<LED_DS2); // gasi
- j = 0;
- i = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement