M0nk3

DBGU.h //inter

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