HapticLib
0.7
Haptic Feedback Library for embedded systems
|
Debugging Features header. More...
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | HL_DEBUG |
Define this symbol to enable the Debugging Features. |
Functions | |
uint8_t | send_char (uint8_t ch) |
uint32_t | send_int (uint32_t) |
DEBUG function to print over the USART any uint32_t. | |
void | send_string (char *) |
DEBUG function to print over the USART any string. |
Debugging Features header.
This file is part of the HapticLib Debugging Features module.
It is included by other HapticLib internal modules to use the tools implemented.
-DHL_DEBUG
The features implemented are:
Definition in file hl_debug.h.
#define HL_DEBUG |
Define this symbol to enable the Debugging Features.
The Debugging features offered by the library are:
The HapticLib Debugging Features are enabled based on the presence of the symbol HL_DEBUG .
To define the symbol do either:
define HL_DEBUG
inside a module.-DHL_DEBUG
to the compiler command line during compilation.... #ifdef HL_DEBUG ... send_int( 1234567 ); ... send_string("Correct usage.\n\r\0"); ... #endif ...
Definition at line 90 of file hl_debug.h.
uint8_t send_char | ( | uint8_t | ch | ) |
uint32_t send_int | ( | uint32_t | val | ) |
DEBUG function to print over the USART any uint32_t.
send_int() will send the hexadecimal representation of any uint32_t.
#ifdef HL_DEBUG send_int( 1234567 ); #endif
If the value passed is less then 100000, send_int() will also send the decimal representation inside brackets.
... #ifdef HL_DEBUG ... send_int( 12345 ); // outputs –> 0x3039 (12345) ... #endif ...
[in] | val | uint32_t variable containing the value to print. |
Definition at line 126 of file hl_debug.c.
void send_string | ( | char * | string | ) |
DEBUG function to print over the USART any string.
send_string() will send over the serial link any NULL terminated string (char *
) smaller than 255 characters.
#ifdef HL_DEBUG send_string("Correct usage.\n\r\0"); #endif
[out] | string | char* holding the reference to the string to be printed. |
Definition at line 226 of file hl_debug.c.