mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-09 22:21:23 +00:00
![Ben Meadors](/assets/img/avatar_default.png)
* Wio-e5 / STM32WL wip * Stubbing some FS stuff out * Wio-e5 / STM32WL wip * Stubbing some FS stuff out * Wio-e5 / STM32WL wip * Stubbing some FS stuff out * Wio-e5 / STM32WL wip * Stubbing some FS stuff out * LittleFS compiles. Can't check with actual device. * make cppcheck happy again * Guard against accelerometer thread * Missed a spot * Upload via ST-LINK * Derive MAC address from UID * upload port * Trunk it * Guard it * Maybe fix the cache error on startup. * Latest RadioLib ref to fix SubGHZ * revert nasty Sub-GHz Hack * Boots and radio inits with RadioLib 6.0, LittleFS doesn't seem to work --------- Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com> Co-authored-by: GUVWAF <thijs@havinga.eu>
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "configuration.h"
|
|
|
|
// Cross platform filesystem API
|
|
|
|
#if defined(ARCH_PORTDUINO)
|
|
// Portduino version
|
|
#include "PortduinoFS.h"
|
|
#define FSCom PortduinoFS
|
|
#define FSBegin() true
|
|
#define FILE_O_WRITE "w"
|
|
#define FILE_O_READ "r"
|
|
#endif
|
|
|
|
#if defined(ARCH_STM32WL)
|
|
#include "platform/stm32wl/InternalFileSystem.h" // STM32WL version
|
|
#define FSCom InternalFS
|
|
#define FSBegin() FSCom.begin()
|
|
using namespace LittleFS_Namespace;
|
|
#endif
|
|
|
|
#if defined(ARCH_RP2040)
|
|
// RP2040
|
|
#include "LittleFS.h"
|
|
#define FSCom LittleFS
|
|
#define FSBegin() FSCom.begin() // set autoformat
|
|
#define FILE_O_WRITE "w"
|
|
#define FILE_O_READ "r"
|
|
#endif
|
|
|
|
#if defined(ARCH_ESP32)
|
|
// ESP32 version
|
|
#include "LittleFS.h"
|
|
#define FSCom LittleFS
|
|
#define FSBegin() FSCom.begin(true) // format on failure
|
|
#define FILE_O_WRITE "w"
|
|
#define FILE_O_READ "r"
|
|
#endif
|
|
|
|
#if defined(ARCH_NRF52)
|
|
// NRF52 version
|
|
#include "InternalFileSystem.h"
|
|
#define FSCom InternalFS
|
|
#define FSBegin() FSCom.begin() // InternalFS formats on failure
|
|
using namespace Adafruit_LittleFS_Namespace;
|
|
#endif
|
|
|
|
void fsInit();
|
|
bool copyFile(const char *from, const char *to);
|
|
bool renameFile(const char *pathFrom, const char *pathTo);
|
|
void listDir(const char *dirname, uint8_t levels, bool del);
|
|
void rmDir(const char *dirname);
|
|
void setupSDCard(); |