MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / efm_spiSd_speed

Function efm_spiSd_speed

bsp/efm32/drv_sdcard.c:103–120  ·  view source on GitHub ↗

/ * @brief * Set operation speed level * * @details * * @note * * @param[in] level * Set SD speed level ******************************************************************************/

Source from the content-addressed store, hash-verified

101 * Set SD speed level
102 ******************************************************************************/
103static void efm_spiSd_speed(rt_uint8_t level)
104{
105 RT_ASSERT(spi != RT_NULL);
106
107 struct efm32_usart_device_t *usart;
108 rt_uint32_t baudrate;
109
110 usart = (struct efm32_usart_device_t *)(spi->user_data);
111 if (level == SD_SPEED_HIGH)
112 {
113 baudrate = EFM32_SDCLK_HIGH;
114 }
115 else
116 {
117 baudrate = EFM32_SDCLK_LOW;
118 }
119 USART_BaudrateSyncSet(usart->usart_device, 0, baudrate);
120}
121
122/***************************************************************************//**
123 * @brief

Callers 1

rt_spiSd_initFunction · 0.85

Calls 1

USART_BaudrateSyncSetFunction · 0.85

Tested by

no test coverage detected