fix(native-usb): isolate two-pair transport and hand off read status in IRQ

This commit is contained in:
Joey Yakimowich-Payne 2026-09-17 20:24:32 -06:00
commit 9f8678af96
51 changed files with 8159 additions and 815 deletions

View file

@ -0,0 +1,11 @@
#pragma once
#include <cstddef>
#include <cstdint>
#define FLASH_SECTOR_SIZE 4096u
#define FLASH_PAGE_SIZE 256u
#define PICO_FLASH_SIZE_BYTES (2u * 1024u * 1024u)
void flash_range_erase(uint32_t offset, size_t count);
void flash_range_program(uint32_t offset, const uint8_t* data, size_t count);

View file

@ -0,0 +1,6 @@
#pragma once
#include "hardware/flash.h"
#define PICO_FLASH_BANK_TOTAL_SIZE (2u * FLASH_SECTOR_SIZE)
#define PICO_FLASH_BANK_STORAGE_OFFSET (PICO_FLASH_SIZE_BYTES - PICO_FLASH_BANK_TOTAL_SIZE)

View file

@ -0,0 +1,7 @@
#pragma once
#include <cstdint>
constexpr int PICO_OK = 0;
int flash_safe_execute(void (*function)(void*), void* parameter,
uint32_t enter_exit_timeout_ms);

View file

@ -0,0 +1,8 @@
#pragma once
#include "hardware/flash.h"
extern "C" {
extern uint8_t probe_test_flash[PICO_FLASH_SIZE_BYTES];
}
#define XIP_BASE (reinterpret_cast<uintptr_t>(probe_test_flash))