Skip to content

Commit 571a557

Browse files
Merge pull request #1 from arduino-libraries/aliphys/ArduinofyLibraryName
[AE-158] Arduinofy Library Name
2 parents b0004ba + adc589b commit 571a557

15 files changed

+26
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unified Storage Library
22

3-
The UnifiedStorage library provides a unified interface to access different types of storage, including internal storage, SD cards, and USB mass storage devices. It simplifies the handling of files and directories across multiple storage mediums on Portenta, Opta, and some Nicla boards.
3+
The Arduino_UnifiedStorage library provides a unified interface to access different types of storage, including internal storage, SD cards, and USB mass storage devices. It simplifies the handling of files and directories across multiple storage mediums on Portenta, Opta, and some Nicla boards.
44

55

66
## Examples

docs/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
### Use QSPI Flash, SD cards, and USB mass storage devices
44
This library allows you to easily switch between different storage mediums on supported boards, check the "Compatibility" section for more details about what storage medium is supported on what board.
55

6-
To initialise the storage medium you need to create a `UnifiedStorage` object, and to mount it you need to call it's `begin()` method:
6+
To initialise the storage medium you need to create a `Arduino_UnifiedStorage` object, and to mount it you need to call it's `begin()` method:
77

88
```c
9-
UnifiedStorage storageMedium = USBStorage(); // or
10-
// UnifiedStorage sd = SDStorage();
11-
// UnifiedStorage internal = InternalStorage();
9+
Arduino_UnifiedStorage storageMedium = USBStorage(); // or
10+
// Arduino_UnifiedStorage sd = SDStorage();
11+
// Arduino_UnifiedStorage internal = InternalStorage();
1212

1313
void setup(){
1414
storageMedium.begin();
1515
}
1616
```
17-
You can initialize a UnifiedStorage object of each type (QSPI, SD, USB), and copy files and folders from one medium to another.
17+
You can initialize a Arduino_UnifiedStorage object of each type (QSPI, SD, USB), and copy files and folders from one medium to another.
1818

1919
### Open, Write, and Read Files
2020

examples/advanced/advanced.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
This example demonstrates the usage of the "UnifiedStorage" library with USB storage and internal storage.
2+
This example demonstrates the usage of the "Arduino_UnifiedStorage" library with USB storage and internal storage.
33
The code includes the necessary library and defines instances of the "USBStorage" and "InternalStorage" classes.
44
55
In the setup function, the code initializes the serial communication and mounts the USB storage and internal storage.
@@ -13,7 +13,7 @@ After the file operations, the code prints the contents of both the USB storage
1313
It recursively prints the directories (marked as "[D]") and files (marked as "[F]") using the "printFolderContents" function.
1414
*/
1515

16-
#include "UnifiedStorage.h"
16+
#include "Arduino_UnifiedStorage.h"
1717

1818

1919
USBStorage usbStorage = USBStorage();

examples/opta_logger/opta_logger.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
This example demonstrates the usage of the "UnifiedStorage" library for logging and backing up data to USB storage in case a USB Mass Storage device is inserted.
2+
This example demonstrates the usage of the "Arduino_UnifiedStorage" library for logging and backing up data to USB storage in case a USB Mass Storage device is inserted.
33
44
The code defines two main functions: "logData" and "performUpdate".
55
The "logData" function logs sensor data by reading an analog sensor and writing the data to the log file.
@@ -21,7 +21,7 @@ INSTRUCTIONS
2121
The skecth will log to internal storage in the meantime, and wait for the USB drive to be inserted again.
2222
*/
2323

24-
#include "UnifiedStorage.h"
24+
#include "Arduino_UnifiedStorage.h"
2525
#include <vector>
2626

2727
#define USB_MOUNTED_LED LED_BLUE

examples/simple/simple.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
This examples demonstrates the usage of the "UnifiedStorage" library,
2+
This examples demonstrates the usage of the "Arduino_UnifiedStorage" library,
33
which allows the program to easily switch between different storage mediums.
44
55
By uncommenting the appropriate lines, you can choose to use either an SD card,
@@ -16,7 +16,7 @@ It changes the mode of the files to read mode, moves the file pointers to the be
1616
The read data is printed to the serial monitor.
1717
*/
1818

19-
#include "UnifiedStorage.h"
19+
#include "Arduino_UnifiedStorage.h"
2020

2121
SDStorage unifiedStorage = SDStorage(); // or
2222
//USBStorage unifiedStorage = USBStorage() // or

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name=UnifiedStorage
1+
name=Arduino_UnifiedStorage
22
version=1.0.0
33
author=Arduino
44
maintainer=Arduino <info@arduino.cc>
@@ -7,4 +7,4 @@ paragraph=Adds ability to access different storage mediums
77
category=Storage
88
url=https://arduino.cc
99
architectures=renesas,mbed_portenta
10-
includes=UnifiedStorage.h
10+
includes=Arduino_UnifiedStorage.h

src/UnifiedStorage.h renamed to src/Arduino_UnifiedStorage.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#if defined(ARDUINO_PORTENTA_C33)
1010
#include "Types.h"
1111
#include "Arduino.h"
12-
#include "POSIXStorage.h"
12+
#include "Arduino_POSIXStorage.h"
1313

1414
#endif
1515

@@ -28,7 +28,7 @@
2828
#include "FATFileSystem.h"
2929
#endif
3030

31-
class UnifiedStorage {
31+
class Arduino_UnifiedStorage {
3232
public:
3333
virtual int begin() = 0;
3434

@@ -50,5 +50,7 @@ class UnifiedStorage {
5050
#endif
5151

5252

53+
extern Arduino_UnifiedStorage UnifiedStorage;
54+
5355
#endif
5456

src/InternalStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "UnifiedStorage.h"
1+
#include "Arduino_UnifiedStorage.h"
22

33
InternalStorage::InternalStorage(){
44
#if defined(ARDUINO_PORTENTA_C33)

src/InternalStorage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef InternalStorage_H
44
#define InternalStorage_H
55

6-
#include "UnifiedStorage.h"
6+
#include "Arduino_UnifiedStorage.h"
77

88
class InternalStorage : public UnifiedStorage {
99

src/SDStorage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef SDStorage_H
44
#define SDStorage_H
55

6-
#include "UnifiedStorage.h"
6+
#include "Arduino_UnifiedStorage.h"
77

88
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_C33) || !defined(ARDUINO_OPTA)
99

src/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define PATH_MAX 255
66

77
#include "Arduino.h"
8-
#include "POSIXStorage.h"
8+
#include "Arduino_POSIXStorage.h"
99
#include <iostream>
1010
#include <vector>
1111

src/USBStorage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "UnifiedStorage.h"
1+
#include "Arduino_UnifiedStorage.h"
22

33
#ifndef USBStorage_H
44
#define USBStorage_H

tests/test_qspi_usb_sd/test_c33

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
arduino-cli compile -b arduino:renesas_portenta:portenta_c33 --library "../../POSIXStorage" --library "/home/c.dragomir/ArduinoWorkspace/arduino_UnifiedStorage"
2+
arduino-cli compile -b arduino:renesas_portenta:portenta_c33 --library "../../Arduino_POSIXStorage" --library "/home/c.dragomir/ArduinoWorkspace/Arduino_UnifiedStorage"
33
arduino-cli upload -b arduino:renesas_portenta:portenta_c33

tests/test_qspi_usb_sd/test_h7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
arduino-cli compile -b arduino:mbed_portenta:envie_m7 --library "../../POSIXStorage" --library "/home/c.dragomir/ArduinoWorkspace/arduino_UnifiedStorage"
2+
arduino-cli compile -b arduino:mbed_portenta:envie_m7 --library "../../Arduino_POSIXStorage" --library "/home/c.dragomir/ArduinoWorkspace/Arduino_UnifiedStorage"
33
arduino-cli upload -b arduino:mbed_portenta:envie_m7

tests/test_qspi_usb_sd/test_qspi_usb_sd.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#include "UnifiedStorage.h"
2+
#include "Arduino_UnifiedStorage.h"
33

44
#define HAS_USB 1
55
#define HAS_SD 1

0 commit comments

Comments
 (0)