All the debugging functions currently supported by the DSP library.
Macros | |
#define | dsp_debug_initialization(x) dsp_debug_initialization__(__DATE__, __TIME__, x) |
This define permits to print the date and the time of the last compilation of the dsp_debug_initialization__ function. More... | |
Functions | |
void | dsp_debug_print_fct (char *str) |
This function is used to print a string through the peripheral used by the debugging module. More... | |
int | dsp_debug_sprint_after_radix (char **out, unsigned int num, unsigned int den, int nb_digits) |
This functions permits to copy the digits after the radix of a division's result in the specified buffer. More... | |
Peripheral function | |
These function are used to make an abstraction of the driver used to control the debugging peripheral. | |
void | dsp_debug_init (int fosc) |
This function permits to initialize the peripheral that is used to debug. It is automatically called by the dsp_debug_initialization__ function. More... | |
void | dsp_debug_write_fct (char c) |
This function is used to print a character through the peripheral used by the debugging module. More... | |
char | dsp_debug_read_fct () |
This function is used to get a character through the peripheral used by the debugging module. More... | |
Q formatted number printing functions | |
These function permits to print a signed fixed point Q formatted number. | |
void | dsp_debug_print (int nb_bits, int q, int n) |
Generic function to print all kind of Q formatted numbers. More... | |
int | dsp_debug_sprint (char **out, int nb_bits, int q, int i) |
Generic function to print all kind of Q formatted numbers. More... | |
void | dsp16_debug_print (dsp16_t n) |
This functions permits to print a dsp16_t typed number. More... | |
void | dsp32_debug_print (dsp32_t n) |
This functions permits to print a dsp32_t typed number. More... | |
Complex number printing functions | |
These function permits to print a complex signed fixed point Q formatted number. | |
void | dsp_debug_print_complex (int nb_bits, int q, int real, int imag) |
Generic function to print all kind of complex Q formatted numbers. More... | |
void | dsp16_debug_print_complex (dsp16_complex_t *n) |
This functions permits to print a dsp16_complex_t typed number. More... | |
void | dsp32_debug_print_complex (dsp32_complex_t *n) |
This functions permits to print a dsp32_complex_t typed number. More... | |
Vector printing functions | |
These function permits to print vectors. 1 0.02556
2 -0.60125
...
For a real type vector. 1 0.02556 + -0.08965i
2 -0.65064 + 0.i
...
For a complex type vector. | |
void | dsp16_debug_print_vect (dsp16_t *vect, int size) |
This functions permits to print a dsp16_t typed vector. More... | |
void | dsp32_debug_print_vect (dsp32_t *vect, int size) |
This functions permits to print a dsp32_t typed vector. More... | |
void | dsp16_debug_print_complex_vect (dsp16_complex_t *vect, int size) |
This functions permits to print a dsp16_complex_t typed vector. More... | |
void | dsp32_debug_print_complex_vect (dsp32_complex_t *vect, int size) |
This functions permits to print a dsp32_complex_t typed vector. More... | |
Printf functions | |
These function permits to print any data on a printing device.
| |
int | dsp16_debug_printf (const char *format,...) |
This function is the printf version for 16-bit Q formatted signed numbers. More... | |
int | dsp32_debug_printf (const char *format,...) |
This function is the printf version for 32-bit Q formatted signed numbers. More... | |
int | dsp16_debug_sprintf (char *out, const char *format,...) |
This function is the sprintf version for 16-bit Q formatted signed numbers. More... | |
int | dsp32_debug_sprintf (char *out, const char *format,...) |
This function is the sprintf version for 32-bit Q formatted signed numbers. More... | |
#define dsp_debug_initialization | ( | x | ) | dsp_debug_initialization__(__DATE__, __TIME__, x) |
This define permits to print the date and the time of the last compilation of the dsp_debug_initialization__ function.
Referenced by main().
|
inline |
This functions permits to print a dsp16_t typed number.
n | The 16 bits signed fixed point Q formatted number to print. |
References DSP16_QA, and dsp_debug_print().
Referenced by dsp16_debug_print_vect().
|
inline |
This functions permits to print a dsp16_complex_t typed number.
n | The 16 bits signed fixed point Q formatted complex number to print. |
References DSP16_QA, dsp_debug_print_complex(), dsp16_complex_t::imag, and dsp16_complex_t::real.
Referenced by dsp16_debug_print_complex_vect().
void dsp16_debug_print_complex_vect | ( | dsp16_complex_t * | vect, |
int | size | ||
) |
This functions permits to print a dsp16_complex_t typed vector.
vect | the vector to print. |
size | The size of the vector (vect). |
References dsp16_debug_print_complex(), dsp_debug_print_fct(), and dsp_debug_print_ui().
void dsp16_debug_print_vect | ( | dsp16_t * | vect, |
int | size | ||
) |
This functions permits to print a dsp16_t typed vector.
vect | the vector to print. |
size | The size of the vector (vect). |
References dsp16_debug_print(), dsp_debug_print_fct(), and dsp_debug_print_ui().
Referenced by main().
int dsp16_debug_printf | ( | const char * | format, |
... | |||
) |
This function is the printf version for 16-bit Q formatted signed numbers.
format | The number of bits of the complex number to print. |
References dsp_debug_buffer, dsp_debug_print_fct(), and print().
Referenced by main().
int dsp16_debug_sprintf | ( | char * | out, |
const char * | format, | ||
... | |||
) |
This function is the sprintf version for 16-bit Q formatted signed numbers.
out | The output buffer where the result will be stored. |
format | The number of bits of the complex number to print. |
References print().
|
inline |
This functions permits to print a dsp32_t typed number.
n | The 32 bits signed fixed point Q formatted number to print. |
References DSP32_QA, and dsp_debug_print().
Referenced by dsp32_debug_print_vect().
|
inline |
This functions permits to print a dsp32_complex_t typed number.
n | The 32 bits signed fixed point Q formatted complex number to print. |
References DSP32_QA, dsp_debug_print_complex(), dsp32_complex_t::imag, and dsp32_complex_t::real.
Referenced by dsp32_debug_print_complex_vect().
void dsp32_debug_print_complex_vect | ( | dsp32_complex_t * | vect, |
int | size | ||
) |
This functions permits to print a dsp32_complex_t typed vector.
vect | the vector to print. |
size | The size of the vector (vect). |
References dsp32_debug_print_complex(), dsp_debug_print_fct(), and dsp_debug_print_ui().
void dsp32_debug_print_vect | ( | dsp32_t * | vect, |
int | size | ||
) |
This functions permits to print a dsp32_t typed vector.
vect | the vector to print. |
size | The size of the vector (vect). |
References dsp32_debug_print(), dsp_debug_print_fct(), and dsp_debug_print_ui().
int dsp32_debug_printf | ( | const char * | format, |
... | |||
) |
This function is the printf version for 32-bit Q formatted signed numbers.
format | The number of bits of the complex number to print. |
References dsp_debug_buffer, dsp_debug_print_fct(), and print().
int dsp32_debug_sprintf | ( | char * | out, |
const char * | format, | ||
... | |||
) |
This function is the sprintf version for 32-bit Q formatted signed numbers.
out | The output buffer where the result will be stored. |
format | The number of bits of the complex number to print. |
References print().
void dsp_debug_init | ( | int | fosc | ) |
This function permits to initialize the peripheral that is used to debug. It is automatically called by the dsp_debug_initialization__ function.
fosc | The frequency of the oscillator. |
This function permits to initialize the peripheral that is used to debug. It is automatically called by the dsp_debug_initialization__ function.
References usart_options_t::baudrate, dsp_debug_print_fct(), EXAMPLE_USART, EXAMPLE_USART_BAUDRATE, EXAMPLE_USART_BITSPERCHAR, EXAMPLE_USART_PARITY, EXAMPLE_USART_RX_FUNCTION, EXAMPLE_USART_RX_PIN, EXAMPLE_USART_STOPBIT, EXAMPLE_USART_TX_FUNCTION, EXAMPLE_USART_TX_PIN, gpio_enable_module(), usart_init_rs232(), and USART_NORMAL_CHMODE.
Referenced by dsp_debug_initialization__().
void dsp_debug_print | ( | int | nb_bits, |
int | q, | ||
int | n | ||
) |
Generic function to print all kind of Q formatted numbers.
nb_bits | The number of bits of the number to print. |
q | The a parameter of a Qa.b formatted number. |
n | The signed fixed point Q formatted number to print. |
References dsp_debug_buffer, dsp_debug_print_fct(), and dsp_debug_sprint().
Referenced by dsp16_debug_print(), dsp32_debug_print(), and dsp_debug_print_complex().
void dsp_debug_print_complex | ( | int | nb_bits, |
int | q, | ||
int | real, | ||
int | imag | ||
) |
Generic function to print all kind of complex Q formatted numbers.
nb_bits | The number of bits of the complex number to print. |
q | The a parameter of a Qa.b formatted number. |
real | The real part of the signed fixed point Q formatted complex number to print. |
imag | The imaginary part of the signed fixed point Q formatted complex number to print. |
References dsp_debug_print(), and dsp_debug_print_fct().
Referenced by dsp16_debug_print_complex(), and dsp32_debug_print_complex().
void dsp_debug_print_fct | ( | char * | str | ) |
This function is used to print a string through the peripheral used by the debugging module.
str | The string to print. |
References dsp_debug_write_fct().
Referenced by dsp16_debug_print_complex_vect(), dsp16_debug_print_vect(), dsp16_debug_printf(), dsp32_debug_print_complex_vect(), dsp32_debug_print_vect(), dsp32_debug_printf(), dsp_debug_init(), dsp_debug_print(), and dsp_debug_print_complex().
char dsp_debug_read_fct | ( | ) |
This function is used to get a character through the peripheral used by the debugging module.
This function is used to get a character through the peripheral used by the debugging module.
References EXAMPLE_USART, and usart_getchar().
Referenced by dsp_debug_read(), dsp_debug_read_q(), and dsp_debug_read_ui().
int dsp_debug_sprint | ( | char ** | out, |
int | nb_bits, | ||
int | q, | ||
int | i | ||
) |
Generic function to print all kind of Q formatted numbers.
out | The buffer that received the printed number. |
nb_bits | The number of bits of the number to print. |
q | The a parameter of a Qa.b formatted number. |
i | The signed fixed point Q formatted number to print. |
References dsp_debug_print_ui(), dsp_debug_sprint_after_radix(), and dsp_debug_sprint_fct().
Referenced by dsp_debug_print(), and print().
int dsp_debug_sprint_after_radix | ( | char ** | out, |
unsigned int | num, | ||
unsigned int | den, | ||
int | nb_digits | ||
) |
This functions permits to copy the digits after the radix of a division's result in the specified buffer.
out | The buffer that received the digits after the radix. |
num | The numerator of the division. |
den | The denominator of the division. |
nb_digits | The number of digits to print. |
References dsp_debug_sprint_fct().
Referenced by dsp_debug_sprint().
void dsp_debug_write_fct | ( | char | c | ) |
This function is used to print a character through the peripheral used by the debugging module.
c | The character to print. |
This function is used to print a character through the peripheral used by the debugging module.
References EXAMPLE_USART, and usart_putchar().
Referenced by dsp_debug_print_fct().