ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
board_periph_sd.h
Go to the documentation of this file.
1
22#pragma once
23
24#include <stdint.h>
25
43bool board_sd_attach(const char* path);
44
58bool board_sd_attached(void);
59
80bool board_sd_attach_blank(uint32_t total_sectors, uint8_t fat_bits, const char* label);
81
97bool board_sd_save(const char* path);
98
114void board_sd_info(bool* attached, uint64_t* bytes, uint8_t* fat_bits, const char** label);
115
132uint8_t board_sd_exchange(uint8_t tx);
133
156bool board_sd_read_block(uint32_t lba, uint8_t* dst);
157
183bool board_sd_write_block(uint32_t lba, const uint8_t* src);
184
199void board_sd_reset(void);
bool board_sd_save(const char *path)
Transactionally publish the current SD-card image to a file.
bool board_sd_attached(void)
Report whether an SD-card image is currently attached.
bool board_sd_read_block(uint32_t lba, uint8_t *dst)
Copy one 512-byte block straight out of the backing image.
bool board_sd_attach(const char *path)
Attach an SD-card image from a host file.
uint8_t board_sd_exchange(uint8_t tx)
Exchange one full-duplex SPI byte with the modelled card.
bool board_sd_attach_blank(uint32_t total_sectors, uint8_t fat_bits, const char *label)
Create a blank, FAT-formatted sparse SD card and attach it.
bool board_sd_write_block(uint32_t lba, const uint8_t *src)
Copy one 512-byte block straight into the backing image.
void board_sd_info(bool *attached, uint64_t *bytes, uint8_t *fat_bits, const char **label)
Read back the attached card's summary (for the status view / report).
void board_sd_reset(void)
Reset the card's command / response framing to power-on.