vFile.h 889 B

123456789101112131415161718192021222324
  1. #ifndef __VFILE_H__
  2. #define __VFILE_H__
  3. /*******************************************************************************************************/
  4. #include "stdint.h"
  5. typedef struct
  6. {
  7. uint8_t *curptr;
  8. uint32_t offset;
  9. uint32_t size;
  10. }vFile;
  11. /*******************************************************************************************************/
  12. vFile *vfopen(const uint8_t *dp, uint32_t size);
  13. int vfread(vFile *fp, uint8_t *buff, int len);
  14. uint8_t *vfgetpos(vFile *fp, uint32_t *position);
  15. int vfsetpos(vFile *fp, uint32_t position);
  16. int vfclose(vFile *fp);
  17. uint32_t vfgetlen(vFile *fp);
  18. #endif
  19. /*******************************************************************************************************
  20. ** End Of File
  21. ********************************************************************************************************/