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

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

#include <stdint.h>
#include <stdbool.h>
#include "em_usart.h"
Include dependency graph for dbprint.h:

Go to the source code of this file.

Macros

#define DBPRINT_BUFFER_SIZE   80
 

Typedefs

typedef enum dbprint_colors dbprint_color_t
 

Enumerations

enum  dbprint_colors {
  RED, GREEN, BLUE, CYAN,
  MAGENTA, YELLOW, DEFAULT_COLOR
}
 

Functions

void dbprint_INIT (USART_TypeDef *pointer, uint8_t location, bool vcom, bool interrupts)
 
void dbAlert (void)
 
void dbClear (void)
 
void dbprint (char *message)
 
void dbprintln (char *message)
 
void dbprintInt (int32_t value)
 
void dbprintlnInt (int32_t value)
 
void dbprintInt_hex (int32_t value)
 
void dbprintlnInt_hex (int32_t value)
 
void dbprint_color (char *message, dbprint_color_t color)
 
void dbprintln_color (char *message, dbprint_color_t color)
 
void dbinfo (char *message)
 
void dbwarn (char *message)
 
void dbcrit (char *message)
 
void dbinfoInt (char *message1, int32_t value, char *message2)
 
void dbwarnInt (char *message1, int32_t value, char *message2)
 
void dbcritInt (char *message1, int32_t value, char *message2)
 
void dbinfoInt_hex (char *message1, int32_t value, char *message2)
 
void dbwarnInt_hex (char *message1, int32_t value, char *message2)
 
void dbcritInt_hex (char *message1, int32_t value, char *message2)
 
char dbReadChar (void)
 
uint8_t dbReadInt (void)
 
void dbReadLine (char *buf)
 
bool dbGet_RXstatus (void)
 
void dbGet_RXbuffer (char *buf)
 

Detailed Description

Homebrew println/printf replacement "DeBugPrint".

Version
6.2
Author
Brecht Van Eeckhoudt

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.

Definition in file dbprint.h.

Macro Definition Documentation

◆ DBPRINT_BUFFER_SIZE

#define DBPRINT_BUFFER_SIZE   80

Public definition to configure the buffer size.

Definition at line 48 of file dbprint.h.

Typedef Documentation

◆ dbprint_color_t

Enum type for the color selection.

Enumeration Type Documentation

◆ dbprint_colors

Enum type for the color selection.

Enumerator
RED 
GREEN 
BLUE 
CYAN 
MAGENTA 
YELLOW 
DEFAULT_COLOR 

Definition at line 52 of file dbprint.h.

53 {
54  RED,
55  GREEN,
56  BLUE,
57  CYAN,
58  MAGENTA,
59  YELLOW,

Function Documentation

◆ dbAlert()

void dbAlert ( void  )

◆ dbClear()

void dbClear ( void  )

◆ dbcrit()

void dbcrit ( char *  message)

◆ dbcritInt()

void dbcritInt ( char *  message1,
int32_t  value,
char *  message2 
)

◆ dbcritInt_hex()

void dbcritInt_hex ( char *  message1,
int32_t  value,
char *  message2 
)

◆ dbGet_RXbuffer()

void dbGet_RXbuffer ( char *  buf)

◆ dbGet_RXstatus()

bool dbGet_RXstatus ( void  )

◆ dbinfo()

void dbinfo ( char *  message)

Referenced by delay().

◆ dbinfoInt()

void dbinfoInt ( char *  message1,
int32_t  value,
char *  message2 
)

◆ dbinfoInt_hex()

void dbinfoInt_hex ( char *  message1,
int32_t  value,
char *  message2 
)

◆ dbprint()

◆ dbprint_color()

void dbprint_color ( char *  message,
dbprint_color_t  color 
)

◆ dbprint_INIT()

void dbprint_INIT ( USART_TypeDef *  pointer,
uint8_t  location,
bool  vcom,
bool  interrupts 
)

◆ dbprintInt()

void dbprintInt ( int32_t  value)

◆ dbprintInt_hex()

void dbprintInt_hex ( int32_t  value)

◆ dbprintln()

void dbprintln ( char *  message)

◆ dbprintln_color()

void dbprintln_color ( char *  message,
dbprint_color_t  color 
)

◆ dbprintlnInt()

void dbprintlnInt ( int32_t  value)

Referenced by ICM_20948_printAllData().

◆ dbprintlnInt_hex()

void dbprintlnInt_hex ( int32_t  value)

◆ dbReadChar()

char dbReadChar ( void  )

◆ dbReadInt()

uint8_t dbReadInt ( void  )

◆ dbReadLine()

void dbReadLine ( char *  buf)

◆ dbwarn()

void dbwarn ( char *  message)

◆ dbwarnInt()

void dbwarnInt ( char *  message1,
int32_t  value,
char *  message2 
)

◆ dbwarnInt_hex()

void dbwarnInt_hex ( char *  message1,
int32_t  value,
char *  message2 
)
MAGENTA
Definition: dbprint.h:58
DEFAULT_COLOR
Definition: dbprint.h:60
BLUE
Definition: dbprint.h:56
dbprint_color_t
enum dbprint_colors dbprint_color_t
RED
Definition: dbprint.h:54
CYAN
Definition: dbprint.h:57
GREEN
Definition: dbprint.h:55
YELLOW
Definition: dbprint.h:59