-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #852 from Daft-Freak/reduced-fat
De-duplicate blit API -> fatfs glue
- Loading branch information
Showing
13 changed files
with
222 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,7 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <functional> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include "engine/file.hpp" | ||
#include "fatfs_blit_api.hpp" | ||
|
||
void init_fs(); | ||
|
||
bool get_files_open(); | ||
void close_open_files(); | ||
|
||
void *open_file(const std::string &file, int mode); | ||
int32_t read_file(void *fh, uint32_t offset, uint32_t length, char *buffer); | ||
int32_t write_file(void *fh, uint32_t offset, uint32_t length, const char *buffer); | ||
int32_t close_file(void *fh); | ||
uint32_t get_file_length(void *fh); | ||
void list_files(const std::string &path, std::function<void(blit::FileInfo &)> callback); | ||
bool file_exists(const std::string &path); | ||
bool directory_exists(const std::string &path); | ||
bool create_directory(const std::string &path); | ||
bool rename_file(const std::string &old_name, const std::string &new_name); | ||
bool remove_file(const std::string &path); | ||
const char *get_save_path(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(fatfs-blit-api) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_library(FatFsBlitAPI INTERFACE) | ||
target_sources(FatFsBlitAPI INTERFACE ${CMAKE_CURRENT_LIST_DIR}/fatfs_blit_api.cpp) | ||
target_include_directories(FatFsBlitAPI INTERFACE ${CMAKE_CURRENT_LIST_DIR}) | ||
target_link_libraries(FatFsBlitAPI INTERFACE FatFs) |
Oops, something went wrong.