#include "dsp.h"
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... | |
Typedefs | |
typedef void(* | dsp_debug_print_str_t )(char *) |
This type definition is a pointer on a function that permits to print a string of a device. It is used to separate the debug module to a printer device module. 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 | |||||||
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... | |||||||
Initialization function | |||||||
This function permits to initialize the debugging module.
| |||||||
void | dsp_debug_initialization__ (char *date, char *time, int fosc) | ||||||
Q formatted number printing functions | |||||||
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 | |||||||
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 | |||||||
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... | |||||||
Reading functions | |||||||
void | dsp_debug_read (char *str, int size, char end_char) | ||||||
This function is used to get a string through the peripheral used by the debugging module. More... | |||||||
int | dsp_debug_read_ui () | ||||||
This function is used to get an unsigned integer through the peripheral used by the debugging module. More... | |||||||
int | dsp_debug_read_q (int a, int b) | ||||||
This function is used to read a Q formatted number. More... | |||||||
typedef void(* dsp_debug_print_str_t)(char *) |
This type definition is a pointer on a function that permits to print a string of a device.
It is used to separate the debug module to a printer device module.
void dsp_debug_initialization__ | ( | char * | date, |
char * | time, | ||
int | fosc | ||
) |
References dsp_debug_init().
void dsp_debug_read | ( | char * | str, |
int | size, | ||
char | end_char | ||
) |
This function is used to get a string through the peripheral used by the debugging module.
str | The output buffer to store the string. |
size | The size of the buffer. |
end_char | The ending character. |
This function is used to get a string through the peripheral used by the debugging module.
References dsp_debug_read_fct().
int dsp_debug_read_q | ( | int | a, |
int | b | ||
) |
This function is used to read a Q formatted number.
a | The length in byte of the integer part of the Q formatted number. |
b | The length in byte of the decimal part of the Q formatted number. |
This function is used to read a Q formatted number.
References dsp_debug_parse_int(), dsp_debug_read_fct(), DSP_Q_MAX, and DSP_Q_MIN.
int dsp_debug_read_ui | ( | ) |
This function is used to get an unsigned integer through the peripheral used by the debugging module.
This function is used to get an unsigned integer through the peripheral used by the debugging module.
References dsp_debug_buffer, dsp_debug_parse_int(), and dsp_debug_read_fct().