add:rtc命名规范,默认不启用DFS

This commit is contained in:
Dozingfiretruck 2021-09-03 12:14:13 +08:00
parent 6ea9a4b3b5
commit a38607fcbc
2 changed files with 8 additions and 9 deletions

View File

@ -148,7 +148,7 @@ static rt_err_t rt_rtc_config(void)
return RT_EOK;
}
static rt_err_t at32_rtc_init(void)
static rt_err_t _rtc_init(void)
{
#if defined (SOC_SERIES_AT32F415)
RCC_APB1PeriphClockCmd(RCC_APB1PERIPH_PWR, ENABLE);
@ -173,7 +173,7 @@ static rt_err_t at32_rtc_init(void)
return RT_EOK;
}
static rt_err_t at32_rtc_get_secs(void *args)
static rt_err_t _rtc_get_secs(void *args)
{
*(rt_uint32_t *)args = get_rtc_timestamp();
LOG_D("RTC: get rtc_time %x\n", *(rt_uint32_t *)args);
@ -181,7 +181,7 @@ static rt_err_t at32_rtc_get_secs(void *args)
return RT_EOK;
}
static rt_err_t at32_rtc_set_secs(void *args)
static rt_err_t _rtc_set_secs(void *args)
{
rt_err_t result = RT_EOK;
@ -194,11 +194,11 @@ static rt_err_t at32_rtc_set_secs(void *args)
return result;
}
static const struct rt_rtc_ops at32_rtc_ops =
static const struct rt_rtc_ops _rtc_ops =
{
at32_rtc_init,
at32_rtc_get_secs,
at32_rtc_set_secs,
_rtc_init,
_rtc_get_secs,
_rtc_set_secs,
RT_NULL,
RT_NULL,
RT_NULL,
@ -210,7 +210,7 @@ static rt_rtc_dev_t at32_rtc_dev;
int rt_hw_rtc_init(void)
{
rt_err_t result;
at32_rtc_dev.ops = &at32_rtc_ops;
at32_rtc_dev.ops = &_rtc_ops;
result = rt_hw_rtc_register(&at32_rtc_dev, "rtc", RT_DEVICE_FLAG_RDWR,RT_NULL);
if (result != RT_EOK)
{

View File

@ -172,7 +172,6 @@ menu "On-chip Peripheral Drivers"
bool "Enable SDIO"
default n
select RT_USING_SDIO
select RT_USING_DFS
if BSP_USING_SDIO
config BSP_USING_SDIO1
bool "Enable SDIO1"