Master Thesis  V1.0
Research and Design of Sensor Node for NMSD Treatment
dbprint.c File Reference

Homebrew println/printf replacement "DeBugPrint". More...

#include "debug_dbprint.h"
Include dependency graph for dbprint.c:

Go to the source code of this file.

Detailed Description

Homebrew println/printf replacement "DeBugPrint".

Originally designed for use on the Silicion Labs Happy Gecko EFM32 board (EFM32HG322 – TQFP48).

Version
6.2
Author
Brecht Van Eeckhoudt

Versions

Please check https://github.com/Fescron/dbprint to find the latest version of dbprint!

  • v1.0: "define" used to jump between VCOM or other mode, itoa (<stdlib.h>) used aswell as stdio.h
  • v1.1: Separated printInt method in a separate function for printing "int32_t" and "uint32_t" values.
  • v1.2: Added more options to the initialize method (location selection & boolean if VCOM is used).
  • v2.0: Restructured files to be used in other projects, added a lot more documentation, added "dbAlert" and "dbClear" methods.
  • v2.1: Added interrupt functionality.
  • v2.2: Added parse functions, separated method for printing uint values in a separate one for DEC and HEX notation.
  • v2.3: Updated documentation.
  • v2.4: Fixed notes.
  • v2.5: Separated method for printing int values in a separate one for DEC and HEX notation.
  • v2.6: Stopped using itoa (<stdlib.h>) in all methods.
  • v3.0: Simplified number printing, stopped using separate methods for uint and int values.
  • v3.1: Removed useless if... check.
  • v3.2: Added the ability to print text in a color.
  • v3.3: Added info, warning and critical error printing methods.
  • v3.4: Added printInt(_hex) methods that directly go to a new line.
  • v3.5: Added USART0 IRQ handlers.
  • v3.6: Added the ability to print (u)int values as INFO, WARN or CRIT lines.
  • v3.7: Added separate "_hex" methods for dbinfo/warn/critInt instead of a boolean to select (hexa)decimal notation.
  • v3.8: Added ReadChar-Int-Line methods.
  • v3.9: Added "void" between argument brackets were before nothing was.
  • v4.0: Added more documentation.
  • v4.1: Added color reset before welcome message.
  • v5.0: Made uint-char conversion methods static, moved color functionality to enum, started moving interrupt functionality to use getters and setters.
  • v5.1: Fixed interrupt functionality with getters and setters.
  • v6.0: Cleaned up interrupt functionality and added some documentation. (put some code in comments to maybe fix later if ever necessary)
  • v6.1: Made dbpointer a local variable (removed extern). Removed extern from the documentation.
  • v6.2: Removed static before the local variables (not necessary).


License

Copyright (C) 2019 - Brecht Van Eeckhoudt

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License can be found in the LICENSE file along with this source code.


Some methods also use code obtained from examples from Silicon Labs' GitHub. These sections are licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.


Attention
See the file dbprint_documentation.h for a lot of useful documentation!

Definition in file dbprint.c.