diff options
| author | aozima <[email protected]> | 2013-07-12 22:54:53 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2013-07-12 22:54:53 +0800 |
| commit | 8890e83aa9636a442b75943607cd2be94ef69994 (patch) | |
| tree | 83057529afe29f881c7e3e4de9cdd42fc563df91 | |
| parent | 020d05ca92266b8d4f8e7f9db2cc3be2f8b394f8 (diff) | |
update DM9000 ethernet driver for auto initial.
| -rw-r--r-- | bsp/stm32f10x/drivers/dm9000a.c | 5 | ||||
| -rw-r--r-- | bsp/stm32f10x/drivers/dm9000a.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/bsp/stm32f10x/drivers/dm9000a.c b/bsp/stm32f10x/drivers/dm9000a.c index 4fb7b2251a..a42219a63f 100644 --- a/bsp/stm32f10x/drivers/dm9000a.c +++ b/bsp/stm32f10x/drivers/dm9000a.c @@ -731,7 +731,7 @@ static void FSMC_Configuration() FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM4, ENABLE); } -void rt_hw_dm9000_init() +int rt_hw_dm9000_init(void) { RCC_Configuration(); NVIC_Configuration(); @@ -771,7 +771,10 @@ void rt_hw_dm9000_init() dm9000_device.parent.eth_tx = rt_dm9000_tx; eth_device_init(&(dm9000_device.parent), "e0"); + + return 0; } +INIT_DEVICE_EXPORT(rt_hw_dm9000_init); void dm9000(void) { diff --git a/bsp/stm32f10x/drivers/dm9000a.h b/bsp/stm32f10x/drivers/dm9000a.h index 9f3c80f3aa..a269f64215 100644 --- a/bsp/stm32f10x/drivers/dm9000a.h +++ b/bsp/stm32f10x/drivers/dm9000a.h @@ -160,6 +160,4 @@ #define GPCR_GEP_CNTL (1<<0) -void rt_hw_dm9000_init(void); - #endif |
