microsd 2.1.0.0
microSD Click Driver

API for configuring and manipulating microSD Click driver. More...

Topics

 microSD Registers Settings
 Settings for registers of microSD Click driver.
 
 microSD MikroBUS Map
 MikroBUS pin mapping of microSD Click driver.
 

Functions

void microsd_cfg_setup (microsd_cfg_t *cfg)
 microSD configuration object setup function.
 
err_t microsd_init (microsd_t *ctx, microsd_cfg_t *cfg)
 microSD initialization function.
 
uint8_t microsd_get_card_detect (microsd_t *ctx)
 microSD get card detect function.
 

Detailed Description

API for configuring and manipulating microSD Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ microsd_cfg_setup()

void microsd_cfg_setup ( microsd_cfg_t * cfg)

microSD configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See microsd_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ microsd_get_card_detect()

uint8_t microsd_get_card_detect ( microsd_t * ctx)

microSD get card detect function.

This function returns the card detect pin logic state.

Parameters
[in]ctx: Click context object. See microsd_t object definition for detailed explanation.
Returns
  • 0 - Card detected,
  • 1 - Card not detected.
Note
None.

◆ microsd_init()

err_t microsd_init ( microsd_t * ctx,
microsd_cfg_t * cfg )

microSD initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See microsd_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See microsd_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.