!268 pika_fatfs_v0.1.3_1708844427837

Merge pull request !268 from pikabot/pika_fatfs_v0.1.3_1708844427837
This commit is contained in:
李昂 2024-02-25 07:05:55 +00:00 committed by Gitee
commit 1ffef7ce21
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,6 @@
#include "PikaObj.h"
#include "ff.h"
#include "freertos.h"
typedef FIL _INNER_FILE;
@ -24,13 +25,13 @@ FILE* pika_platform_fopen(const char* filename, const char* modes) {
/* Compute the flags to pass to open() */
flags = __fmodeflags(modes);
_INNER_FILE *_f = malloc(sizeof(*_f));
_INNER_FILE *_f = pika_platform_malloc(sizeof(*_f));
if(NULL == _f){
return NULL;
}
res = f_open(_f, filename, flags);
if (res) {
free(_f);
pika_platform_free(_f);
return NULL;
}
@ -54,7 +55,7 @@ size_t pika_platform_fread(void* ptr, size_t size, size_t n, FILE* stream) {
int pika_platform_fclose(FILE* stream) {
_INNER_FILE* _f = (_INNER_FILE*)stream;
f_close(_f);
free(_f);
pika_platform_free(_f);
return 0;
}

View File

@ -505,7 +505,10 @@ releases = [
"v0.0.1 280700b8a8eee1849d16ac68871d014392edf269",
"v0.1.0 8ab8cd90be83f1cb86e2b2bcbb3b68d99d034815",
"v0.1.1 6ad787b3490f5440cf12b9dfd0042534af3ce7e9",
"v0.1.2 c7621827d9c762250716727986d4d3d4c1778067"
"v0.1.2 c7621827d9c762250716727986d4d3d4c1778067",
"v0.1.3 dbd16d5d6b971a7c0e65c009be4c3ff486b5ea0e",
"v0.1.3 aeb7deb4250540aa493602ceac8eccde622b4bcc",
"v0.1.3 b259f737c14bebce39c99165d470aa345126f286"
]
[[packages]]