Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void puttxt(char *text) {
- static uint8_t txbufferwritepos;
- char * tp1, *tp2;
- tp1 = text;
- tp2 = txbuffer+txbufferwritepos;
- cli();
- sei();
- while(*tp1) {
- *(tp2++) = *(tp1++);
- charsleftintxbuffer++;
- txbufferwritepos++;
- if (txbufferwritepos == TX_BUF_SIZE) { tp2 = txbufferwritepos; }
- }
- UCSR0B |= (1 << UDRIE0);
- return;
- }
Add Comment
Please, Sign In to add comment