drivers/hsmci/hsmci.h
Go to the documentation of this file.
1 
33 /*
34  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
35  */
36 
37 #ifndef HSMCI_H_INCLUDED
38 #define HSMCI_H_INCLUDED
39 
40 #include "compiler.h"
41 #include "sd_mmc_protocol.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
60 void hsmci_init(void);
61 
68 uint8_t hsmci_get_bus_width(uint8_t slot);
69 
75 
84 void hsmci_select_device(uint8_t slot, uint32_t clock, uint8_t bus_width,
85  bool high_speed);
86 
92 void hsmci_deselect_device(uint8_t slot);
93 
97 void hsmci_send_clock(void);
98 
106 bool hsmci_send_cmd(sdmmc_cmd_def_t cmd, uint32_t arg);
107 
112 uint32_t hsmci_get_response(void);
113 
118 void hsmci_get_response_128(uint8_t* response);
119 
135 bool hsmci_adtc_start(sdmmc_cmd_def_t cmd, uint32_t arg, uint16_t block_size,
136  uint16_t nb_block, bool access_block);
137 
145 bool hsmci_adtc_stop(sdmmc_cmd_def_t cmd, uint32_t arg);
146 
153 bool hsmci_read_word(uint32_t* value);
154 
161 bool hsmci_write_word(uint32_t value);
162 
171 bool hsmci_start_read_blocks(void *dest, uint16_t nb_block);
172 
178 
187 bool hsmci_start_write_blocks(const void *src, uint16_t nb_block);
188 
194 
196 
197 #ifdef __cplusplus
198 }
199 #endif
200 
201 #endif /* HSMCI_H_INCLUDED */
bool hsmci_write_word(uint32_t value)
Write a word on the line.
Definition: hsmci.c:581
SD/MMC protocol definitions.
bool hsmci_send_cmd(sdmmc_cmd_def_t cmd, uint32_t arg)
Send a command on the selected slot.
Definition: hsmci.c:414
bool hsmci_wait_end_of_read_blocks(void)
Wait the end of transfer initiated by mci_start_read_blocks()
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:3589
void hsmci_select_device(uint8_t slot, uint32_t clock, uint8_t bus_width, bool high_speed)
Select a slot and initialize it.
Definition: hsmci.c:349
Commonly used includes, types and macros.
bool hsmci_start_write_blocks(const void *src, uint16_t nb_block)
Start a write blocks transfer on the line Note: The driver will use the DMA available to speed up the...
bool hsmci_adtc_stop(sdmmc_cmd_def_t cmd, uint32_t arg)
Send a command to stop an ADTC command on the selected slot.
Definition: hsmci.c:536
bool hsmci_wait_end_of_write_blocks(void)
Wait the end of transfer initiated by mci_start_write_blocks()
uint8_t hsmci_get_bus_width(uint8_t slot)
Return the maximum bus width of a slot.
Definition: hsmci.c:330
void hsmci_init(void)
Initializes the low level driver.
Definition: hsmci.c:302
bool hsmci_start_read_blocks(void *dest, uint16_t nb_block)
Start a read blocks transfer on the line Note: The driver will use the DMA available to speed up the ...
void hsmci_deselect_device(uint8_t slot)
Deselect a slot.
Definition: hsmci.c:394
uint32_t hsmci_get_response(void)
Return the 32 bits response of the last command.
Definition: hsmci.c:436
uint32_t sdmmc_cmd_def_t
Value to define a SD/MMC/SDIO command.
bool hsmci_is_high_speed_capable(void)
Return the high speed capability of the driver.
Definition: hsmci.c:344
void hsmci_get_response_128(uint8_t *response)
Return the 128 bits response of the last command.
Definition: hsmci.c:441
bool hsmci_read_word(uint32_t *value)
Read a word on the line.
Definition: hsmci.c:541
void hsmci_send_clock(void)
Send 74 clock cycles on the line of selected slot Note: It is required after card plug and before car...
Definition: hsmci.c:400
bool hsmci_adtc_start(sdmmc_cmd_def_t cmd, uint32_t arg, uint16_t block_size, uint16_t nb_block, bool access_block)
Send an ADTC command on the selected slot An ADTC (Addressed Data Transfer Commands) command is used ...
Definition: hsmci.c:458


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:04