sd_mmc_mem.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 _SD_MMC_MEM_H_
38 #define _SD_MMC_MEM_H_
39 
54 #include "conf_access.h"
55 #include "ctrl_access.h"
56 
57 #if (SD_MMC_0_MEM == ENABLE) || (SD_MMC_1_MEM == ENABLE)
58 
61 
75 extern Ctrl_status sd_mmc_test_unit_ready(uint8_t slot);
80 
88 extern Ctrl_status sd_mmc_read_capacity(uint8_t slot,uint32_t *u32_nb_sector);
90 extern Ctrl_status sd_mmc_read_capacity_0(uint32_t *u32_nb_sector);
92 extern Ctrl_status sd_mmc_read_capacity_1(uint32_t *u32_nb_sector);
93 
104 extern bool sd_mmc_unload(uint8_t slot, bool unload);
106 extern bool sd_mmc_unload_0(bool unload);
108 extern bool sd_mmc_unload_1(bool unload);
109 
118 extern bool sd_mmc_wr_protect(uint8_t slot);
120 extern bool sd_mmc_wr_protect_0(void);
122 extern bool sd_mmc_wr_protect_1(void);
123 
129 extern bool sd_mmc_removal(uint8_t slot);
131 extern bool sd_mmc_removal_0(void);
133 extern bool sd_mmc_removal_1(void);
134 
136 
137 
138 #if ACCESS_USB == true
139 
142 
152 extern Ctrl_status sd_mmc_usb_read_10(uint8_t slot,uint32_t addr, uint16_t nb_sector);
154 extern Ctrl_status sd_mmc_usb_read_10_0(uint32_t addr, uint16_t nb_sector);
156 extern Ctrl_status sd_mmc_usb_read_10_1(uint32_t addr, uint16_t nb_sector);
157 
166 extern Ctrl_status sd_mmc_usb_write_10(uint8_t slot,uint32_t addr, uint16_t nb_sector);
168 extern Ctrl_status sd_mmc_usb_write_10_0(uint32_t addr, uint16_t nb_sector);
170 extern Ctrl_status sd_mmc_usb_write_10_1(uint32_t addr, uint16_t nb_sector);
171 
173 
174 #endif
175 
176 
177 #if ACCESS_MEM_TO_RAM == true
178 
181 
191 extern Ctrl_status sd_mmc_mem_2_ram(uint8_t slot, uint32_t addr, void *ram);
193 extern Ctrl_status sd_mmc_mem_2_ram_0(uint32_t addr, void *ram);
195 extern Ctrl_status sd_mmc_mem_2_ram_1(uint32_t addr, void *ram);
196 
205 extern Ctrl_status sd_mmc_ram_2_mem(uint8_t slot, uint32_t addr, const void *ram);
207 extern Ctrl_status sd_mmc_ram_2_mem_0(uint32_t addr, const void *ram);
209 extern Ctrl_status sd_mmc_ram_2_mem_1(uint32_t addr, const void *ram);
210 
212 
213 #endif
214 #endif
215 
217 
218 #endif // _SD_MMC_MEM_H_
Ctrl_status sd_mmc_usb_write_10_0(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_write_10 Slot O.
Definition: sd_mmc_mem.c:279
bool sd_mmc_wr_protect_0(void)
Instance Declaration for sd_mmc_wr_protect Slot O.
Definition: sd_mmc_mem.c:133
bool sd_mmc_removal(uint8_t slot)
Tells whether the memory is removable.
Definition: sd_mmc_mem.c:143
Ctrl_status sd_mmc_usb_read_10(uint8_t slot, uint32_t addr, uint16_t nb_sector)
Transfers data from the memory to USB.
Definition: sd_mmc_mem.c:174
Ctrl_status sd_mmc_test_unit_ready_1(void)
Instance Declaration for sd_mmc_test_unit_ready Slot 1.
Definition: sd_mmc_mem.c:90
bool sd_mmc_removal_0(void)
Instance Declaration for sd_mmc_removal Slot O.
Definition: sd_mmc_mem.c:149
bool sd_mmc_wr_protect(uint8_t slot)
Returns the write-protection state of the memory.
Definition: sd_mmc_mem.c:128
Ctrl_status sd_mmc_test_unit_ready_0(void)
Instance Declaration for sd_mmc_test_unit_ready Slot O.
Definition: sd_mmc_mem.c:84
Ctrl_status sd_mmc_mem_2_ram_1(uint32_t addr, void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot 1.
Definition: sd_mmc_mem.c:321
Ctrl_status sd_mmc_read_capacity_0(uint32_t *u32_nb_sector)
Instance Declaration for sd_mmc_read_capacity Slot O.
Definition: sd_mmc_mem.c:102
bool sd_mmc_unload(uint8_t slot, bool unload)
Unload/Load the SD/MMC card selected.
Definition: sd_mmc_mem.c:112
Ctrl_status sd_mmc_test_unit_ready(uint8_t slot)
Tests the memory state and initializes the memory if required.
Definition: sd_mmc_mem.c:58
bool sd_mmc_unload_1(bool unload)
Instance Declaration for sd_mmc_unload Slot 1.
Definition: sd_mmc_mem.c:123
Ctrl_status sd_mmc_ram_2_mem(uint8_t slot, uint32_t addr, const void *ram)
Copies 1 data sector from RAM to the memory.
Definition: sd_mmc_mem.c:326
Ctrl_status sd_mmc_usb_write_10(uint8_t slot, uint32_t addr, uint16_t nb_sector)
Transfers data from USB to the memory.
Definition: sd_mmc_mem.c:232
Ctrl_status sd_mmc_mem_2_ram_0(uint32_t addr, void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot O.
Definition: sd_mmc_mem.c:316
Ctrl_status sd_mmc_read_capacity(uint8_t slot, uint32_t *u32_nb_sector)
Returns the address of the last valid sector in the memory.
Definition: sd_mmc_mem.c:95
Ctrl_status sd_mmc_read_capacity_1(uint32_t *u32_nb_sector)
Instance Declaration for sd_mmc_read_capacity Slot 1.
Definition: sd_mmc_mem.c:107
Ctrl_status
Status returned by CTRL_ACCESS interfaces.
Definition: ctrl_access.h:74
bool sd_mmc_removal_1(void)
Instance Declaration for sd_mmc_removal Slot 1.
Definition: sd_mmc_mem.c:154
Ctrl_status sd_mmc_usb_read_10_1(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_read_10 Slot 1.
Definition: sd_mmc_mem.c:227
Ctrl_status sd_mmc_usb_read_10_0(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_read_10 Slot O.
Definition: sd_mmc_mem.c:222
bool sd_mmc_unload_0(bool unload)
Instance Declaration for sd_mmc_unload Slot O.
Definition: sd_mmc_mem.c:118
bool sd_mmc_wr_protect_1(void)
Instance Declaration for sd_mmc_wr_protect Slot 1.
Definition: sd_mmc_mem.c:138
Ctrl_status sd_mmc_ram_2_mem_1(uint32_t addr, const void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot 1.
Definition: sd_mmc_mem.c:350
Ctrl_status sd_mmc_mem_2_ram(uint8_t slot, uint32_t addr, void *ram)
Copies 1 data sector from the memory to RAM.
Definition: sd_mmc_mem.c:297
Ctrl_status sd_mmc_usb_write_10_1(uint32_t addr, uint16_t nb_sector)
Instance Declaration for sd_mmc_usb_write_10 Slot 1.
Definition: sd_mmc_mem.c:284
Ctrl_status sd_mmc_ram_2_mem_0(uint32_t addr, const void *ram)
Instance Declaration for sd_mmc_mem_2_ram Slot O.
Definition: sd_mmc_mem.c:345


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:58