VSF Documented
sdio_probe.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __HAL_DRIVER_SDIO_PROBE_H__
19#define __HAL_DRIVER_SDIO_PROBE_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "hal/vsf_hal_cfg.h"
24
25#if VSF_HAL_USE_SDIO == ENABLED
26
27#undef public_const
28#if defined(__VSF_SDIO_PROBE_CLASS_IMPLEMENT)
29# undef __VSF_SDIO_PROBE_CLASS_IMPLEMENT
30# define __VSF_CLASS_IMPLEMENT__
31# define public_const
32#else
33# define public_const const
34#endif
35
36#include "utilities/ooc_class.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/*============================ MACROS ========================================*/
43/*============================ MACROFIED FUNCTIONS ===========================*/
44/*============================ TYPES =========================================*/
45
47 public_member(
48 uint32_t voltage;
49 uint32_t working_clock_hz;
50 uint8_t bus_width;
51 bool uhs_en;
52
53 public_const bool high_capacity;
54 public_const uint8_t delay_ms;
55 public_const uint32_t version;
57 public_const uint64_t capacity;
60 )
61 private_member(
63 uint8_t is_app_cmd : 1;
64 uint8_t is_resp_r1 : 1;
65 uint8_t is_to_retry : 1;
66 uint8_t is_to_ignore_fail : 1;
67 uint32_t rca;
68 uint32_t r1_expected_card_status_mask;
69 uint32_t r1_expected_card_status;
70 )
71};
72
73/*============================ GLOBAL VARIABLES ==============================*/
74/*============================ LOCAL VARIABLES ===============================*/
75/*============================ PROTOTYPES ====================================*/
76
91
117 uint32_t resp[4]);
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif /* VSF_HAL_USE_SDIO */
124#endif /* __HAL_DRIVER_SDIO_PROBE_H__ */
vsf_err_t
Definition __type.h:42
vsf_sdio_irq_mask_t
Definition sdio.h:78
vsf_sdio_reqsts_t
Definition sdio.h:85
Definition sdio_probe.h:46
#define vsf_class(__name)
Definition ooc_class.h:48
vsf_err_t vsf_sdio_probe_start(vsf_sdio_t *sdio, vsf_sdio_probe_t *probe)
start sdio probe, SDIO MUST be initialized by calling vsf_sdio_init first.
Definition sdio_probe.c:85
#define public_const
Definition sdio_probe.h:33
vsf_err_t vsf_sdio_probe_irqhandler(vsf_sdio_t *sdio, vsf_sdio_probe_t *probe, vsf_sdio_irq_mask_t irq_mask, vsf_sdio_reqsts_t status, uint32_t resp[4])
called in sdio irqhandler while probing sdio.
Definition sdio_probe.c:117
const i_spi_t vsf_spi_irq_mask_t irq_mask
Definition spi_interface.h:38
unsigned uint32_t
Definition stdint.h:9
unsigned long long uint64_t
Definition stdint.h:11
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_template_sdio.h:528
Definition vsf_template_sdio.h:734
Definition vsf_template_sdio.h:365
uint8_t state
Definition vsf_msg_tree.h:247
uint8_t status
Definition vsf_tgui.h:122