4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-28 15:55:28 +08:00

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@497 bbd45198-f89e-11dd-88c7-29a3b14d5316

This commit is contained in:
wuyangyong 2010-03-17 02:49:00 +00:00
parent 7e8a5f5d9f
commit c9ee5a0635
2 changed files with 14 additions and 20 deletions

View File

@ -89,6 +89,11 @@ static void all_device_reset(void)
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
/* SDIO POWER */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
GPIO_Init(GPIOC,&GPIO_InitStructure);
GPIO_SetBits(GPIOC,GPIO_Pin_6); /* SD card power down */
/* SPI_FLASH CS */ /* SPI_FLASH CS */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
GPIO_Init(GPIOA,&GPIO_InitStructure); GPIO_Init(GPIOA,&GPIO_InitStructure);
@ -241,17 +246,6 @@ void rt_hw_board_init()
rt_kprintf("\rmem test pass!!\r\n"); rt_kprintf("\rmem test pass!!\r\n");
}/* memtest */ }/* memtest */
{
/* PC6 for SDCard Rst */
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOC,&GPIO_InitStructure);
GPIO_SetBits(GPIOC,GPIO_Pin_6);
}
/* SPI1 config */ /* SPI1 config */
{ {
GPIO_InitTypeDef GPIO_InitStructure; GPIO_InitTypeDef GPIO_InitStructure;

View File

@ -108,7 +108,7 @@ void rtthread_startup(void)
/* init hardware device */ /* init hardware device */
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
GPIO_ResetBits(GPIOC,GPIO_Pin_6); GPIO_ResetBits(GPIOC,GPIO_Pin_6); /* SD card power up */
rt_hw_sdcard_init(); rt_hw_sdcard_init();
rt_hw_spi_flash_init(); rt_hw_spi_flash_init();
#endif #endif