91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 11.03MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-29
  • 語言: 其他
  • 標簽: stm32??lwip??ftp服務器??

資源簡介

基于紅龍103開發板下的lwip協議棧搭建的ftp服務器

資源截圖

代碼片段和文件信息

/*
?*?File??????:?dm9000a.c
?*?This?file?is?part?of?RT-Thread?RTOS
?*?COPYRIGHT?(C)?2009?RT-Thread?Development?Team
?*
?*?The?license?and?distribution?terms?for?this?file?may?be
?*?found?in?the?file?LICENSE?in?this?distribution?or?at
?*?http://www.rt-thread.org/license/LICENSE
?*
?*?Change?Logs:
?*?Date???????????Author???????Notes
?*?2009-07-01?????Bernard??????the?first?version
?*/
#include?
#include?“dm9000a.h“

#include?
#include?“lwipopts.h“
#include?“stm32f10x.h“
#include?“stm32f10x_fsmc.h“

//?#define?DM9000_DEBUG 1
#if?(?DM9000_DEBUG?==?1?)
#define?DM9000_TRACE rt_kprintf
#else
#define?DM9000_TRACE(...)
#endif

/*
?*?DM9000?interrupt?line?is?connected?to?PE4
?*/
//--------------------------------------------------------

#define?DM9000_PHY??????????0x40????/*?PHY?address?0x01?*/
#define?RST_1()?????????????GPIO_SetBits(GPIOFGPIO_Pin_10)
#define?RST_0()?????????????GPIO_ResetBits(GPIOFGPIO_Pin_10)

#define?MAX_ADDR_LEN?6
enum?DM9000_PHY_mode
{
????DM9000_10MHD?=?0?DM9000_100MHD?=?1
????DM9000_10MFD?=?4?DM9000_100MFD?=?5
????DM9000_AUTO??=?8?DM9000_1M_HPNA?=?0x10
};

enum?DM9000_TYPE
{
????TYPE_DM9000E
????TYPE_DM9000A
????TYPE_DM9000B
};

struct?rt_dm9000_eth
{
????/*?inherit?from?ethernet?device?*/
????struct?eth_device?parent;

????enum?DM9000_TYPE?type;
????enum?DM9000_PHY_mode?mode;

????rt_uint8_t?imr_all;

????rt_uint8_t?packet_cnt;??????????????????/*?packet?I?or?II?*/
????rt_uint16_t?queue_packet_len;???????????/*?queued?packet?(packet?II)?*/

????/*?interface?address?info.?*/
????rt_uint8_t??dev_addr[MAX_ADDR_LEN]; /*?hw?address */
};
static?struct?rt_dm9000_eth?dm9000_device;
static?struct?rt_semaphore?sem_ack?sem_lock;

void?rt_dm9000_isr(void);

static?void?delay_ms(rt_uint32_t?ms)
{
????rt_uint32_t?len;
????for?(;?ms?>?0;?ms?--)
????????for?(len?=?0;?len?}

/*?Read?a?byte?from?I/O?port?*/
rt_inline?rt_uint8_t?dm9000_io_read(rt_uint16_t?reg)
{
????DM9000_IO?=?reg;
????return?(rt_uint8_t)?DM9000_DATA;
}

/*?Write?a?byte?to?I/O?port?*/
rt_inline?void?dm9000_io_write(rt_uint16_t?reg?rt_uint16_t?value)
{
????DM9000_IO?=?reg;
????DM9000_DATA?=?value;
}

/*?Read?a?word?from?phyxcer?*/
rt_inline?rt_uint16_t?phy_read(rt_uint16_t?reg)
{
????rt_uint16_t?val;

????/*?Fill?the?phyxcer?register?into?REG_0C?*/
????dm9000_io_write(DM9000_EPAR?DM9000_PHY?|?reg);
????dm9000_io_write(DM9000_EPCR?0xc); /*?Issue?phyxcer?read?command?*/

????delay_ms(100); /*?Wait?read?complete?*/

????dm9000_io_write(DM9000_EPCR?0x0); /*?Clear?phyxcer?read?command?*/
????val?=?(dm9000_io_read(DM9000_EPDRH)?<
????return?val;
}

/*?Write?a?word?to?phyxcer?*/
rt_inline?void?phy_write(rt_uint16_t?reg?rt_uint16_t?value)
{
????/*?Fill?the?phyxcer?register?into?REG_0C?*/
????dm9000_io_write(DM9000_EPAR?DM9000_PHY?|?reg);

????/*?Fill?the?written?data?in

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????25445??2012-09-12?16:42??網絡專題之ftp服務器\drivers\external\dm9000a.c

?????文件???????4883??2012-09-12?16:44??網絡專題之ftp服務器\drivers\external\dm9000a.h

?????文件??????99139??2012-09-12?11:24??網絡專題之ftp服務器\drivers\external\sdcard.c

?????文件??????15674??2012-09-12?11:24??網絡專題之ftp服務器\drivers\external\sdcard.h

?????文件???????9858??2012-09-12?11:24??網絡專題之ftp服務器\drivers\peripheral\serial.c

?????文件???????1774??2012-09-12?11:24??網絡專題之ftp服務器\drivers\peripheral\serial.h

?????文件???????9408??2013-12-04?11:44??網絡專題之ftp服務器\drivers\peripheral\usart.c

?????文件????????529??2012-09-12?11:24??網絡專題之ftp服務器\drivers\peripheral\usart.h

?????文件???????1209??2012-09-12?11:24??網絡專題之ftp服務器\drivers\SConscript

?????文件??????14576??2012-09-12?11:24??網絡專題之ftp服務器\drivers\spi\rt_stm32f10x_spi.c

?????文件????????741??2012-09-12?11:24??網絡專題之ftp服務器\drivers\spi\rt_stm32f10x_spi.h

?????文件??????15805??2012-09-12?11:24??網絡專題之ftp服務器\drivers\spi_flash\spi_flash_at45dbxx.c

?????文件????????456??2012-09-12?11:24??網絡專題之ftp服務器\drivers\spi_flash\spi_flash_at45dbxx.h

?????文件??????11320??2012-09-12?11:24??網絡專題之ftp服務器\drivers\spi_flash\spi_flash_sst25vfxx.c

?????文件????????898??2012-09-12?11:24??網絡專題之ftp服務器\drivers\spi_flash\spi_flash_sst25vfxx.h

?????文件????????212??2013-12-05?16:08??網絡專題之ftp服務器\fs\hello.html

?????文件???????5401??2011-06-10?15:09??網絡專題之ftp服務器\fsdata\fs.c

?????文件???????3751??2011-06-10?15:09??網絡專題之ftp服務器\fsdata\fs.h

?????文件???????2394??2013-12-05?16:08??網絡專題之ftp服務器\fsdata\fsdata.c

?????文件???????2060??2011-06-10?15:09??網絡專題之ftp服務器\fsdata\fsdata.h

?????文件?????200797??2011-06-10?15:09??網絡專題之ftp服務器\makefsdata.exe

?????文件??????18985??2013-12-05?15:10??網絡專題之ftp服務器\Project\context_rvds.lst

?????文件?????331285??2013-12-06?16:40??網絡專題之ftp服務器\Project\JlinkLog.txt

?????文件????????578??2013-12-02?14:46??網絡專題之ftp服務器\Project\JlinkSettings.ini

?????文件??????95084??2013-12-06?14:26??網絡專題之ftp服務器\Project\obj\api_lib.crf

?????文件???????2775??2013-12-06?14:26??網絡專題之ftp服務器\Project\obj\api_lib.d

?????文件??????96948??2013-12-06?14:26??網絡專題之ftp服務器\Project\obj\api_lib.o

?????文件???????1008??2013-12-06?14:26??網絡專題之ftp服務器\Project\obj\api_lib.__i

?????文件?????102821??2013-12-06?14:26??網絡專題之ftp服務器\Project\obj\api_msg.crf

?????文件???????2849??2013-12-06?14:26??網絡專題之ftp服務器\Project\obj\api_msg.d

............此處省略1147個文件信息

評論

共有 條評論