From e140d39944ba02407aa281cc6397bc75e69017ad Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Sat, 19 Sep 2020 20:08:25 +0200 Subject: [PATCH] some fixes for sd card handler --- memory/HasFileSystemIF.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/memory/HasFileSystemIF.h b/memory/HasFileSystemIF.h index b6d439811..6065ebfdf 100644 --- a/memory/HasFileSystemIF.h +++ b/memory/HasFileSystemIF.h @@ -1,15 +1,11 @@ -/* - * HasFileSystemIF.h - * - * Created on: 19.01.2020 - * Author: Jakob Meier - */ - -#ifndef FRAMEWORK_MEMORY_HASFILESYSTEMIF_H_ -#define FRAMEWORK_MEMORY_HASFILESYSTEMIF_H_ +#ifndef FSFW_MEMORY_HASFILESYSTEMIF_H_ +#define FSFW_MEMORY_HASFILESYSTEMIF_H_ #include "../returnvalues/HasReturnvaluesIF.h" +/** + * @author Jakob Meier + */ class HasFileSystemIF { public: @@ -19,18 +15,24 @@ public: * @return MessageQueueId_t of the object */ virtual MessageQueueId_t getCommandQueue() const = 0; + /** * Function to write to a file * @param dirname Directory of the file * @param filename The filename of the file * @param data The data to write to the file * @param size The size of the data to write - * @param packetNumber Counts the number of packets. For large files the write procedure must be split in multiple calls to writeToFile + * @param packetNumber Counts the number of packets. + * For large files the write procedure must be split in multiple calls + * to writeToFile */ - virtual ReturnValue_t writeToFile(const char* dirname, char* filename, const uint8_t* data, uint32_t size, uint16_t packetNumber) = 0; - virtual ReturnValue_t createFile(const char* dirname, const char* filename, const uint8_t* data, uint32_t size) = 0; - virtual ReturnValue_t deleteFile(const char* dirname, const char* filename) = 0; + virtual ReturnValue_t writeToFile(const char* dirname, const char* filename, + const uint8_t* data, size_t size, uint16_t packetNumber) = 0; + virtual ReturnValue_t createFile(const char* dirname, const char* filename, + const uint8_t* data, size_t size) = 0; + virtual ReturnValue_t deleteFile(const char* dirname, + const char* filename) = 0; }; -#endif /* FRAMEWORK_MEMORY_HASFILESYSTEMIF_H_ */ +#endif /* FSFW_MEMORY_HASFILESYSTEMIF_H_ */