From e8e750a4fa8a99cde1837f6df34b8720d0c3c155 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Mon, 24 Dec 2012 14:59:44 +0100 Subject: digital/beacon: add network debug --- digital/beacon/src/debug_avr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'digital/beacon') diff --git a/digital/beacon/src/debug_avr.c b/digital/beacon/src/debug_avr.c index 8fc37138..3a016ac9 100644 --- a/digital/beacon/src/debug_avr.c +++ b/digital/beacon/src/debug_avr.c @@ -48,6 +48,7 @@ static TUSART_bus_state TXbus_state = FREE; // TX line state static uint16_t start_offset = 0; // Start offset for TX buffer static uint16_t end_offset = 0; // Stop offset for TX buffer +uint8_t debug_network = 0; /* This function initializes the USART interface for debugging on avr */ void initSerialInterface(void) @@ -151,6 +152,19 @@ void usartRXCallback(uint16_t bytesToRead) motor_set_target_speed(motor_get_target_speed()+1); uprintf("target speed = %d\r\n",motor_get_target_speed()); break; + case 'f': + uprintf("plop = %d\r\n",plop); + if(debug_network_enable == 1) + { + debug_network_enable = 0; + debug_network = 0; + } + else + { + debug_network_enable = 1; + debug_network = 1; + } + break; /* Default */ default : uprintf(" ?? Unknown command ??\r\n"); -- cgit v1.2.3