ff_devices.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * FreeRTOS+FAT V2.3.3
  3. * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  6. * this software and associated documentation files (the "Software"), to deal in
  7. * the Software without restriction, including without limitation the rights to
  8. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  9. * the Software, and to permit persons to whom the Software is furnished to do so,
  10. * subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in all
  13. * copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  17. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  18. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  19. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  20. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. * https://www.FreeRTOS.org
  23. * https://github.com/FreeRTOS
  24. *
  25. */
  26. /**
  27. * @file ff_devices.h
  28. **/
  29. #ifndef FF_DEVICES_H
  30. #define FF_DEVICES_H
  31. #ifndef PLUS_FAT_H
  32. #error this header will be included from "ff_headers.h"
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #define FF_DEV_NO_DEV 0
  38. #define FF_DEV_CHAR_DEV 1
  39. #define FF_DEV_BLOCK_DEV 2
  40. BaseType_t xCheckDevicePath( const char * pcPath );
  41. int FF_Device_Seek( FF_FILE * pxStream,
  42. long lOffset,
  43. int iWhence );
  44. BaseType_t FF_Device_Open( const char * pcPath,
  45. FF_FILE * pxStream );
  46. void FF_Device_Close( FF_FILE * pxStream );
  47. size_t FF_Device_Read( void * pvBuf,
  48. size_t lSize,
  49. size_t lCount,
  50. FF_FILE * pxStream );
  51. size_t FF_Device_Write( const void * pvBuf,
  52. size_t lSize,
  53. size_t lCount,
  54. FF_FILE * pxStream );
  55. int FF_Device_GetDirEnt( const char * pcPath,
  56. FF_DirEnt_t * pxDirEnt );
  57. #ifdef __cplusplus
  58. } /* extern "C" */
  59. #endif
  60. #endif /* FF_DEVICES_H */