Skip to content

Commit

Permalink
Minor fixes (#2833)
Browse files Browse the repository at this point in the history
- Fix FlashString coding style
- UPnP operator== not const
- Tidy rp2040 build.mk
- Fix comments in `FileSystem.h` referring to Spiffs
  • Loading branch information
mikee47 authored Jun 25, 2024
1 parent 3f8f2ef commit 257a079
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
6 changes: 2 additions & 4 deletions Sming/Arch/Rp2040/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ CPPFLAGS += \
-DARDUINO_ARCH_RP2040 \
-march=armv6-m \
-mcpu=cortex-m0plus \
-mthumb
-mthumb \
-nostdlib

CXXFLAGS += \
-fno-threadsafe-statics \
Expand Down Expand Up @@ -43,8 +44,5 @@ OBJCOPY := $(TOOLSPEC)objcopy
OBJDUMP := $(TOOLSPEC)objdump
GDB := gdb

CPPFLAGS += \
-nostdlib

# => Tools
MEMANALYZER = $(PYTHON) $(ARCH_TOOLS)/memanalyzer.py $(OBJDUMP)$(TOOL_EXT)
10 changes: 3 additions & 7 deletions Sming/Core/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bool fileMountFileSystem(IFS::IFileSystem* fs);
bool fwfs_mount();

/**
* @brief Mount SPIFFS volume from a specific partition
* @brief Mount FWFS volume from a specific partition
* @retval bool true on success
*/
bool fwfs_mount(Storage::Partition partition);
Expand Down Expand Up @@ -256,8 +256,6 @@ template <typename TFileName> inline file_size_t fileGetSize(const TFileName& fi
* @param file Open file handle, must have Write access
* @param newSize
* @retval int Error code
* @note In POSIX `ftruncate()` can also make the file bigger, however SPIFFS can only
* reduce the file size and will return an error if newSize > fileSize
*/
inline int fileTruncate(FileHandle file, file_size_t newSize)
{
Expand All @@ -279,8 +277,6 @@ inline int fileTruncate(FileHandle file)
* @param fileName
* @param newSize
* @retval int Error code
* @note In POSIX `truncate()` can also make the file bigger, however SPIFFS can only
* reduce the file size and will return an error if newSize > fileSize
*/
template <typename TFileName> int fileTruncate(const TFileName& fileName, file_size_t newSize)
{
Expand Down Expand Up @@ -342,7 +338,7 @@ template <typename TFileName> inline size_t fileGetContent(const TFileName& file

/** @brief Get file statistics
* @param name File name
* @param stat Pointer to SPIFFS statistic structure to populate
* @param stat Pointer to statistic structure to populate
* @retval int Error code
*/
inline int fileStats(const char* fileName, FileStat& stat)
Expand All @@ -358,7 +354,7 @@ inline int fileStats(const String& fileName, FileStat& stat)

/** brief Get file statistics
* @param file File handle
* @param stat Pointer to SPIFFS statistic structure to populate
* @param stat Pointer to statistic structure to populate
* @retval int Error code
*/
inline int fileStats(FileHandle file, FileStat& stat)
Expand Down
2 changes: 1 addition & 1 deletion Sming/Libraries/UPnP
Submodule UPnP updated 1 files
+1 −1 tools/scan/app/Fetch.h

0 comments on commit 257a079

Please sign in to comment.