Skip to content

Commit 85ee14b

Browse files
committed
Fixup some documentation issues in SDIO_HOST driver
1 parent ea1f164 commit 85ee14b

File tree

7 files changed

+161
-116
lines changed

7 files changed

+161
-116
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/SDIO_HOST/SDIO_HOST.c

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*******************************************************************************/
2424

2525
#include "SDIO_HOST.h"
26+
#include "cy_utils.h"
2627

2728
#if defined(__cplusplus)
2829
extern "C" {
@@ -92,11 +93,22 @@ static void SDIO_RestoreConfig(void);
9293
*
9394
* Callback executed during Deep Sleep entry/exit
9495
*
96+
* \param params
97+
* Pointer to structure that holds callback parameters for this driver.
98+
*
99+
* \param mode
100+
* The state transition mode that is currently happening.
101+
*
95102
* \note
96103
* Saves/Restores SDIO UDB registers
104+
*
105+
* \return
106+
* CY_SYSPM_SUCCESS if the transition was successful, otherwise CY_SYSPM_FAIL
107+
*
97108
*******************************************************************************/
98109
cy_en_syspm_status_t SDIO_DeepSleepCallback(cy_stc_syspm_callback_params_t *params, cy_en_syspm_callback_mode_t mode)
99110
{
111+
CY_UNUSED_PARAMETER(params);
100112
cy_en_syspm_status_t status = CY_SYSPM_FAIL;
101113

102114
switch (mode)
@@ -358,7 +370,7 @@ en_sdio_result_t SDIO_GetResponse(uint8_t bCmdIndexCheck, uint8_t bCmdCrcCheck,
358370
* Configure the data channel for a data transfer. For a write this doesn't start
359371
* the write, that must be done separately after the response is received.
360372
*
361-
* \param stc_sdio_data_config_t
373+
* \param pstcDataConfig
362374
* Data configuration structure. See \ref stc_sdio_data_config_t
363375
*
364376
*
@@ -710,7 +722,6 @@ en_sdio_result_t SDIO_SendCommandAndWait(stc_sdio_cmd_t *pstcCmd)
710722
/*Wait for the command to finish*/
711723
do
712724
{
713-
//TODO: Use RTOS timeout
714725
u32CmdTimeout++;
715726
enRetTmp = SDIO_CheckForEvent(SdCmdEventCmdDone);
716727

@@ -986,7 +997,7 @@ void SDIO_SetBlockSize(uint8_t u8ByteCount)
986997
*
987998
* Sets the number of blocks to send
988999
*
989-
* \param u8ByteCount
1000+
* \param u8BlockCount
9901001
* Size of the block
9911002
*
9921003
*******************************************************************************/
@@ -1300,6 +1311,14 @@ void SDIO_IRQ(void)
13001311
}
13011312

13021313

1314+
/*******************************************************************************
1315+
* Function Name: SDIO_READ_DMA_IRQ
1316+
****************************************************************************//**
1317+
*
1318+
* SDIO DMA Read interrupt, checks counts and toggles to other descriptor if
1319+
* needed
1320+
*
1321+
*******************************************************************************/
13031322
void SDIO_READ_DMA_IRQ(void)
13041323
{
13051324
/*Shouldn't have to change anything unless it is the last descriptor*/
@@ -1362,6 +1381,14 @@ void SDIO_READ_DMA_IRQ(void)
13621381
yCounts--;
13631382
}
13641383

1384+
/*******************************************************************************
1385+
* Function Name: SDIO_WRITE_DMA_IRQ
1386+
****************************************************************************//**
1387+
*
1388+
* SDIO DMA Write interrupt, checks counts and toggles to other descriptor if
1389+
* needed
1390+
*
1391+
*******************************************************************************/
13651392
void SDIO_WRITE_DMA_IRQ(void)
13661393
{
13671394
/*We shouldn't have to change anything unless it is the last descriptor*/
@@ -1423,6 +1450,13 @@ void SDIO_WRITE_DMA_IRQ(void)
14231450
yCounts--;
14241451
}
14251452

1453+
/*******************************************************************************
1454+
* Function Name: SDIO_Free
1455+
****************************************************************************//**
1456+
*
1457+
* Frees any system resources that were allocated by the SDIO driver.
1458+
*
1459+
*******************************************************************************/
14261460
void SDIO_Free(void)
14271461
{
14281462
#ifdef CY_RTOS_AWARE

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/SDIO_HOST/SDIO_HOST.h

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,51 +21,35 @@
2121
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2222
* See the License for the specific language governing permissions and
2323
* limitations under the License.
24-
*******************************************************************************
25-
* \addtogroup group_udb_sdio_changelog
26-
* <table class="doxtable">
27-
* <tr><th>Version</th><th>Changes</th><th>Reason for Change</th></tr>
28-
* <tr>
29-
* <td>1.0</td>
30-
* <td>Initial version</td>
31-
* <td></td>
32-
* </tr>
33-
* </table>
3424
*******************************************************************************/
3525

3626
/**
27+
* \defgroup group_bsp_pin_state Pin States
28+
* \defgroup group_bsp_pins Pin Mappings
29+
* \defgroup group_bsp_macros Macros
30+
* \defgroup group_bsp_functions Functions
31+
*
3732
* \defgroup group_udb_sdio UDB_SDIO
3833
* \{
39-
* SDIO - Secure Digital Input Output Is a standard for communicating with various
34+
* SDIO - Secure Digital Input Output is a standard for communicating with various
4035
external devices such as Wifi and bluetooth devices.
41-
* \{
42-
* \defgroup group_udb_sdio_general_description General Description
43-
* \defgroup group_udb_sdio_changelog Changelog
44-
* \}
45-
* \defgroup group_udb_sdio_API API Reference
46-
* \{
47-
* \defgroup group_udb_sdio_macros Macros
48-
* \defgroup group_udb_sdio_functions Functions
49-
* \defgroup group_udb_sdio_data_structures Data Structures
50-
* \}
51-
*/
52-
53-
/**
54-
* \addtogroup group_udb_sdio_general_description
55-
* \section group_udb_sdio_section_overview Overview
56-
* This driver is currently designed to only support communication with certain
57-
* Broadcom Wifi and Bluetooth chipsets, it is not designed to work with a general
58-
* SDIO card, or even and SD card. Consult TDU#315 for information on limitations
36+
* <p>
37+
* The driver is currently designed to only support communication with certain
38+
* Cypress Wifi and Bluetooth chipsets, it is not designed to work with a general
39+
* SDIO card, or even and SD card. It is only intended to be used by the WiFi
40+
* driver for communication.
41+
* <p>
42+
* This is not intended to be used as a general purpose API.
5943
*
6044
* \section group_udb_sdio_section_configuration_considerations Configuration Considerations
6145
* Features:
6246
* * Always Four Wire Mode
6347
* * Supports Card Interrupt
6448
* * Uses DMA for command and data transfer
65-
**
66-
* \section group_udb_sdio_section_more_information More Information
6749
*
68-
* \} group_udb_sdio_general_description
50+
* \defgroup group_udb_sdio_macros Macros
51+
* \defgroup group_udb_sdio_functions Functions
52+
* \defgroup group_udb_sdio_data_structures Data Structures
6953
*/
7054

7155
#if !defined(CY_SDIO_H)
@@ -258,8 +242,6 @@ typedef struct stc_sdio_cmd
258242
* \{
259243
*/
260244

261-
/** \cond INTERNAL */
262-
263245
/* Main functions*/
264246
void SDIO_Init(stc_sdio_irq_cb_t* pfuCb);
265247
en_sdio_result_t SDIO_SendCommandAndWait(stc_sdio_cmd_t *pstcCmd);
@@ -281,7 +263,6 @@ en_sdio_result_t SDIO_CheckForEvent(en_sdio_event_t enEventType);
281263
uint8_t SDIO_CalculateCrc7(uint8_t* pu8Data, uint8_t pu8Size);
282264
void SDIO_SetBlockSize(uint8_t u8ByteCount);
283265
void SDIO_SetNumBlocks(uint8_t u8BlockCount);
284-
en_sdio_result_t SDIO_CheckReadCRC(void);
285266

286267
/*DMA setup function*/
287268
void SDIO_SetupDMA(void);

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW943012P6EVB_01/SDIO_HOST/SDIO_HOST.c

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*******************************************************************************/
2424

2525
#include "SDIO_HOST.h"
26+
#include "cy_utils.h"
2627

2728
#if defined(__cplusplus)
2829
extern "C" {
@@ -92,11 +93,22 @@ static void SDIO_RestoreConfig(void);
9293
*
9394
* Callback executed during Deep Sleep entry/exit
9495
*
96+
* \param params
97+
* Pointer to structure that holds callback parameters for this driver.
98+
*
99+
* \param mode
100+
* The state transition mode that is currently happening.
101+
*
95102
* \note
96103
* Saves/Restores SDIO UDB registers
104+
*
105+
* \return
106+
* CY_SYSPM_SUCCESS if the transition was successful, otherwise CY_SYSPM_FAIL
107+
*
97108
*******************************************************************************/
98109
cy_en_syspm_status_t SDIO_DeepSleepCallback(cy_stc_syspm_callback_params_t *params, cy_en_syspm_callback_mode_t mode)
99110
{
111+
CY_UNUSED_PARAMETER(params);
100112
cy_en_syspm_status_t status = CY_SYSPM_FAIL;
101113

102114
switch (mode)
@@ -358,7 +370,7 @@ en_sdio_result_t SDIO_GetResponse(uint8_t bCmdIndexCheck, uint8_t bCmdCrcCheck,
358370
* Configure the data channel for a data transfer. For a write this doesn't start
359371
* the write, that must be done separately after the response is received.
360372
*
361-
* \param stc_sdio_data_config_t
373+
* \param pstcDataConfig
362374
* Data configuration structure. See \ref stc_sdio_data_config_t
363375
*
364376
*
@@ -710,7 +722,6 @@ en_sdio_result_t SDIO_SendCommandAndWait(stc_sdio_cmd_t *pstcCmd)
710722
/*Wait for the command to finish*/
711723
do
712724
{
713-
//TODO: Use RTOS timeout
714725
u32CmdTimeout++;
715726
enRetTmp = SDIO_CheckForEvent(SdCmdEventCmdDone);
716727

@@ -986,7 +997,7 @@ void SDIO_SetBlockSize(uint8_t u8ByteCount)
986997
*
987998
* Sets the number of blocks to send
988999
*
989-
* \param u8ByteCount
1000+
* \param u8BlockCount
9901001
* Size of the block
9911002
*
9921003
*******************************************************************************/
@@ -1300,6 +1311,14 @@ void SDIO_IRQ(void)
13001311
}
13011312

13021313

1314+
/*******************************************************************************
1315+
* Function Name: SDIO_READ_DMA_IRQ
1316+
****************************************************************************//**
1317+
*
1318+
* SDIO DMA Read interrupt, checks counts and toggles to other descriptor if
1319+
* needed
1320+
*
1321+
*******************************************************************************/
13031322
void SDIO_READ_DMA_IRQ(void)
13041323
{
13051324
/*Shouldn't have to change anything unless it is the last descriptor*/
@@ -1362,6 +1381,14 @@ void SDIO_READ_DMA_IRQ(void)
13621381
yCounts--;
13631382
}
13641383

1384+
/*******************************************************************************
1385+
* Function Name: SDIO_WRITE_DMA_IRQ
1386+
****************************************************************************//**
1387+
*
1388+
* SDIO DMA Write interrupt, checks counts and toggles to other descriptor if
1389+
* needed
1390+
*
1391+
*******************************************************************************/
13651392
void SDIO_WRITE_DMA_IRQ(void)
13661393
{
13671394
/*We shouldn't have to change anything unless it is the last descriptor*/
@@ -1423,6 +1450,13 @@ void SDIO_WRITE_DMA_IRQ(void)
14231450
yCounts--;
14241451
}
14251452

1453+
/*******************************************************************************
1454+
* Function Name: SDIO_Free
1455+
****************************************************************************//**
1456+
*
1457+
* Frees any system resources that were allocated by the SDIO driver.
1458+
*
1459+
*******************************************************************************/
14261460
void SDIO_Free(void)
14271461
{
14281462
#ifdef CY_RTOS_AWARE

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW943012P6EVB_01/SDIO_HOST/SDIO_HOST.h

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,51 +21,35 @@
2121
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2222
* See the License for the specific language governing permissions and
2323
* limitations under the License.
24-
*******************************************************************************
25-
* \addtogroup group_udb_sdio_changelog
26-
* <table class="doxtable">
27-
* <tr><th>Version</th><th>Changes</th><th>Reason for Change</th></tr>
28-
* <tr>
29-
* <td>1.0</td>
30-
* <td>Initial version</td>
31-
* <td></td>
32-
* </tr>
33-
* </table>
3424
*******************************************************************************/
3525

3626
/**
27+
* \defgroup group_bsp_pin_state Pin States
28+
* \defgroup group_bsp_pins Pin Mappings
29+
* \defgroup group_bsp_macros Macros
30+
* \defgroup group_bsp_functions Functions
31+
*
3732
* \defgroup group_udb_sdio UDB_SDIO
3833
* \{
39-
* SDIO - Secure Digital Input Output Is a standard for communicating with various
34+
* SDIO - Secure Digital Input Output is a standard for communicating with various
4035
external devices such as Wifi and bluetooth devices.
41-
* \{
42-
* \defgroup group_udb_sdio_general_description General Description
43-
* \defgroup group_udb_sdio_changelog Changelog
44-
* \}
45-
* \defgroup group_udb_sdio_API API Reference
46-
* \{
47-
* \defgroup group_udb_sdio_macros Macros
48-
* \defgroup group_udb_sdio_functions Functions
49-
* \defgroup group_udb_sdio_data_structures Data Structures
50-
* \}
51-
*/
52-
53-
/**
54-
* \addtogroup group_udb_sdio_general_description
55-
* \section group_udb_sdio_section_overview Overview
56-
* This driver is currently designed to only support communication with certain
57-
* Broadcom Wifi and Bluetooth chipsets, it is not designed to work with a general
58-
* SDIO card, or even and SD card. Consult TDU#315 for information on limitations
36+
* <p>
37+
* The driver is currently designed to only support communication with certain
38+
* Cypress Wifi and Bluetooth chipsets, it is not designed to work with a general
39+
* SDIO card, or even and SD card. It is only intended to be used by the WiFi
40+
* driver for communication.
41+
* <p>
42+
* This is not intended to be used as a general purpose API.
5943
*
6044
* \section group_udb_sdio_section_configuration_considerations Configuration Considerations
6145
* Features:
6246
* * Always Four Wire Mode
6347
* * Supports Card Interrupt
6448
* * Uses DMA for command and data transfer
65-
**
66-
* \section group_udb_sdio_section_more_information More Information
6749
*
68-
* \} group_udb_sdio_general_description
50+
* \defgroup group_udb_sdio_macros Macros
51+
* \defgroup group_udb_sdio_functions Functions
52+
* \defgroup group_udb_sdio_data_structures Data Structures
6953
*/
7054

7155
#if !defined(CY_SDIO_H)
@@ -258,8 +242,6 @@ typedef struct stc_sdio_cmd
258242
* \{
259243
*/
260244

261-
/** \cond INTERNAL */
262-
263245
/* Main functions*/
264246
void SDIO_Init(stc_sdio_irq_cb_t* pfuCb);
265247
en_sdio_result_t SDIO_SendCommandAndWait(stc_sdio_cmd_t *pstcCmd);
@@ -281,7 +263,6 @@ en_sdio_result_t SDIO_CheckForEvent(en_sdio_event_t enEventType);
281263
uint8_t SDIO_CalculateCrc7(uint8_t* pu8Data, uint8_t pu8Size);
282264
void SDIO_SetBlockSize(uint8_t u8ByteCount);
283265
void SDIO_SetNumBlocks(uint8_t u8BlockCount);
284-
en_sdio_result_t SDIO_CheckReadCRC(void);
285266

286267
/*DMA setup function*/
287268
void SDIO_SetupDMA(void);

0 commit comments

Comments
 (0)