CardSight
0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
cid.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
6
7
#ifndef CARDSIGHT_MMC_CID_H
8
#define CARDSIGHT_MMC_CID_H
9
10
#include <stdint.h>
11
15
struct
mmc_cid_identity
{
16
uint8_t
manufacturer_id
;
17
char
oem_id
[3];
18
char
product_name
[6];
19
uint8_t
product_revision_major
;
20
uint8_t
product_revision_minor
;
21
uint32_t
serial_number
;
22
uint16_t
manufacture_year
;
23
uint8_t
manufacture_month
;
24
};
25
32
void
mmc_decode_cid
(
const
uint8_t cid[16],
struct
mmc_cid_identity
*identity);
33
34
#endif
/* CARDSIGHT_MMC_CID_H */
mmc_decode_cid
void mmc_decode_cid(const uint8_t cid[16], struct mmc_cid_identity *identity)
Decode a raw CID register into identity fields.
mmc_cid_identity
Friendly fields decoded from the card identification register.
Definition
cid.h:15
mmc_cid_identity::manufacture_year
uint16_t manufacture_year
Definition
cid.h:22
mmc_cid_identity::product_revision_minor
uint8_t product_revision_minor
Definition
cid.h:20
mmc_cid_identity::product_revision_major
uint8_t product_revision_major
Definition
cid.h:19
mmc_cid_identity::oem_id
char oem_id[3]
Definition
cid.h:17
mmc_cid_identity::manufacturer_id
uint8_t manufacturer_id
Definition
cid.h:16
mmc_cid_identity::manufacture_month
uint8_t manufacture_month
Definition
cid.h:23
mmc_cid_identity::product_name
char product_name[6]
Definition
cid.h:18
mmc_cid_identity::serial_number
uint32_t serial_number
Definition
cid.h:21
software
include
hal
mmc
cid.h
Generated by
1.15.0