From aa431f4c1029cb75e70368b83b8af2803a186b35 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 7 Mar 2015 14:29:17 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7731 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/templates/sdc_lld.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'os/hal/templates/sdc_lld.h') 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 @@ -49,15 +49,6 @@ /* Driver data structures and types. */ /*===========================================================================*/ -/** - * @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. */ @@ -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); -- cgit v1.2.3