summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-24 14:59:44 +0100
committerFlorent Duchon2012-12-24 17:51:10 +0100
commite8e750a4fa8a99cde1837f6df34b8720d0c3c155 (patch)
treecbcd7cbde4c72856902316186fc1d36842a9c4ba /digital/beacon
parentb20a5f64017b375bd24d0e221d16f52dc51a4418 (diff)
digital/beacon: add network debug
Diffstat (limited to 'digital/beacon')
-rw-r--r--digital/beacon/src/debug_avr.c14
1 files changed, 14 insertions, 0 deletions
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");