Hardware Abstraction Layer for FreeRTOS
|
Go to the source code of this file.
Macros | |
#define | SD_PRV_ |
#define | SD_ALREDY_INITED 1 |
#define | sd_lock(u, w, e) |
#define | sd_unlock(u, e) |
#define | SD_ADDDEV(ns, p) HAL_ADDDEV(sd, ns, p) |
#define | SD_GET_DEV(index) HAL_GET_DEV(sd, index) |
#define | SD_OPS(ns) |
#define | SD_INIT_DEV(ns) |
#define | SD_INIT(ns, index, s) struct sd *sd_init(uint32_t index, struct sd_setting *s) |
#define | SD_DEINIT(ns, p) int32_t sd_deinit(struct sd *p) |
#define | SD_SET_BLOCK_SIZE(ns, s, bs) int32_t sd_setBlockSize(struct sd *s, enum sd_block_size bs) |
#define | SD_SET_BUS_WIDE(ns, s, bw) int32_t sd_setBusWide(struct sd *s, enum sd_bus_wide bw) |
#define | SD_SET_CLOCK(ns, s, clk) int32_t sd_setClock(struct sd *s, uint64_t clk) |
#define | SD_SEND_COMMAND(ns, s, c, arg, r, w) int32_t sd_sendCommand(struct sd *s, uint32_t c, uint32_t arg, struct sd_response *r, TickType_t w) |
#define | SD_WIRTE(ns, s, c, arg, l, d, w) int32_t sd_write(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d, TickType_t w) |
#define | SD_READ(ns, s, c, arg, l, d, w) int32_t sd_read(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d, TickType_t w) |
#define | SD_SEND_COMMAND_ISR(ns, s, c, arg, r) int32_t sd_sendCommandISR(struct sd *s, uint32_t c, uint32_t arg, struct sd_response *r) |
#define | SD_WIRTE_ISR(ns, s, c, arg, l, d) int32_t sd_writeISR(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d) |
#define | SD_READ_ISR(ns, s, c, arg, l, d) int32_t sd_readISR(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d) |
Enumerations | |
enum | sd_responseLength { SD_NO_RESPONSE, SD_SHORT, SD_LONG } |
Functions | |
int32_t | sd_genericInit (struct sd *sd, struct sd_setting *settings) |
enum sd_responseLength | sd_get_responseLength (struct sd *sd, uint32_t command, uint32_t argument) |
int32_t | sd_check_response (struct sd *sd, uint32_t command, uint32_t argument, struct sd_response *response) |
HAL_DEFINE_GLOBAL_ARRAY (sd) | |
#define SD_ADDDEV | ( | ns, | |
p | |||
) | HAL_ADDDEV(sd, ns, p) |
#define SD_ALREDY_INITED 1 |
#define SD_DEINIT | ( | ns, | |
p | |||
) | int32_t sd_deinit(struct sd *p) |
#define SD_GET_DEV | ( | index | ) | HAL_GET_DEV(sd, index) |
#define SD_INIT | ( | ns, | |
index, | |||
s | |||
) | struct sd *sd_init(uint32_t index, struct sd_setting *s) |
#define SD_INIT_DEV | ( | ns | ) |
#define sd_lock | ( | u, | |
w, | |||
e | |||
) |
#define SD_OPS | ( | ns | ) |
#define SD_PRV_ |
#define SD_READ | ( | ns, | |
s, | |||
c, | |||
arg, | |||
l, | |||
d, | |||
w | |||
) | int32_t sd_read(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d, TickType_t w) |
#define SD_READ_ISR | ( | ns, | |
s, | |||
c, | |||
arg, | |||
l, | |||
d | |||
) | int32_t sd_readISR(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d) |
#define SD_SEND_COMMAND | ( | ns, | |
s, | |||
c, | |||
arg, | |||
r, | |||
w | |||
) | int32_t sd_sendCommand(struct sd *s, uint32_t c, uint32_t arg, struct sd_response *r, TickType_t w) |
#define SD_SEND_COMMAND_ISR | ( | ns, | |
s, | |||
c, | |||
arg, | |||
r | |||
) | int32_t sd_sendCommandISR(struct sd *s, uint32_t c, uint32_t arg, struct sd_response *r) |
#define SD_SET_BLOCK_SIZE | ( | ns, | |
s, | |||
bs | |||
) | int32_t sd_setBlockSize(struct sd *s, enum sd_block_size bs) |
#define SD_SET_BUS_WIDE | ( | ns, | |
s, | |||
bw | |||
) | int32_t sd_setBusWide(struct sd *s, enum sd_bus_wide bw) |
#define SD_SET_CLOCK | ( | ns, | |
s, | |||
clk | |||
) | int32_t sd_setClock(struct sd *s, uint64_t clk) |
#define sd_unlock | ( | u, | |
e | |||
) |
#define SD_WIRTE | ( | ns, | |
s, | |||
c, | |||
arg, | |||
l, | |||
d, | |||
w | |||
) | int32_t sd_write(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d, TickType_t w) |
#define SD_WIRTE_ISR | ( | ns, | |
s, | |||
c, | |||
arg, | |||
l, | |||
d | |||
) | int32_t sd_writeISR(struct sd *s, uint32_t c, uint32_t arg, size_t l, uint32_t *d) |
enum sd_responseLength |
HAL_DEFINE_GLOBAL_ARRAY | ( | sd | ) |
int32_t sd_check_response | ( | struct sd * | sd, |
uint32_t | command, | ||
uint32_t | argument, | ||
struct sd_response * | response | ||
) |
Check SD Response
sd | SD Instance |
command | Command |
argument | Argument |
response | Response form Card |
int32_t sd_genericInit | ( | struct sd * | sd, |
struct sd_setting * | settings | ||
) |
enum sd_responseLength sd_get_responseLength | ( | struct sd * | sd, |
uint32_t | command, | ||
uint32_t | argument | ||
) |
Return size of Response Fild
sd | SD Instance |
command | Command |
argument | Argument |