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

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
上级 145e17a4
......@@ -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);
}
......
......@@ -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(...)
......@@ -60,7 +60,7 @@ void rt_dm9000_isr(void);
static void delay_ms(rt_uint32_t ms)
{
rt_uint32_t len;
for (;ms > 0; ms --)
for (; ms > 0; ms --)
for (len = 0; len < 100; len++ );
}
......@@ -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;
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册