rp2350: Added flash driver

pull/524/head
Daniele Lacamera 2025-01-27 17:33:45 +01:00
parent 8b9fc5a32a
commit d120000a63
1 changed files with 7 additions and 2 deletions

View File

@ -26,6 +26,9 @@
#include <target.h>
#include "image.h"
#include "printf.h"
#include "hardware/flash.h"
#ifdef TZEN
#include "armv8m_tz.h"
#include "pico/bootrom.h"
@ -221,7 +224,8 @@ void hal_prepare_boot(void)
int RAMFUNCTION hal_flash_write(uint32_t address, const uint8_t *data, int len)
{
return 0; /* on success. */
flash_range_program(address - XIP_BASE, data, len);
return 0;
}
void RAMFUNCTION hal_flash_unlock(void)
@ -234,6 +238,7 @@ void RAMFUNCTION hal_flash_lock(void)
int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
{
return 0; /* on success. */
flash_range_erase(address - XIP_BASE, len);
return 0;
}