SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
sys-sdcard.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+ */
2
3#ifndef _SYS_SDCARD_H_
4#define _SYS_SDCARD_H_
5
6#include <io.h>
7#include <stdarg.h>
8#include <stdbool.h>
9#include <stddef.h>
10#include <stdint.h>
11#include <types.h>
12
13#include "sys-mmc.h"
14#include "sys-sdhci.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif// __cplusplus
19
20typedef struct {
22 bool online;
24
28extern sdmmc_pdata_t card0;
29extern sdmmc_pdata_t card2;
30
45
61
77
78#ifdef __cplusplus
79}
80#endif// __cplusplus
81
82#endif// _SYS_SDCARD_H_
u32_t uint32_t
Definition stdint.h:13
u8_t uint8_t
Definition stdint.h:7
int sdmmc_init(sdmmc_pdata_t *data, sunxi_sdhci_t *hci)
Initialize the SD/MMC interface.
Definition sys-sdcard.c:34
sdmmc_pdata_t card0
External declaration of the 'card0' SDMMC platform data structure.
Definition sys-sdcard.c:19
uint32_t sdmmc_blk_write(sdmmc_pdata_t *data, uint8_t *buf, uint32_t blkno, uint32_t blkcnt)
Writes blocks of data to the SD/MMC device using the specified SDHCI instance.
Definition sys-sdcard.c:80
sdmmc_pdata_t card2
uint32_t sdmmc_blk_read(sdmmc_pdata_t *data, uint8_t *buf, uint32_t blkno, uint32_t blkcnt)
Read blocks from the SD/MMC device.
Definition sys-sdcard.c:62
Definition sys-sdcard.h:20
sunxi_sdhci_t * hci
Definition sys-sdcard.h:21
bool online
Definition sys-sdcard.h:22
Definition sys-sdhci.h:104