Jonas Thörnblad 3ccdf8fc0f
Add incoming and outgoing CTS (Clear To Send) signals for the CH552
- Add CTS signals let the FPGA and CH552 signal each other that
    it is OK send UART data.
  - Update the CH552 rx and frame handling logic.
  - Fix minor spelling errors and indentation
2025-01-09 10:55:58 +01:00

43 lines
768 B
C

#ifndef __PRINT_H__
#define __PRINT_H__
#include <stdint.h>
//#define DEBUG_PRINT
//#define DEBUG_SETUP
//#define UART_OUT_DEBUG
//#define USE_NUM_U8
#define USE_NUM_U32
//#define USE_NEGATIVE_NUMS
void printStr(uint8_t *str);
void printChar(uint8_t c);
#ifdef DEBUG_SETUP
#define printStrSetup(x) printStr(x)
#define printNumHexSetup(x) printNumHex(x)
#else
#define printStrSetup(x)
#define printNumHexSetup(x)
#endif
#ifdef USE_NUM_U8
int8_t uint8_to_str(uint8_t *buf, uint8_t bufsize, uint8_t n);
#endif
#ifdef USE_NUM_U32
int8_t uint32_to_str(uint8_t *buf, uint8_t bufsize, uint32_t n);
#endif
#ifdef USE_NUM_U8
void printNumU8(uint8_t num);
#endif
#ifdef USE_NUM_U32
void printNumU32(uint32_t num);
#endif
void printNumHex(uint8_t num);
#endif