File size: 1,032 Bytes
cd886b3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #ifndef _SIMPLE_LIB_H
#define _SIMPLE_LIB_H
#include <stdlib.h>
#include <stdint.h>
#include <stddef.h>
extern void _exit_(void) __attribute__((noreturn));
extern void _reset_(void) __attribute__((noreturn));
#define UART_BASE ((volatile uint8_t*)0x10000000)
#define RAM_BASE ((volatile uint8_t*)0x80000000)
#define RAM_BASE_U32 ((volatile uint32_t*)RAM_BASE)
void delay(uint32_t i);
void printC(char c);
uint8_t hasChar();
char getChar();
char wait4Char();
void printS(const char* s);
#ifdef isxdigit
#undef isxdigit
#endif
#ifdef isdigit
#undef isdigit
#endif
#ifdef isupper
#undef isupper
#endif
#ifdef islower
#undef islower
#endif
#ifdef isalpha
#undef isalpha
#endif
#ifdef isalnum
#undef isalnum
#endif
int isxdigit(int c);
int isdigit(int c);
int isupper(int c);
int islower(int c);
int isalpha(int c);
int isalnum(int c);
void prompt(const char* s);
uint32_t wait4N(uint8_t n);
void printH(uint8_t i);
void printH_32(uint32_t i);
uint32_t hex2int(const char* s);
void flush_input(void);
#endif /* _SIMPLE_LIB_H */
|