Skip to content
Snippets Groups Projects
Commit a5f7c519 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

* switch to direct serial output (w/o interrupts

parent 1a6ea56b
No related branches found
No related tags found
No related merge requests found
...@@ -149,7 +149,7 @@ void UART0_IRQHandler(void) ...@@ -149,7 +149,7 @@ void UART0_IRQHandler(void)
static inline int uart0_puts(char *astring,int length) static inline int uart0_puts(char *astring,int length)
{ {
while (queue_items == (QUEUESIZE-1)) {} ; /* while (queue_items == (QUEUESIZE-1)) {} ;
U0IER = 0; U0IER = 0;
queue[queue_tail] = malloc(length+sizeof(unsigned int)); queue[queue_tail] = malloc(length+sizeof(unsigned int));
queue[queue_tail]->len = length; queue[queue_tail]->len = length;
...@@ -158,14 +158,14 @@ static inline int uart0_puts(char *astring,int length) ...@@ -158,14 +158,14 @@ static inline int uart0_puts(char *astring,int length)
if (!running) if (!running)
push_queue(); push_queue();
U0IER |= BIT0 | BIT1; // enable RX irq U0IER |= BIT0 | BIT1; // enable RX irq
*/
/* alternative without queue: /* alternative without queue:*/
int i; int i;
for (i=0;i<length;i++) { for (i=0;i<length;i++) {
while (!(U0LSR & BIT5)); while (!(U0LSR & BIT5));
U0THR = astring[i]; U0THR = astring[i];
} }
*/ /* */
return length; return length;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment