bump to release 0.14.0

This commit is contained in:
cecio
2023-10-17 23:18:25 +02:00
parent d92080cfca
commit 9b92c0b97a
5 changed files with 29 additions and 8 deletions

View File

@@ -163,7 +163,7 @@ I grouped most of the variables you may want to modify in this section ([see Doc
Obviously you can also build your own firmware. To build the *standard* one I used:
- Arduino IDE `2.2.1`
- `Adafruit TinyUSB Library` version `2.2.3`, Board `Raspberry Pi RP2040 (3.6.0)` setting Tools=>CPU Speed at `120MHz` and Tools=>USB Stack to `Adafruit TinyUSB`
- `Adafruit TinyUSB Library` version `2.2.5`, Board `Raspberry Pi RP2040 (3.6.0)` setting Tools=>CPU Speed at `120MHz` and Tools=>USB Stack to `Adafruit TinyUSB`
- `ssd1306` OLED library version `1.8.3`
If you want to re-create a new fake filesystem, you may want to have a look to the `utils` folder, where I placed some utilities to build a new one.

View File

@@ -75,11 +75,13 @@ bool activeState = false;
//
// USBvalve globals
//
#define VERSION "USBvalve - 0.13.1"
#define VERSION "USBvalve - 0.14.0"
boolean readme = false;
boolean autorun = false;
boolean written = false;
boolean deleted = false;
boolean written_reported = false;
boolean deleted_reported = false;
boolean hid_sent = false;
boolean hid_reported = false;
@@ -211,6 +213,12 @@ void loop() {
autorun = false;
}
if (deleted == true && deleted_reported == false) {
oled.print("\n[!] DELETING");
deleted = false;
deleted_reported = true;
}
if (written == true && written_reported == false) {
oled.print("\n[!] WRITING");
written = false;
@@ -275,14 +283,25 @@ int32_t msc_read_callback(uint32_t lba, void* buffer, uint32_t bufsize) {
// This happens only for the "real" size of disk
int32_t msc_write_callback(uint32_t lba, uint8_t* buffer, uint32_t bufsize) {
// Check for file deletion at Block 7
// The first char of filename is replaced with 0xE5, we are going
// to check for it
if (lba == 7) {
if (buffer[32] == 0xE5 || buffer[64] == 0xE5 || buffer[160] == 0xE5) {
deleted = true;
}
}
// This check for writing of space. The LBA > 10 is set to avoid some
// false positives, in particular on Windows Systems
if (lba > 10) {
written = true;
}
// We are declaring a bigger size than what is actually allocated, so
// this is protecting our memory integrity
if (lba < DISK_BLOCK_NUM - 1) {
// Writing buffer to "disk"
uint8_t* addr = msc_disk[lba];
memcpy(addr, buffer, bufsize);
}
@@ -358,10 +377,10 @@ void hexDump(unsigned char* data, size_t size) {
}
// Reset the Pico
void swreset()
{
watchdog_enable(1500, 1);
while(1);
void swreset() {
watchdog_enable(1500, 1);
while (1)
;
}
//

View File

@@ -37,6 +37,8 @@
// README.TXT
// System Volume Information
//
// Files information are saved at Block 7
//
// Keep 11 chars
#define DISK_LABEL 'M', 'y', 'D', 'r', 'i', 'v', 'e', ' ', ' ', ' ', ' '