[bsp][stm32][f469-disco]Change some API's name
Signed-off-by: Willian Chan <chentingwei@rt-thread.com>
This commit is contained in:
parent
33febada5c
commit
14c5926ff7
|
@ -26,7 +26,7 @@
|
||||||
/* SD Card hot plug detection pin */
|
/* SD Card hot plug detection pin */
|
||||||
#define SD_CHECK_PIN GET_PIN(G, 2)
|
#define SD_CHECK_PIN GET_PIN(G, 2)
|
||||||
|
|
||||||
void __mount(void)
|
void _sdcard_mount(void)
|
||||||
{
|
{
|
||||||
rt_device_t device;
|
rt_device_t device;
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ void __mount(void)
|
||||||
mmcsd_wait_cd_changed(RT_WAITING_FOREVER);
|
mmcsd_wait_cd_changed(RT_WAITING_FOREVER);
|
||||||
device = rt_device_find("sd0");
|
device = rt_device_find("sd0");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device != RT_NULL)
|
if (device != RT_NULL)
|
||||||
{
|
{
|
||||||
if (dfs_mount("sd0", "/", "elm", 0, 0) == RT_EOK)
|
if (dfs_mount("sd0", "/", "elm", 0, 0) == RT_EOK)
|
||||||
|
@ -52,7 +51,7 @@ void __mount(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __unmount(void)
|
void _sdcard_unmount(void)
|
||||||
{
|
{
|
||||||
rt_thread_mdelay(200);
|
rt_thread_mdelay(200);
|
||||||
dfs_unmount("/");
|
dfs_unmount("/");
|
||||||
|
@ -61,7 +60,6 @@ void __unmount(void)
|
||||||
mmcsd_wait_cd_changed(0);
|
mmcsd_wait_cd_changed(0);
|
||||||
stm32_mmcsd_change();
|
stm32_mmcsd_change();
|
||||||
mmcsd_wait_cd_changed(RT_WAITING_FOREVER);
|
mmcsd_wait_cd_changed(RT_WAITING_FOREVER);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sd_mount(void *parameter)
|
void sd_mount(void *parameter)
|
||||||
|
@ -73,11 +71,11 @@ void sd_mount(void *parameter)
|
||||||
rt_thread_mdelay(200);
|
rt_thread_mdelay(200);
|
||||||
if(re_sd_check && !rt_pin_read(SD_CHECK_PIN))
|
if(re_sd_check && !rt_pin_read(SD_CHECK_PIN))
|
||||||
{
|
{
|
||||||
__mount();
|
_sdcard_mount();
|
||||||
}
|
}
|
||||||
if (!re_sd_check && rt_pin_read(SD_CHECK_PIN))
|
if (!re_sd_check && rt_pin_read(SD_CHECK_PIN))
|
||||||
{
|
{
|
||||||
__unmount();
|
_sdcard_unmount();
|
||||||
}
|
}
|
||||||
re_sd_check = rt_pin_read(SD_CHECK_PIN);
|
re_sd_check = rt_pin_read(SD_CHECK_PIN);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue