資源簡介
RT-Thread STM32工程模板,個人建議以模板為基準在移植自己的應用程序

代碼片段和文件信息
/**
??******************************************************************************
??*?@file????application.c
??*?@author??mousie
??*?@version?V1.0.0
??*?@date????2011.12.2
??*?@brief???頂層應用線程
??******************************************************************************
??*/
/*?Includes?------------------------------------------------------------------*/
#include?“application.h“
#include?“rtconfig.h“
#include?“rtthread.h“
#include?“debug.h“
#ifdef?RT_USING_DFS
????#include?“dfs_init.h“
????#include?“dfs_elm.h“
????#include?“dfs_fs.h“
????#include?“rt_hw_sd.h“
#endif
#ifdef?RT_USING_LWIP
????#include?“lwip/sys.h“
????#include?“lwip/api.h“
????#include?“netif/ethernetif.h“
#endif
/**?@addtogroup?Applications
??*?@{
??*/
/**?@defgroup?Application
??*?@{
??*/
/**?@defgroup?Application_Private_TypeDefine
??*?@brief????私有類型定義
??*?@{
??*/
/**
??*?@}
??*/
/**?@defgroup?Application_Private_MacroDefine
??*?@brief????私有宏定義
??*?@{
??*/
/**
??*?@}
??*/
/**?@defgroup?Application_Variables
??*?@brief????定義全局變量(私有/公有)
??*?@{
??*/
/**
??*?@}
??*/
/**?@defgroup?Application_Private_Function
??*?@brief????定義私有函數
??*?@{
??*/
/**
??*?@}
??*/
/**?@defgroup?Application_Function
??*?@brief????函數原文件
??*?@{
??*/
#ifdef?RT_USING_DFS
/**
??******************************************************************************
??*?@brief??SD卡文件系統模塊初始化
??*?????????此處只是將SD卡的通信和上層文件系統初始化
??*?????????SD卡的初始化工作可以在相關操作中完成?用完后斷電?這樣熱拔插更安全.
??*?@param??None
??*?@retval?None
??******************************************************************************
??*/
static?void?thread_filesys_init(void*?parameter)
{
????rt_hw_sd_init(“SD0“);
????rt_hw_sd_power_on();????????????????????????????????????????????????????????//?打開SD卡電源并初始化SD卡?并非一定要在此處
????dfs_init();?????????????????????????????????????????????????????????????????//?文件系統初始化
????elm_init();
????if?(dfs_mount(“SD0“?“/“?“elm“?0?0)?!=?0)????????????????????????????????//?加載SD卡根目錄
????{
????????assert_info(“File?System?init?failed!“?1);?????????????????????????????//?加載失敗提示
????}
}
#endif
#ifdef?RT_USING_LWIP
/**
??******************************************************************************
??*?@brief??LwIP網絡模塊初始化
??*?@param??None
??*?@retval?None
??******************************************************************************
??*/
void?thread_net_init(void*?parameter)
{
????extern?void?lwip_sys_init(void);
????extern?void?rt_hw_enc28j60_init(void);
????eth_system_device_init();???????????????????????????????????????????????????//?注冊網絡設備
????rt_hw_enc28j60_init();??????????????????????????????????????????????????????//?網絡芯片初始化
????rt_device_init_all();???????????????????????????????????????????????????????//?更新系統設備
????lwip_sys_init();????????????????????????????????????????????????????????????//?LwIP系統初始化
}
#endif
/**
??**************************************************************
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4510??2011-12-17?21:26??applications\application.c
?????文件???????1230??2011-12-17?21:07??applications\application.h
?????文件???????8121??2011-12-17?22:20??applications\example\net_test.c
?????文件???????3325??2011-12-17?22:20??applications\example\race_led.c
?????文件???????3966??2011-12-18?13:00??applications\example\sd_test.c
?????文件???????4096??2011-12-17?22:20??applications\example\sem_key_led.c
?????文件???????4829??2011-12-18?13:00??applications\irq_handler.c
?????文件???????6219??2011-12-17?21:39??applications\main.c
?????文件???????6053??2011-12-18?14:24??applications\rtconfig.h
?????文件??????16457??2011-12-17?20:41??applications\stm32f10x_conf.h
?????文件???????2377??2011-12-13?14:55??applications\user_types.h
?????文件??????96219??2012-02-01?15:52??compiler\rvmdk\ProjectTemplate.uvopt
?????文件?????152044??2011-12-18?13:19??compiler\rvmdk\ProjectTemplate.uvproj
?????文件???????2662??2011-12-17?19:53??drivers\debug.c
?????文件???????2218??2011-12-16?17:46??drivers\debug.h
?????文件???????8661??2011-12-16?16:24??drivers\drv_ctrlport.c
?????文件???????4468??2011-12-16?16:34??drivers\drv_ctrlport.h
?????文件??????13505??2011-12-16?17:02??drivers\drv_eeprom.c
?????文件???????3562??2011-12-16?16:24??drivers\drv_eeprom.h
?????文件???????6542??2011-12-14?10:08??drivers\drv_extint.c
?????文件???????3595??2011-12-14?10:47??drivers\drv_extint.h
?????文件??????20341??2011-12-16?16:24??drivers\drv_i2c.c
?????文件???????7372??2011-12-16?16:34??drivers\drv_i2c.h
?????文件???????9731??2011-12-17?22:13??drivers\drv_key.c
?????文件???????6163??2011-12-17?22:11??drivers\drv_key.h
?????文件??????13344??2011-12-16?16:34??drivers\drv_led.c
?????文件???????5498??2011-12-16?16:34??drivers\drv_led.h
?????文件???????6756??2011-12-16?16:34??drivers\drv_rtc_time.c
?????文件???????4488??2011-12-16?16:03??drivers\drv_rtc_time.h
?????文件??????27327??2011-12-17?15:09??drivers\drv_sd.c
............此處省略421個文件信息
- 上一篇:機器碼工具.zip
- 下一篇:J2ME游戲開發教程 pdf文件
評論
共有 條評論