Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

68 Zeilen
2.5KB

  1. /* FatLib Library
  2. * Copyright (C) 2013 by William Greiman
  3. *
  4. * This file is part of the FatLib Library
  5. *
  6. * This Library is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This Library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with the FatLib Library. If not, see
  18. * <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef FatApiConstants_h
  21. #define FatApiConstants_h
  22. //------------------------------------------------------------------------------
  23. // use the gnu style oflag in open()
  24. /** open() oflag for reading */
  25. uint8_t const O_READ = 0X01;
  26. /** open() oflag - same as O_IN */
  27. uint8_t const O_RDONLY = O_READ;
  28. /** open() oflag for write */
  29. uint8_t const O_WRITE = 0X02;
  30. /** open() oflag - same as O_WRITE */
  31. uint8_t const O_WRONLY = O_WRITE;
  32. /** open() oflag for reading and writing */
  33. uint8_t const O_RDWR = (O_READ | O_WRITE);
  34. /** open() oflag mask for access modes */
  35. uint8_t const O_ACCMODE = (O_READ | O_WRITE);
  36. /** The file offset shall be set to the end of the file prior to each write. */
  37. uint8_t const O_APPEND = 0X04;
  38. /** synchronous writes - call sync() after each write */
  39. uint8_t const O_SYNC = 0X08;
  40. /** truncate the file to zero length */
  41. uint8_t const O_TRUNC = 0X10;
  42. /** set the initial position at the end of the file */
  43. uint8_t const O_AT_END = 0X20;
  44. /** create the file if nonexistent */
  45. uint8_t const O_CREAT = 0X40;
  46. /** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */
  47. uint8_t const O_EXCL = 0X80;
  48. // FatFile class static and const definitions
  49. // flags for ls()
  50. /** ls() flag for list all files including hidden. */
  51. uint8_t const LS_A = 1;
  52. /** ls() flag to print modify. date */
  53. uint8_t const LS_DATE = 2;
  54. /** ls() flag to print file size. */
  55. uint8_t const LS_SIZE = 4;
  56. /** ls() flag for recursive list of subdirectories */
  57. uint8_t const LS_R = 8;
  58. // flags for timestamp
  59. /** set the file's last access date */
  60. uint8_t const T_ACCESS = 1;
  61. /** set the file's creation date and time */
  62. uint8_t const T_CREATE = 2;
  63. /** Set the file's write date and time */
  64. uint8_t const T_WRITE = 4;
  65. #endif // FatApiConstants_h