aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/templates')
-rw-r--r--os/hal/templates/sdc_lld.c3
-rw-r--r--os/hal/templates/sdc_lld.h22
2 files changed, 12 insertions, 13 deletions
diff --git a/os/hal/templates/sdc_lld.c b/os/hal/templates/sdc_lld.c
index dfc59b4b3..10ca534cd 100644
--- a/os/hal/templates/sdc_lld.c
+++ b/os/hal/templates/sdc_lld.c
@@ -114,9 +114,10 @@ void sdc_lld_start_clk(SDCDriver *sdcp) {
*
* @notapi
*/
-void sdc_lld_set_data_clk(SDCDriver *sdcp) {
+void sdc_lld_set_data_clk(SDCDriver *sdcp, sdcbusclk_t clk) {
(void)sdcp;
+ (void)clk;
}
/**
diff --git a/os/hal/templates/sdc_lld.h b/os/hal/templates/sdc_lld.h
index 4828149d2..8378750a1 100644
--- a/os/hal/templates/sdc_lld.h
+++ b/os/hal/templates/sdc_lld.h
@@ -50,15 +50,6 @@
/*===========================================================================*/
/**
- * @brief Type of SDIO bus mode.
- */
-typedef enum {
- SDC_MODE_1BIT = 0,
- SDC_MODE_4BIT,
- SDC_MODE_8BIT
-} sdcbusmode_t;
-
-/**
* @brief Type of card flags.
*/
typedef uint32_t sdcmode_t;
@@ -86,6 +77,11 @@ typedef struct {
* afterward it can be reused for other purposes.
*/
uint8_t *scratchpad;
+ /**
+ * @brief Bus width.
+ */
+ sdcbusmode_t bus_width;
+ /* End of the mandatory fields.*/
} SDCConfig;
/**
@@ -150,7 +146,7 @@ extern "C" {
void sdc_lld_start(SDCDriver *sdcp);
void sdc_lld_stop(SDCDriver *sdcp);
void sdc_lld_start_clk(SDCDriver *sdcp);
- void sdc_lld_set_data_clk(SDCDriver *sdcp);
+ void sdc_lld_set_data_clk(SDCDriver *sdcp, sdcbusclk_t clk);
void sdc_lld_stop_clk(SDCDriver *sdcp);
void sdc_lld_set_bus_mode(SDCDriver *sdcp, sdcbusmode_t mode);
void sdc_lld_send_cmd_none(SDCDriver *sdcp, uint8_t cmd, uint32_t arg);
@@ -160,10 +156,12 @@ extern "C" {
uint32_t *resp);
bool sdc_lld_send_cmd_long_crc(SDCDriver *sdcp, uint8_t cmd, uint32_t arg,
uint32_t *resp);
+ bool sdc_lld_read_special(SDCDriver *sdcp, uint8_t *buf, size_t bytes,
+ uint8_t cmd, uint32_t argument);
bool sdc_lld_read(SDCDriver *sdcp, uint32_t startblk,
- uint8_t *buf, uint32_t n);
+ uint8_t *buf, uint32_t blocks);
bool sdc_lld_write(SDCDriver *sdcp, uint32_t startblk,
- const uint8_t *buf, uint32_t n);
+ const uint8_t *buf, uint32_t blocks);
bool sdc_lld_sync(SDCDriver *sdcp);
bool sdc_lld_is_card_inserted(SDCDriver *sdcp);
bool sdc_lld_is_write_protected(SDCDriver *sdcp);