1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge branch 'stable' of ssh://ukleos.des-mesh.net/home/git/ukleos into stable

This commit is contained in:
Oliver Hahm 2010-11-03 12:22:42 +01:00
commit 5b47352bcf
2 changed files with 7 additions and 6 deletions

View File

@ -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)
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;
} }
@ -199,7 +199,8 @@ bl_uart_init(void)
/* irq */ /* irq */
install_irq(UART0_INT, UART0_IRQHandler, 6); install_irq(UART0_INT, UART0_IRQHandler, 6);
U0IER |= BIT0 | BIT1; // enable RX+TX irq // U0IER |= BIT0 | BIT1; // enable RX+TX irq
U0IER |= BIT0; // enable only RX irq
return 1; return 1;
} }

View File

@ -148,7 +148,7 @@ int msg_reply_int(msg *m, msg *reply) {
return -1; return -1;
} }
msg* target_message = (msg*)target->wait_data; msg* target_message = (msg*)target->wait_data;
*target_message = *m; *target_message = *reply;
sched_set_status(target, STATUS_PENDING); sched_set_status(target, STATUS_PENDING);
fk_context_switch_request = 1; fk_context_switch_request = 1;
return 1; return 1;