SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Functions
sys-sdhci.c File Reference
#include <barrier.h>
#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <log.h>
#include <timer.h>
#include <mmu.h>
#include <sys-clk.h>
#include <sys-gpio.h>
#include <mmc/sys-mmc.h>
#include <mmc/sys-sdhci.h>
Include dependency graph for sys-sdhci.c:

Functions

int sunxi_sdhci_set_mclk (sunxi_sdhci_t *sdhci, uint32_t clk_hz)
 Set the SDHC controller's clock frequency.
 
uint32_t sunxi_sdhci_get_mclk (sunxi_sdhci_t *sdhci)
 Get the current clock frequency of the SDHC controller.
 

Function Documentation

◆ sunxi_sdhci_get_mclk()

uint32_t sunxi_sdhci_get_mclk ( sunxi_sdhci_t sdhci)

Get the current clock frequency of the SDHC controller.

This function retrieves the current clock frequency of the specified SDHC controller.

Parameters
sdhciPointer to the SDHC controller structure.
Returns
Current clock frequency in Hertz.

◆ sunxi_sdhci_set_mclk()

int sunxi_sdhci_set_mclk ( sunxi_sdhci_t sdhci,
uint32_t  clk_hz 
)

Set the SDHC controller's clock frequency.

This function sets the clock frequency for the specified SDHC controller.

Parameters
sdhciPointer to the SDHC controller structure.
clk_hzDesired clock frequency in Hertz.
Returns
Returns 0 on success, -1 on failure.