37#include "boards/pico_ice.h"
41#define ICE_SRAM_STATUS_BUSY_MASK 0x01
45#define ICE_SRAM_TRANSFER_SIZE 32
84void ice_sram_write_async(uint32_t addr,
const uint8_t *data,
size_t data_size,
void (*callback)(
volatile void *),
void *context);
106void ice_sram_read_async(uint32_t addr, uint8_t *data,
size_t data_size,
void (*callback)(
volatile void *),
void *context);
void ice_sram_get_id(uint8_t id[8])
Obtain the chip ID from the SRAM chip.
void ice_sram_write_async(uint32_t addr, const uint8_t *data, size_t data_size, void(*callback)(volatile void *), void *context)
Calling this function when any SPI transfer is in progress on this bus waits for it then starts.
void ice_sram_read_async(uint32_t addr, uint8_t *data, size_t data_size, void(*callback)(volatile void *), void *context)
Read a buffer from the flash chip in the background, with a callback called once done.
void ice_sram_read_blocking(uint32_t addr, uint8_t *data, size_t data_size)
Read a buffer from the flash chip and wait until completion.
void ice_sram_reset(void)
Send a reset command to the SRAM chipo.
void ice_sram_init(void)
Send an initialization command to the SRAM chip.
void ice_sram_write_blocking(uint32_t addr, const uint8_t *data, size_t data_size)
Write a buffer to the flash chip and wait until completion.