mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-04-25 01:19:20 -04:00

- Move GPIO functions to gpio.c and gpio.h - Move string handling functions for debug to lib.c and lib.h - Add config.h and move config defines there - Add debug print functionality via FPGA with framing protocol - Add Flash Code and Flash Data functions to flash.c and flash.h
40 lines
645 B
C
40 lines
645 B
C
#ifndef __PRINT_H__
|
|
#define __PRINT_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "config.h"
|
|
|
|
void printStr(uint8_t *str);
|
|
void printChar(uint8_t c);
|
|
|
|
#ifdef DEBUG_SETUP
|
|
#define printStrSetup(str) printStr(str)
|
|
#define printNumU8HexSetup(num) printNumU8Hex(num)
|
|
#else
|
|
#define printStrSetup(str)
|
|
#define printNumU8HexSetup(num)
|
|
#endif
|
|
|
|
#ifdef USE_NUM_U8
|
|
void printNumU8(uint8_t num);
|
|
#endif
|
|
|
|
#ifdef USE_NUM_U32
|
|
void printNumU32(uint32_t num);
|
|
#endif
|
|
|
|
#ifdef USE_NUM_U8HEX
|
|
void printNumU8Hex(uint8_t num);
|
|
#endif
|
|
|
|
#ifdef USE_NUM_U16HEX
|
|
void printNumU16Hex(uint16_t num);
|
|
#endif
|
|
|
|
#ifdef USE_NUM_U32HEX
|
|
void printNumU32Hex(uint32_t num);
|
|
#endif
|
|
|
|
#endif
|