botgob

doth

May 21st, 2021
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. /*
  2. * libNAME.h
  3. * Declaration of library functions, constants etc...
  4. */
  5.  
  6. #ifndef _LIBMD407_H /* Vi lägger en "include-guard" här */
  7. #define _LIBMD407_H
  8. #define MAX_DEVICE 3
  9.  
  10. /* Använd standard header filer */
  11. #include <stdio.h>
  12. #include <errno.h>
  13. #include <sys/stat.h>
  14. #include <unistd.h>
  15.  
  16. /* Konstanter som definieras av länkaren */
  17. extern char __heap_low;
  18. extern char __heap_top;
  19. extern char __bss_start__;
  20. extern char __bss_end__;
  21.  
  22. /* Funktioner i libmd407.c */
  23. void crt_init( void );
  24. void crt_deinit( void );
  25.  
  26. typedef struct{
  27. char name[16];
  28. int (*init) (int);
  29. void (*deinit) (int);
  30. int (*fstat)(struct stat *st);
  31. int (*isatty)(void);
  32. int (*open)(const char name,int flags,int mode);
  33. int (*close)(void);
  34. int (*lseek)(int ptr, int dir);
  35. int (*write)(char *ptr, int len);
  36. int (*read)(char *ptr, int len)
  37. }DEV_DRIVER_DESC, *PDEV_DRIVER_DESC;
  38. #endif
Advertisement
Add Comment
Please, Sign In to add comment