Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- volatile int flag=0;
- char buffer[10];
- void foo(char c)
- {
- __ASM volatile ("dbm" : : : "memory");
- __disable_irq(); //disable IRQ as we use flag in ISR
- buffer[0]=c;
- flag=1;
- __ASM volatile ("dbm" : : : "memory");
- __enable_irq();
- }
Add Comment
Please, Sign In to add comment