From a3aff0c8e49cb325cd61afb3085ae98027d125ae Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Tue, 17 Apr 2012 22:19:53 +0200 Subject: digital/beacon: add a debug task to display periodically debug information --- digital/beacon/src/debug.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'digital/beacon/src/debug.h') diff --git a/digital/beacon/src/debug.h b/digital/beacon/src/debug.h index 6ad1e074..3110e07f 100644 --- a/digital/beacon/src/debug.h +++ b/digital/beacon/src/debug.h @@ -28,13 +28,13 @@ #include #include "configuration.h" -#define OPEN_USART HAL_OpenUsart -#define CLOSE_USART HAL_CloseUsart -#define WRITE_USART HAL_WriteUsart -#define READ_USART HAL_ReadUsart -#define USART_CHANNEL APP_USART_CHANNEL - - +#define OPEN_USART HAL_OpenUsart +#define CLOSE_USART HAL_CloseUsart +#define WRITE_USART HAL_WriteUsart +#define READ_USART HAL_ReadUsart +#define USART_CHANNEL APP_USART_CHANNEL +#define DEBUG_TASK_PERIOD 700L + // #define DEBUG_POSITION_ENABLE // #define DEBUG_UPDATE_ENABLE // #define DEBUG_RECOVERY_ENABLE @@ -90,6 +90,7 @@ typedef enum EMPTY, FILLED } TUSART_buffer_level; + /* This function initializes the USART interface for debugging on avr */ void initSerialInterface(void); @@ -101,4 +102,11 @@ void usartRXCallback(uint16_t bytesToRead); /* This function sends data string via the USART interface */ void uprintf(char *format, ...); + +/* This function starts the debug task */ +void debug_start_stop_task(void); + +/* Debug task callback */ +void debug_task(void); + #endif -- cgit v1.2.3