CardSight 0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
card.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
9
10#ifndef CARDSIGHT_MMC_CARD_H
11#define CARDSIGHT_MMC_CARD_H
12
13#include <stdbool.h>
14#include <stdint.h>
15#include <hal/device.h>
16#include <hal/mmc/cid.h>
17
18struct mmc_host;
19
26 uint32_t sectors;
27 uint32_t clock;
30 uint8_t cid[16];
32 uint16_t rca;
33 bool s18a;
34 uint16_t sw_groups[6];
35 uint16_t max_current;
36 const char *mode;
37 bool tuned;
38};
39
43struct mmc_card {
44 struct device dev;
45 struct mmc_host *host;
47 bool ready;
48};
49
50#endif /* CARDSIGHT_MMC_CARD_H */
The card identification register, decoded.
The tiny device model the mmc card and the block layer need: a name and a reference count.
Reference-counted object shared between the driver and its users.
Definition device.h:21
What the host found out about the card.
Definition card.h:25
const char * mode
Definition card.h:36
uint32_t sectors
Definition card.h:26
struct mmc_cid_identity identity
Definition card.h:31
uint16_t sw_groups[6]
Definition card.h:34
bool high_capacity
Definition card.h:29
int bus_width
Definition card.h:28
bool s18a
Definition card.h:33
uint16_t max_current
Definition card.h:35
bool tuned
Definition card.h:37
uint16_t rca
Definition card.h:32
uint8_t cid[16]
Definition card.h:30
uint32_t clock
Definition card.h:27
A card known to the mmc core.
Definition card.h:43
bool ready
Definition card.h:47
struct device dev
Definition card.h:44
struct mmc_card_info info
Definition card.h:46
struct mmc_host * host
Definition card.h:45
Friendly fields decoded from the card identification register.
Definition cid.h:15