for stm32radio: modify mac address,set UART rx PIN: IPU,modify key.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@351 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2010-01-30 18:33:27 +00:00
parent 145e17a44a
commit d1b86442fe
3 changed files with 458 additions and 456 deletions

View File

@ -283,7 +283,7 @@ void rt_hw_board_init()
#endif
/* init console to support rt_kprintf */
static void rt_hw_console_init()
static void rt_hw_console_init(void)
{
/* Enable USART1 and GPIOA clocks */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1
@ -304,7 +304,7 @@ static void rt_hw_console_init()
/* Configure USART1 Rx (PA.10) as input floating */
GPIO_InitStructure.GPIO_Pin = CONSOLE_TX_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_Init(CONSOLE_GPIO, &GPIO_InitStructure);
}

View File

@ -6,7 +6,7 @@
#include "stm32f10x.h"
// #define DM9000_DEBUG 1
#if DM9000_DEBUG
#if ( DM9000_DEBUG == 1 )
#define DM9000_TRACE rt_kprintf
#else
#define DM9000_TRACE(...)
@ -609,7 +609,7 @@ static void GPIO_Configuration()
EXTI_ClearITPendingBit(EXTI_Line4);
}
void rt_hw_dm9000_init()
void rt_hw_dm9000_init(void)
{
RCC_Configuration();
NVIC_Configuration();
@ -629,12 +629,14 @@ void rt_hw_dm9000_init()
*/
dm9000_device.imr_all = IMR_PAR | IMR_PTM | IMR_PRM;
dm9000_device.dev_addr[0] = 0x01;
/* set mac address: (only for test) */
/* oui 00-60-6E DAVICOM SEMICONDUCTOR, INC.*/
dm9000_device.dev_addr[0] = 0x00;
dm9000_device.dev_addr[1] = 0x60;
dm9000_device.dev_addr[2] = 0x6E;
dm9000_device.dev_addr[3] = 0x11;
dm9000_device.dev_addr[4] = 0x02;
dm9000_device.dev_addr[5] = 0x0F;
dm9000_device.dev_addr[4] = 0x22;
dm9000_device.dev_addr[5] = 0x33;
dm9000_device.parent.parent.init = rt_dm9000_init;
dm9000_device.parent.parent.open = rt_dm9000_open;

View File

@ -47,13 +47,13 @@ static void key_thread_entry(void *parameter)
while (1)
{
next_delay = 20;
next_delay = 10;
kbd_event.key = RTGUIK_UNKNOWN;
kbd_event.type = RTGUI_KEYDOWN;
if ( key_enter_GETVALUE() == 0 )
{
rt_thread_delay(next_delay);
rt_thread_delay( next_delay*4 );
if (key_enter_GETVALUE() == 0)
{
/* HOME key */