提交 c9ee5a06 编写于 作者: wuyangyong's avatar wuyangyong

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@497 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 7e8a5f5d
...@@ -71,9 +71,9 @@ void rt_hw_timer_handler(void) ...@@ -71,9 +71,9 @@ void rt_hw_timer_handler(void)
static void all_device_reset(void) static void all_device_reset(void)
{ {
/* RESET */ /* RESET */
/* DM9000A PE5 */ /* DM9000A PE5 */
/* LCD PF10 */ /* LCD PF10 */
/* SPI-FLASH PA3 */ /* SPI-FLASH PA3 */
/* CS */ /* CS */
/* DM9000A FSMC_NE4 PG12 */ /* DM9000A FSMC_NE4 PG12 */
...@@ -89,6 +89,11 @@ static void all_device_reset(void) ...@@ -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);
...@@ -184,9 +189,9 @@ static void all_device_reset(void) ...@@ -184,9 +189,9 @@ static void all_device_reset(void)
} }
/* FSMC GPIO configure */ /* FSMC GPIO configure */
GPIO_SetBits(GPIOE,GPIO_Pin_5); /* DM9000A */ GPIO_SetBits(GPIOE,GPIO_Pin_5); /* DM9000A */
GPIO_SetBits(GPIOF,GPIO_Pin_10); /* LCD */ GPIO_SetBits(GPIOF,GPIO_Pin_10); /* LCD */
GPIO_SetBits(GPIOA,GPIO_Pin_3); /* SPI_FLASH */ GPIO_SetBits(GPIOA,GPIO_Pin_3); /* SPI_FLASH */
} }
/** /**
...@@ -209,8 +214,8 @@ void rt_hw_board_init() ...@@ -209,8 +214,8 @@ void rt_hw_board_init()
SysTick_Config( SystemCoreClock / RT_TICK_PER_SECOND ); SysTick_Config( SystemCoreClock / RT_TICK_PER_SECOND );
/* Console Initialization*/ /* Console Initialization*/
rt_hw_usart_init(); rt_hw_usart_init();
rt_console_set_device("uart1"); rt_console_set_device("uart1");
rt_kprintf("\r\n\r\nSystemInit......\r\n"); rt_kprintf("\r\n\r\nSystemInit......\r\n");
...@@ -241,17 +246,6 @@ void rt_hw_board_init() ...@@ -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;
......
...@@ -108,7 +108,7 @@ void rtthread_startup(void) ...@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册