add start stop mcusleep

This commit is contained in:
Harald Pichler 2017-09-18 15:05:39 +02:00
parent 87f433d657
commit 927c0b8eac

View file

@ -58,6 +58,8 @@ void
shell_default_output(const char *text1, int len1, const char *text2, int len2)
{
int i;
mcu_sleep_off();
if(text1 == NULL) {
text1 = "";
len1 = 0;
@ -76,6 +78,7 @@ shell_default_output(const char *text1, int len1, const char *text2, int len2)
printf("%c", text2[i]);
}
printf("\r\n");
mcu_sleep_on();
}
/*---------------------------------------------------------------------------*/
void
@ -98,7 +101,9 @@ PROCESS_THREAD(serial_shell_process, ev, data)
while(1) {
PROCESS_WAIT_EVENT_UNTIL(ev == serial_line_event_message && data != NULL);
mcu_sleep_off();
shell_input(data, strlen(data));
mcu_sleep_on();
}
PROCESS_END();