mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-04-25 17:39:14 -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
24 lines
563 B
C
24 lines
563 B
C
#ifndef __LIB_H__
|
|
#define __LIB_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "config.h"
|
|
|
|
#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
|
|
|
|
//uint8_t hex_to_uint8(const char *hex, uint8_t len);
|
|
//uint16_t hex_to_uint16(const char *hex, uint8_t len);
|
|
uint32_t hex_to_uint32(const char *hex, uint8_t len);
|
|
|
|
uint8_t ascii_hex_char_to_byte(uint8_t c);
|
|
//int ascii_hex_string_to_bytes(uint8_t *hex_str, uint8_t *out_bytes, size_t out_len);
|
|
|
|
#endif
|