Skip to content

Instantly share code, notes, and snippets.

@aaronjamt
aaronjamt / rp2040_persistent_flash_storage.c
Last active January 12, 2025 10:19
RP2040 persistent storage using flash memory (Arduino)
#include "hardware/flash.h"
// The two primary functions that you would use are:
// bool read(uint8_t *output, uint8_t size);
// void write(uint8_t *data, uint8_t size);
// The read(...) function will either fill the *output buffer
// with size bytes (and return true), or will return false if
// there is no saved data available to be read.