M0nk3

DBGU.h //fifo

Dec 13th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #ifndef DBGU_H
  2. #define DBGU_H
  3.    
  4. #include <stdbool.h>
  5.    
  6. #define PROCESSOR_CLOCK 100000000 // 100MHz
  7. #define BUFFERSIZE 0xF
  8. #define RETURN 13
  9.  
  10. typedef struct FIFO {
  11.     char buffer[BUFFERSIZE + 1];
  12.     unsigned int head;
  13.     unsigned int tail;
  14. } Fifo;
  15.    
  16. int DBGU_init(void);
  17. int dbgu_print_ascii();
  18. int dbgu_read_ascii();
  19. void dbgu_print_warning();
  20. void newLine();
  21. void FIFO_Init (Fifo *);
  22. bool is_FIFO_full(Fifo *);
  23. int FIFO_Put (Fifo *, char);
  24. int FIFO_Get (Fifo *, char *);
  25. void echo(char *);
  26. void charToUpper(char *);
  27. void charToLower(char *);
  28.    
  29. #endif
Add Comment
Please, Sign In to add comment