update sub-project files of stm3210.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@223 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2009-12-24 12:38:11 +00:00
parent 8f90e129d3
commit ae58dd84b4
14 changed files with 813 additions and 546 deletions

View File

@ -25,22 +25,12 @@
/*@{*/ /*@{*/
#ifdef RT_USING_LWIP
#ifdef STM32F10X_CL
extern void rt_hw_stm32_eth_init(void);
#else
#include "enc28j60.h"
#endif
#include <netif/ethernetif.h>
#endif
extern int rt_application_init(void); extern int rt_application_init(void);
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
extern void finsh_system_init(void); extern void finsh_system_init(void);
extern void finsh_set_device(const char* device); extern void finsh_set_device(const char* device);
#endif #endif
/* bss end definitions for heap init */
#ifdef __CC_ARM #ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit; extern int Image$$RW_IRAM1$$ZI$$Limit;
#elif __ICCARM__ #elif __ICCARM__
@ -117,17 +107,6 @@ void rtthread_startup(void)
#else #else
rt_hw_msd_init(); rt_hw_msd_init();
#endif #endif
#endif
#ifdef RT_USING_LWIP
eth_system_device_init();
/* register ethernetif device */
#ifdef STM32F10X_CL
rt_hw_stm32_eth_init();
#else
rt_hw_enc28j60_init();
#endif
#endif #endif
rt_hw_rtc_init(); rt_hw_rtc_init();
@ -144,6 +123,9 @@ void rtthread_startup(void)
finsh_set_device(FINSH_DEVICE_NAME); finsh_set_device(FINSH_DEVICE_NAME);
#endif #endif
/* init timer thread */
rt_system_timer_thread_init();
/* init idle thread */ /* init idle thread */
rt_thread_idle_init(); rt_thread_idle_init();

View File

@ -1,11 +1,11 @@
/** /**
****************************************************************************** ******************************************************************************
* @file Project/Template/stm32f10x_it.c * @file Project/Template/stm32f10x_it.c
* @author MCD Application Team * @author MCD Application Team
* @version V3.1.0 * @version V3.1.0
* @date 06/19/2009 * @date 06/19/2009
* @brief Main Interrupt Service Routines. * @brief Main Interrupt Service Routines.
* This file provides template for all exceptions handler and * This file provides template for all exceptions handler and
* peripherals interrupt service routine. * peripherals interrupt service routine.
****************************************************************************** ******************************************************************************
* @copy * @copy
@ -18,12 +18,12 @@
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
* *
* <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2> * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "stm32f10x_it.h" #include "stm32f10x_it.h"
#include <board.h>
#include <rtthread.h> #include <rtthread.h>
#include "board.h"
/** @addtogroup Template_Project /** @addtogroup Template_Project
* @{ * @{
@ -168,7 +168,7 @@ void USART1_IRQHandler(void)
#ifdef RT_USING_UART1 #ifdef RT_USING_UART1
extern struct rt_device uart1_device; extern struct rt_device uart1_device;
extern void rt_hw_serial_isr(struct rt_device *device); extern void rt_hw_serial_isr(struct rt_device *device);
/* enter interrupt */ /* enter interrupt */
rt_interrupt_enter(); rt_interrupt_enter();
@ -225,6 +225,7 @@ void USART3_IRQHandler(void)
#endif #endif
} }
#if defined(RT_USING_DFS) && STM32_USE_SDIO
/******************************************************************************* /*******************************************************************************
* Function Name : SDIO_IRQHandler * Function Name : SDIO_IRQHandler
* Description : This function handles SDIO global interrupt request. * Description : This function handles SDIO global interrupt request.
@ -234,7 +235,6 @@ void USART3_IRQHandler(void)
*******************************************************************************/ *******************************************************************************/
void SDIO_IRQHandler(void) void SDIO_IRQHandler(void)
{ {
#if defined(RT_USING_DFS) && STM32_USE_SDIO
extern int SD_ProcessIRQSrc(void); extern int SD_ProcessIRQSrc(void);
/* enter interrupt */ /* enter interrupt */
@ -245,9 +245,32 @@ void SDIO_IRQHandler(void)
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif
} }
#endif
#ifdef RT_USING_LWIP
#ifdef STM32F10X_CL
/*******************************************************************************
* Function Name : ETH_IRQHandler
* Description : This function handles ETH interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void ETH_IRQHandler(void)
{
extern void rt_hw_stm32_eth_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_hw_stm32_eth_isr();
/* leave interrupt */
rt_interrupt_leave();
}
#else
#if (STM32_ETH_IF == 0)
/******************************************************************************* /*******************************************************************************
* Function Name : EXTI0_IRQHandler * Function Name : EXTI0_IRQHandler
* Description : This function handles External interrupt Line 0 request. * Description : This function handles External interrupt Line 0 request.
@ -257,7 +280,6 @@ void SDIO_IRQHandler(void)
*******************************************************************************/ *******************************************************************************/
void EXTI0_IRQHandler(void) void EXTI0_IRQHandler(void)
{ {
#if defined(RT_USING_LWIP) && !defined(STM32F10X_CL)
extern void enc28j60_isr(void); extern void enc28j60_isr(void);
/* enter interrupt */ /* enter interrupt */
@ -270,34 +292,39 @@ void EXTI0_IRQHandler(void)
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif
} }
#endif
#if (STM32_ETH_IF == 1)
/******************************************************************************* /*******************************************************************************
* Function Name : ETH_IRQHandler * Function Name : EXTI9_5_IRQHandler
* Description : This function handles ETH interrupt request. * Description : This function handles External lines 9 to 5 interrupt request.
* Input : None * Input : None
* Output : None * Output : None
* Return : None * Return : None
*******************************************************************************/ *******************************************************************************/
void ETH_IRQHandler(void) void EXTI9_5_IRQHandler(void)
{ {
#if defined(RT_USING_LWIP) && defined(STM32F10X_CL) extern void rt_dm9000_isr(void);
extern void rt_hw_stm32_eth_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_hw_stm32_eth_isr();
/* leave interrupt */ /* enter interrupt */
rt_interrupt_leave(); rt_interrupt_enter();
#endif
rt_dm9000_isr();
/* Clear the Key Button EXTI line pending bit */
EXTI_ClearITPendingBit(EXTI_Line7);
/* leave interrupt */
rt_interrupt_leave();
} }
#endif
#endif
#endif /* end of RT_USING_LWIP */
/** /**
* @} * @}
*/ */
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

View File

@ -1,6 +1,6 @@
/** /**
****************************************************************************** ******************************************************************************
* @file Project/Template/stm32f10x_it.h * @file Project/Template/stm32f10x_it.h
* @author MCD Application Team * @author MCD Application Team
* @version V3.1.0 * @version V3.1.0
* @date 06/19/2009 * @date 06/19/2009
@ -16,7 +16,7 @@
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
* *
* <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2> * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
*/ */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F10x_IT_H #ifndef __STM32F10x_IT_H
@ -24,7 +24,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h" #include "stm32f10x.h"

View File

@ -1,32 +1,30 @@
/* /*
* File : application.c * File : application.c
* This file is part of RT-Thread RTOS * This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Development Team * COPYRIGHT (C) 2006, RT-Thread Development Team
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at * found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE * http://www.rt-thread.org/license/LICENSE
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2009-01-05 Bernard the first version * 2009-01-05 Bernard the first version
*/ */
/** /**
* @addtogroup STM32 * @addtogroup STM32
*/ */
/*@{*/ /*@{*/
#include <rtthread.h> #include <rtthread.h>
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
/* dfs init */ /* dfs init */
#include <dfs_init.h> #include <dfs_init.h>
/* dfs filesystem:FAT filesystem init */ /* dfs filesystem:EFS filesystem init */
#include <dfs_fat.h> #include <dfs_efs.h>
/* dfs filesystem:EFS filesystem init */ /* dfs Filesystem APIs */
#include <dfs_efs.h>
/* dfs Filesystem APIs */
#include <dfs_fs.h> #include <dfs_fs.h>
#endif #endif
@ -73,42 +71,42 @@ void rt_init_thread_entry(void* parameter)
/* Filesystem Initialization */ /* Filesystem Initialization */
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
{ {
/* init the device filesystem */ /* init the device filesystem */
dfs_init(); dfs_init();
/* init the efsl filesystam*/ /* init the efsl filesystam*/
efsl_init(); efsl_init();
/* mount sd card fat partition 1 as root directory */ /* mount sd card fat partition 1 as root directory */
if (dfs_mount("sd0", "/", "efs", 0, 0) == 0) if (dfs_mount("sd0", "/", "efs", 0, 0) == 0)
{ {
rt_kprintf("File System initialized!\n"); rt_kprintf("File System initialized!\n");
ls_root(); ls_root();
} }
else else
rt_kprintf("File System init failed!\n"); rt_kprintf("File System init failed!\n");
} }
#endif #endif
} }
int rt_application_init() int rt_application_init()
{ {
rt_thread_t init_thread; rt_thread_t init_thread;
#if (RT_THREAD_PRIORITY_MAX == 32) #if (RT_THREAD_PRIORITY_MAX == 32)
init_thread = rt_thread_create("init", init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL, rt_init_thread_entry, RT_NULL,
2048, 8, 20); 2048, 8, 20);
#else #else
init_thread = rt_thread_create("init", init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL, rt_init_thread_entry, RT_NULL,
2048, 80, 20); 2048, 80, 20);
#endif #endif
if (init_thread != RT_NULL) if (init_thread != RT_NULL)
rt_thread_startup(init_thread); rt_thread_startup(init_thread);
return 0; return 0;
} }
/*@}*/ /*@}*/

View File

@ -24,6 +24,12 @@
/* Using Hook */ /* Using Hook */
#define RT_USING_HOOK #define RT_USING_HOOK
/* Using Software Timer */
/* #define RT_USING_TIMER_SOFT */
#define RT_TIMER_THREAD_PRIO 4
#define RT_TIMER_THREAD_STACK_SIZE 512
#define RT_TIMER_TICK_PER_SECOND 10
/* SECTION: IPC */ /* SECTION: IPC */
/* Using Semaphore*/ /* Using Semaphore*/
#define RT_USING_SEMAPHORE #define RT_USING_SEMAPHORE
@ -61,6 +67,9 @@
/* SECTION: device filesystem */ /* SECTION: device filesystem */
#define RT_USING_DFS #define RT_USING_DFS
#define RT_USING_DFS_EFSL
/* #define RT_USING_DFS_ELMFAT */
/* the max number of mounted filesystem */ /* the max number of mounted filesystem */
#define DFS_FILESYSTEMS_MAX 2 #define DFS_FILESYSTEMS_MAX 2
/* the max number of opened files */ /* the max number of opened files */

View File

@ -117,6 +117,9 @@ void rtthread_startup(void)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
/* init timer thread */
rt_system_timer_thread_init();
/* init idle thread */ /* init idle thread */
rt_thread_idle_init(); rt_thread_idle_init();

View File

@ -1,130 +1,131 @@
/** /**
****************************************************************************** ******************************************************************************
* @file Project/Template/stm32f10x_it.c * @file Project/Template/stm32f10x_it.c
* @author MCD Application Team * @author MCD Application Team
* @version V3.1.0 * @version V3.1.0
* @date 06/19/2009 * @date 06/19/2009
* @brief Main Interrupt Service Routines. * @brief Main Interrupt Service Routines.
* This file provides template for all exceptions handler and * This file provides template for all exceptions handler and
* peripherals interrupt service routine. * peripherals interrupt service routine.
****************************************************************************** ******************************************************************************
* @copy * @copy
* *
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
* *
* <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2> * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "stm32f10x_it.h" #include "stm32f10x_it.h"
#include <board.h>
#include <rtthread.h> #include <rtthread.h>
/** @addtogroup Template_Project /** @addtogroup Template_Project
* @{ * @{
*/ */
/* Private typedef -----------------------------------------------------------*/ /* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/ /* Private functions ---------------------------------------------------------*/
/******************************************************************************/
/* Cortex-M3 Processor Exceptions Handlers */
/******************************************************************************/
/**
* @brief This function handles NMI exception.
* @param None
* @retval None
*/
void NMI_Handler(void)
{
}
/**
* @brief This function handles Hard Fault exception.
* @param None
* @retval None
*/
void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Memory Manage exception.
* @param None
* @retval None
*/
void MemManage_Handler(void)
{
/* Go to infinite loop when Memory Manage exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Bus Fault exception.
* @param None
* @retval None
*/
void BusFault_Handler(void)
{
/* Go to infinite loop when Bus Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Usage Fault exception.
* @param None
* @retval None
*/
void UsageFault_Handler(void)
{
/* Go to infinite loop when Usage Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles SVCall exception.
* @param None
* @retval None
*/
void SVC_Handler(void)
{
}
/**
* @brief This function handles Debug Monitor exception.
* @param None
* @retval None
*/
void DebugMon_Handler(void)
{
}
/******************************************************************************/
/* STM32F10x Peripherals Interrupt Handlers */
/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
/* available peripheral interrupt handler's name please refer to the startup */
/* file (startup_stm32f10x_xx.s). */
/******************************************************************************/ /******************************************************************************/
/* Cortex-M3 Processor Exceptions Handlers */
/******************************************************************************/
/**
* @brief This function handles NMI exception.
* @param None
* @retval None
*/
void NMI_Handler(void)
{
}
/**
* @brief This function handles Hard Fault exception.
* @param None
* @retval None
*/
void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Memory Manage exception.
* @param None
* @retval None
*/
void MemManage_Handler(void)
{
/* Go to infinite loop when Memory Manage exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Bus Fault exception.
* @param None
* @retval None
*/
void BusFault_Handler(void)
{
/* Go to infinite loop when Bus Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Usage Fault exception.
* @param None
* @retval None
*/
void UsageFault_Handler(void)
{
/* Go to infinite loop when Usage Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles SVCall exception.
* @param None
* @retval None
*/
void SVC_Handler(void)
{
}
/**
* @brief This function handles Debug Monitor exception.
* @param None
* @retval None
*/
void DebugMon_Handler(void)
{
}
/******************************************************************************/
/* STM32F10x Peripherals Interrupt Handlers */
/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
/* available peripheral interrupt handler's name please refer to the startup */
/* file (startup_stm32f10x_xx.s). */
/******************************************************************************/
/******************************************************************************* /*******************************************************************************
* Function Name : DMA1_Channel2_IRQHandler * Function Name : DMA1_Channel2_IRQHandler
* Description : This function handles DMA1 Channel 2 interrupt request. * Description : This function handles DMA1 Channel 2 interrupt request.
@ -249,6 +250,7 @@ void USART3_IRQHandler(void)
#endif #endif
} }
#if defined(RT_USING_DFS) && STM32_USE_SDIO
/******************************************************************************* /*******************************************************************************
* Function Name : SDIO_IRQHandler * Function Name : SDIO_IRQHandler
* Description : This function handles SDIO global interrupt request. * Description : This function handles SDIO global interrupt request.
@ -258,7 +260,6 @@ void USART3_IRQHandler(void)
*******************************************************************************/ *******************************************************************************/
void SDIO_IRQHandler(void) void SDIO_IRQHandler(void)
{ {
#ifdef RT_USING_DFS
extern int SD_ProcessIRQSrc(void); extern int SD_ProcessIRQSrc(void);
/* enter interrupt */ /* enter interrupt */
@ -269,12 +270,86 @@ void SDIO_IRQHandler(void)
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif
} }
#endif
/**
* @} #ifdef RT_USING_LWIP
*/ #ifdef STM32F10X_CL
/*******************************************************************************
* Function Name : ETH_IRQHandler
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ * Description : This function handles ETH interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void ETH_IRQHandler(void)
{
extern void rt_hw_stm32_eth_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_hw_stm32_eth_isr();
/* leave interrupt */
rt_interrupt_leave();
}
#else
#if (STM32_ETH_IF == 0)
/*******************************************************************************
* Function Name : EXTI0_IRQHandler
* Description : This function handles External interrupt Line 0 request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI0_IRQHandler(void)
{
extern void enc28j60_isr(void);
/* enter interrupt */
rt_interrupt_enter();
enc28j60_isr();
/* Clear the Key Button EXTI line pending bit */
EXTI_ClearITPendingBit(EXTI_Line0);
/* leave interrupt */
rt_interrupt_leave();
}
#endif
#if (STM32_ETH_IF == 1)
/*******************************************************************************
* Function Name : EXTI9_5_IRQHandler
* Description : This function handles External lines 9 to 5 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI9_5_IRQHandler(void)
{
extern void rt_dm9000_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_dm9000_isr();
/* Clear the Key Button EXTI line pending bit */
EXTI_ClearITPendingBit(EXTI_Line7);
/* leave interrupt */
rt_interrupt_leave();
}
#endif
#endif
#endif /* end of RT_USING_LWIP */
/**
* @}
*/
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

View File

@ -24,6 +24,12 @@
/* Using Hook */ /* Using Hook */
#define RT_USING_HOOK #define RT_USING_HOOK
/* Using Software Timer */
/* #define RT_USING_TIMER_SOFT */
#define RT_TIMER_THREAD_PRIO 4
#define RT_TIMER_THREAD_STACK_SIZE 512
#define RT_TIMER_TICK_PER_SECOND 10
/* SECTION: IPC */ /* SECTION: IPC */
/* Using Semaphore*/ /* Using Semaphore*/
#define RT_USING_SEMAPHORE #define RT_USING_SEMAPHORE
@ -59,7 +65,7 @@
/* the buffer size of console*/ /* the buffer size of console*/
#define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLEBUF_SIZE 128
/* SECTION: finsh shell */ /* SECTION: finsh, a C-Express shell */
#define RT_USING_FINSH #define RT_USING_FINSH
/* Using symbol table */ /* Using symbol table */
#define FINSH_USING_SYMTAB #define FINSH_USING_SYMTAB

View File

@ -25,10 +25,10 @@
/*@{*/ /*@{*/
extern int rt_application_init(void); extern int rt_application_init(void);
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
extern void finsh_system_init(void); extern void finsh_system_init(void);
extern void finsh_set_device(const char* device); extern void finsh_set_device(const char* device);
#endif #endif
#ifdef __CC_ARM #ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit; extern int Image$$RW_IRAM1$$ZI$$Limit;
@ -108,7 +108,10 @@ void rtthread_startup(void)
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
/* init timer thread */
rt_system_timer_thread_init();
/* init idle thread */ /* init idle thread */
rt_thread_idle_init(); rt_thread_idle_init();

View File

@ -22,7 +22,8 @@
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "stm32f10x_it.h" #include "stm32f10x_it.h"
#include <rtthread.h> #include <board.h>
#include <rtthread.h>
/** @addtogroup Template_Project /** @addtogroup Template_Project
* @{ * @{
@ -124,130 +125,227 @@ void DebugMon_Handler(void)
/* available peripheral interrupt handler's name please refer to the startup */ /* available peripheral interrupt handler's name please refer to the startup */
/* file (startup_stm32f10x_xx.s). */ /* file (startup_stm32f10x_xx.s). */
/******************************************************************************/ /******************************************************************************/
/******************************************************************************* /*******************************************************************************
* Function Name : DMA1_Channel2_IRQHandler * Function Name : DMA1_Channel2_IRQHandler
* Description : This function handles DMA1 Channel 2 interrupt request. * Description : This function handles DMA1 Channel 2 interrupt request.
* Input : None * Input : None
* Output : None * Output : None
* Return : None * Return : None
*******************************************************************************/ *******************************************************************************/
void DMA1_Channel2_IRQHandler(void) void DMA1_Channel2_IRQHandler(void)
{ {
#ifdef RT_USING_UART3 #ifdef RT_USING_UART3
extern struct rt_device uart3_device; extern struct rt_device uart3_device;
extern void rt_hw_serial_dma_tx_isr(struct rt_device *device); extern void rt_hw_serial_dma_tx_isr(struct rt_device *device);
/* enter interrupt */ /* enter interrupt */
rt_interrupt_enter(); rt_interrupt_enter();
if (DMA_GetITStatus(DMA1_IT_TC2)) if (DMA_GetITStatus(DMA1_IT_TC2))
{ {
/* transmission complete, invoke serial dma tx isr */ /* transmission complete, invoke serial dma tx isr */
rt_hw_serial_dma_tx_isr(&uart3_device); rt_hw_serial_dma_tx_isr(&uart3_device);
} }
/* clear DMA flag */ /* clear DMA flag */
DMA_ClearFlag(DMA1_FLAG_TC2 | DMA1_FLAG_TE2); DMA_ClearFlag(DMA1_FLAG_TC2 | DMA1_FLAG_TE2);
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif #endif
} }
/******************************************************************************* /*******************************************************************************
* Function Name : DMA1_Channel6_IRQHandler * Function Name : DMA1_Channel6_IRQHandler
* Description : This function handles DMA1 Channel 6 interrupt request. * Description : This function handles DMA1 Channel 6 interrupt request.
* Input : None * Input : None
* Output : None * Output : None
* Return : None * Return : None
*******************************************************************************/ *******************************************************************************/
void DMA1_Channel6_IRQHandler(void) void DMA1_Channel6_IRQHandler(void)
{ {
#ifdef RT_USING_UART2 #ifdef RT_USING_UART2
extern struct rt_device uart2_device; extern struct rt_device uart2_device;
extern void rt_hw_serial_dma_rx_isr(struct rt_device *device); extern void rt_hw_serial_dma_rx_isr(struct rt_device *device);
/* enter interrupt */ /* enter interrupt */
rt_interrupt_enter(); rt_interrupt_enter();
/* clear DMA flag */ /* clear DMA flag */
DMA_ClearFlag(DMA1_FLAG_TC6 | DMA1_FLAG_TE6); DMA_ClearFlag(DMA1_FLAG_TC6 | DMA1_FLAG_TE6);
rt_hw_serial_dma_rx_isr(&uart2_device); rt_hw_serial_dma_rx_isr(&uart2_device);
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif #endif
} }
/******************************************************************************* /*******************************************************************************
* Function Name : USART1_IRQHandler * Function Name : USART1_IRQHandler
* Description : This function handles USART1 global interrupt request. * Description : This function handles USART1 global interrupt request.
* Input : None * Input : None
* Output : None * Output : None
* Return : None * Return : None
*******************************************************************************/ *******************************************************************************/
void USART1_IRQHandler(void) void USART1_IRQHandler(void)
{ {
#ifdef RT_USING_UART1 #ifdef RT_USING_UART1
extern struct rt_device uart1_device; extern struct rt_device uart1_device;
extern void rt_hw_serial_isr(struct rt_device *device); extern void rt_hw_serial_isr(struct rt_device *device);
/* enter interrupt */ /* enter interrupt */
rt_interrupt_enter(); rt_interrupt_enter();
rt_hw_serial_isr(&uart1_device); rt_hw_serial_isr(&uart1_device);
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif #endif
} }
/******************************************************************************* /*******************************************************************************
* Function Name : USART2_IRQHandler * Function Name : USART2_IRQHandler
* Description : This function handles USART2 global interrupt request. * Description : This function handles USART2 global interrupt request.
* Input : None * Input : None
* Output : None * Output : None
* Return : None * Return : None
*******************************************************************************/ *******************************************************************************/
void USART2_IRQHandler(void) void USART2_IRQHandler(void)
{ {
#ifdef RT_USING_UART2 #ifdef RT_USING_UART2
extern struct rt_device uart2_device; extern struct rt_device uart2_device;
extern void rt_hw_serial_isr(struct rt_device *device); extern void rt_hw_serial_isr(struct rt_device *device);
/* enter interrupt */ /* enter interrupt */
rt_interrupt_enter(); rt_interrupt_enter();
rt_hw_serial_isr(&uart2_device); rt_hw_serial_isr(&uart2_device);
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif #endif
} }
/******************************************************************************* /*******************************************************************************
* Function Name : USART3_IRQHandler * Function Name : USART3_IRQHandler
* Description : This function handles USART3 global interrupt request. * Description : This function handles USART3 global interrupt request.
* Input : None * Input : None
* Output : None * Output : None
* Return : None * Return : None
*******************************************************************************/ *******************************************************************************/
void USART3_IRQHandler(void) void USART3_IRQHandler(void)
{ {
#ifdef RT_USING_UART3 #ifdef RT_USING_UART3
extern struct rt_device uart3_device; extern struct rt_device uart3_device;
extern void rt_hw_serial_isr(struct rt_device *device); extern void rt_hw_serial_isr(struct rt_device *device);
/* enter interrupt */ /* enter interrupt */
rt_interrupt_enter(); rt_interrupt_enter();
rt_hw_serial_isr(&uart3_device); rt_hw_serial_isr(&uart3_device);
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif #endif
} }
#if defined(RT_USING_DFS) && STM32_USE_SDIO
/*******************************************************************************
* Function Name : SDIO_IRQHandler
* Description : This function handles SDIO global interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void SDIO_IRQHandler(void)
{
extern int SD_ProcessIRQSrc(void);
/* enter interrupt */
rt_interrupt_enter();
/* Process All SDIO Interrupt Sources */
SD_ProcessIRQSrc();
/* leave interrupt */
rt_interrupt_leave();
}
#endif
#ifdef RT_USING_LWIP
#ifdef STM32F10X_CL
/*******************************************************************************
* Function Name : ETH_IRQHandler
* Description : This function handles ETH interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void ETH_IRQHandler(void)
{
extern void rt_hw_stm32_eth_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_hw_stm32_eth_isr();
/* leave interrupt */
rt_interrupt_leave();
}
#else
#if (STM32_ETH_IF == 0)
/*******************************************************************************
* Function Name : EXTI0_IRQHandler
* Description : This function handles External interrupt Line 0 request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI0_IRQHandler(void)
{
extern void enc28j60_isr(void);
/* enter interrupt */
rt_interrupt_enter();
enc28j60_isr();
/* Clear the Key Button EXTI line pending bit */
EXTI_ClearITPendingBit(EXTI_Line0);
/* leave interrupt */
rt_interrupt_leave();
}
#endif
#if (STM32_ETH_IF == 1)
/*******************************************************************************
* Function Name : EXTI9_5_IRQHandler
* Description : This function handles External lines 9 to 5 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI9_5_IRQHandler(void)
{
extern void rt_dm9000_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_dm9000_isr();
/* Clear the Key Button EXTI line pending bit */
EXTI_ClearITPendingBit(EXTI_Line7);
/* leave interrupt */
rt_interrupt_leave();
}
#endif
#endif
#endif /* end of RT_USING_LWIP */
/** /**
* @} * @}

View File

@ -17,43 +17,62 @@
*/ */
/*@{*/ /*@{*/
#include <rtthread.h> #include <board.h>
#include <rtthread.h>
#ifdef RT_USING_LWIP
#include <lwip/sys.h> #ifdef RT_USING_LWIP
#include <lwip/api.h> #include <lwip/sys.h>
#endif #include <lwip/api.h>
#include <netif/ethernetif.h>
void rt_init_thread_entry(void* parameter) #endif
{
/* LwIP Initialization */ void rt_init_thread_entry(void* parameter)
#ifdef RT_USING_LWIP {
{ /* LwIP Initialization */
extern void lwip_sys_init(void); #ifdef RT_USING_LWIP
{
/* init lwip system */ extern void lwip_sys_init(void);
lwip_sys_init();
rt_kprintf("TCP/IP initialized!\n"); /* register ethernetif device */
} eth_system_device_init();
#endif
} #ifdef STM32F10X_CL
rt_hw_stm32_eth_init();
#else
/* STM32F103 */
#if STM32_ETH_IF == 0
rt_hw_enc28j60_init();
#elif STM32_ETH_IF == 1
rt_hw_dm9000_init();
#endif
#endif
/* re-init device driver */
rt_device_init_all();
/* init lwip system */
lwip_sys_init();
rt_kprintf("TCP/IP initialized!\n");
}
#endif
}
int rt_application_init() int rt_application_init()
{ {
rt_thread_t init_thread; rt_thread_t init_thread;
#if (RT_THREAD_PRIORITY_MAX == 32) #if (RT_THREAD_PRIORITY_MAX == 32)
init_thread = rt_thread_create("init", init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL, rt_init_thread_entry, RT_NULL,
2048, 8, 20); 2048, 8, 20);
#else #else
init_thread = rt_thread_create("init", init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL, rt_init_thread_entry, RT_NULL,
2048, 80, 20); 2048, 80, 20);
#endif #endif
if (init_thread != RT_NULL) if (init_thread != RT_NULL)
rt_thread_startup(init_thread); rt_thread_startup(init_thread);
return 0; return 0;
} }

View File

@ -24,6 +24,12 @@
/* Using Hook */ /* Using Hook */
#define RT_USING_HOOK #define RT_USING_HOOK
/* Using Software Timer */
/* #define RT_USING_TIMER_SOFT */
#define RT_TIMER_THREAD_PRIO 4
#define RT_TIMER_THREAD_STACK_SIZE 512
#define RT_TIMER_TICK_PER_SECOND 10
/* SECTION: IPC */ /* SECTION: IPC */
/* Using Semaphore*/ /* Using Semaphore*/
#define RT_USING_SEMAPHORE #define RT_USING_SEMAPHORE
@ -57,23 +63,23 @@
/* SECTION: Console options */ /* SECTION: Console options */
/* the buffer size of console*/ /* the buffer size of console*/
#define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLEBUF_SIZE 128
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
#define RT_USING_LWIP #define RT_USING_LWIP
/* Enable ICMP protocol*/ /* Enable ICMP protocol*/
#define RT_LWIP_ICMP #define RT_LWIP_ICMP
/* Enable UDP protocol*/ /* Enable UDP protocol*/
#define RT_LWIP_UDP #define RT_LWIP_UDP
/* Enable TCP protocol*/ /* Enable TCP protocol*/
#define RT_LWIP_TCP #define RT_LWIP_TCP
/* Enable DNS */ /* Enable DNS */
#define RT_LWIP_DNS #define RT_LWIP_DNS
/* the number of simulatenously active TCP connections*/ /* the number of simulatenously active TCP connections*/
#define RT_LWIP_TCP_PCB_NUM 5 #define RT_LWIP_TCP_PCB_NUM 5
/* ip address of target*/ /* ip address of target*/
#define RT_LWIP_IPADDR0 192 #define RT_LWIP_IPADDR0 192
#define RT_LWIP_IPADDR1 168 #define RT_LWIP_IPADDR1 168

View File

@ -23,17 +23,12 @@
*/ */
/*@{*/ /*@{*/
#ifdef RT_USING_LWIP
#include "enc28j60.h"
#include <netif/ethernetif.h>
#endif
extern int rt_application_init(void); extern int rt_application_init(void);
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
extern void finsh_system_init(void); extern void finsh_system_init(void);
extern void finsh_set_device(const char* device); extern void finsh_set_device(const char* device);
#endif #endif
#ifdef __CC_ARM #ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit; extern int Image$$RW_IRAM1$$ZI$$Limit;
@ -102,14 +97,7 @@ void rtthread_startup(void)
rt_system_scheduler_init(); rt_system_scheduler_init();
/* init hardware serial device */ /* init hardware serial device */
rt_hw_usart_init(); rt_hw_usart_init();
#ifdef RT_USING_LWIP
eth_system_device_init();
/* register ethernetif device */
rt_hw_enc28j60_init();
#endif
/* init all device */ /* init all device */
rt_device_init_all(); rt_device_init_all();
@ -121,7 +109,10 @@ void rtthread_startup(void)
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
/* init timer thread */
rt_system_timer_thread_init();
/* init idle thread */ /* init idle thread */
rt_thread_idle_init(); rt_thread_idle_init();

View File

@ -1,130 +1,131 @@
/** /**
****************************************************************************** ******************************************************************************
* @file Project/Template/stm32f10x_it.c * @file Project/Template/stm32f10x_it.c
* @author MCD Application Team * @author MCD Application Team
* @version V3.1.0 * @version V3.1.0
* @date 06/19/2009 * @date 06/19/2009
* @brief Main Interrupt Service Routines. * @brief Main Interrupt Service Routines.
* This file provides template for all exceptions handler and * This file provides template for all exceptions handler and
* peripherals interrupt service routine. * peripherals interrupt service routine.
****************************************************************************** ******************************************************************************
* @copy * @copy
* *
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
* *
* <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2> * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "stm32f10x_it.h" #include "stm32f10x_it.h"
#include <board.h>
#include <rtthread.h> #include <rtthread.h>
/** @addtogroup Template_Project /** @addtogroup Template_Project
* @{ * @{
*/ */
/* Private typedef -----------------------------------------------------------*/ /* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/ /* Private functions ---------------------------------------------------------*/
/******************************************************************************/
/* Cortex-M3 Processor Exceptions Handlers */
/******************************************************************************/
/**
* @brief This function handles NMI exception.
* @param None
* @retval None
*/
void NMI_Handler(void)
{
}
/**
* @brief This function handles Hard Fault exception.
* @param None
* @retval None
*/
void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Memory Manage exception.
* @param None
* @retval None
*/
void MemManage_Handler(void)
{
/* Go to infinite loop when Memory Manage exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Bus Fault exception.
* @param None
* @retval None
*/
void BusFault_Handler(void)
{
/* Go to infinite loop when Bus Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Usage Fault exception.
* @param None
* @retval None
*/
void UsageFault_Handler(void)
{
/* Go to infinite loop when Usage Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles SVCall exception.
* @param None
* @retval None
*/
void SVC_Handler(void)
{
}
/**
* @brief This function handles Debug Monitor exception.
* @param None
* @retval None
*/
void DebugMon_Handler(void)
{
}
/******************************************************************************/
/* STM32F10x Peripherals Interrupt Handlers */
/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
/* available peripheral interrupt handler's name please refer to the startup */
/* file (startup_stm32f10x_xx.s). */
/******************************************************************************/ /******************************************************************************/
/* Cortex-M3 Processor Exceptions Handlers */
/******************************************************************************/
/**
* @brief This function handles NMI exception.
* @param None
* @retval None
*/
void NMI_Handler(void)
{
}
/**
* @brief This function handles Hard Fault exception.
* @param None
* @retval None
*/
void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Memory Manage exception.
* @param None
* @retval None
*/
void MemManage_Handler(void)
{
/* Go to infinite loop when Memory Manage exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Bus Fault exception.
* @param None
* @retval None
*/
void BusFault_Handler(void)
{
/* Go to infinite loop when Bus Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Usage Fault exception.
* @param None
* @retval None
*/
void UsageFault_Handler(void)
{
/* Go to infinite loop when Usage Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles SVCall exception.
* @param None
* @retval None
*/
void SVC_Handler(void)
{
}
/**
* @brief This function handles Debug Monitor exception.
* @param None
* @retval None
*/
void DebugMon_Handler(void)
{
}
/******************************************************************************/
/* STM32F10x Peripherals Interrupt Handlers */
/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
/* available peripheral interrupt handler's name please refer to the startup */
/* file (startup_stm32f10x_xx.s). */
/******************************************************************************/
/******************************************************************************* /*******************************************************************************
* Function Name : DMA1_Channel2_IRQHandler * Function Name : DMA1_Channel2_IRQHandler
* Description : This function handles DMA1 Channel 2 interrupt request. * Description : This function handles DMA1 Channel 2 interrupt request.
@ -249,6 +250,7 @@ void USART3_IRQHandler(void)
#endif #endif
} }
#if defined(RT_USING_DFS) && STM32_USE_SDIO
/******************************************************************************* /*******************************************************************************
* Function Name : SDIO_IRQHandler * Function Name : SDIO_IRQHandler
* Description : This function handles SDIO global interrupt request. * Description : This function handles SDIO global interrupt request.
@ -258,7 +260,6 @@ void USART3_IRQHandler(void)
*******************************************************************************/ *******************************************************************************/
void SDIO_IRQHandler(void) void SDIO_IRQHandler(void)
{ {
#ifdef RT_USING_DFS
extern int SD_ProcessIRQSrc(void); extern int SD_ProcessIRQSrc(void);
/* enter interrupt */ /* enter interrupt */
@ -269,9 +270,32 @@ void SDIO_IRQHandler(void)
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif
} }
#endif
#ifdef RT_USING_LWIP
#ifdef STM32F10X_CL
/*******************************************************************************
* Function Name : ETH_IRQHandler
* Description : This function handles ETH interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void ETH_IRQHandler(void)
{
extern void rt_hw_stm32_eth_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_hw_stm32_eth_isr();
/* leave interrupt */
rt_interrupt_leave();
}
#else
#if (STM32_ETH_IF == 0)
/******************************************************************************* /*******************************************************************************
* Function Name : EXTI0_IRQHandler * Function Name : EXTI0_IRQHandler
* Description : This function handles External interrupt Line 0 request. * Description : This function handles External interrupt Line 0 request.
@ -281,7 +305,6 @@ void SDIO_IRQHandler(void)
*******************************************************************************/ *******************************************************************************/
void EXTI0_IRQHandler(void) void EXTI0_IRQHandler(void)
{ {
#ifdef RT_USING_LWIP
extern void enc28j60_isr(void); extern void enc28j60_isr(void);
/* enter interrupt */ /* enter interrupt */
@ -294,12 +317,39 @@ void EXTI0_IRQHandler(void)
/* leave interrupt */ /* leave interrupt */
rt_interrupt_leave(); rt_interrupt_leave();
#endif
} }
#endif
/**
* @} #if (STM32_ETH_IF == 1)
*/ /*******************************************************************************
* Function Name : EXTI9_5_IRQHandler
* Description : This function handles External lines 9 to 5 interrupt request.
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ * Input : None
* Output : None
* Return : None
*******************************************************************************/
void EXTI9_5_IRQHandler(void)
{
extern void rt_dm9000_isr(void);
/* enter interrupt */
rt_interrupt_enter();
rt_dm9000_isr();
/* Clear the Key Button EXTI line pending bit */
EXTI_ClearITPendingBit(EXTI_Line7);
/* leave interrupt */
rt_interrupt_leave();
}
#endif
#endif
#endif /* end of RT_USING_LWIP */
/**
* @}
*/
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/