资源简介
基于stm32 dm9000的tcp服务
代码片段和文件信息
/*
* File : application.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006-2011 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
* 2011-02-14 aozima first implementation for Nios II.
* 2011-03-04 aozima add led.
*/
#include
#include “board.h“
/**
* @addtogroup NIOS_II
*/
/*@{*/
#include “system.h“
#include “altera_avalon_pio_regs.h“
// trun on led n
#define rt_hw_led_on(n) IOWR_ALTERA_AVALON_PIO_DATA(\
LED_base\
IORD_ALTERA_AVALON_PIO_DATA(LED_base) | 1< // trun off led n
#define rt_hw_led_off(n) IOWR_ALTERA_AVALON_PIO_DATA(\
LED_base\
IORD_ALTERA_AVALON_PIO_DATA(LED_base) & ~(1<
ALIGN(RT_ALIGN_SIZE)
static char thread_led1_stack[1024];
struct rt_thread thread_led1;
static void rt_thread_entry_led1(void* parameter)
{
unsigned int count=0;
while (1)
{
/* led1 on */
#ifndef RT_USING_FINSH
rt_kprintf(“led1 oncount : %d\r\n“count);
#endif
count++;
rt_hw_led_on(1);
/* sleep 0.5 second and switch to other thread */
rt_thread_delay(RT_TICK_PER_SECOND/2);
/* led1 off */
#ifndef RT_USING_FINSH
rt_kprintf(“led1 off\r\n“);
#endif
rt_hw_led_off(1);
rt_thread_delay(RT_TICK_PER_SECOND/2);
}
}
ALIGN(RT_ALIGN_SIZE)
static char thread_led2_stack[1024];
struct rt_thread thread_led2;
void rt_thread_entry_led2(void* parameter)
{
unsigned int count=0;
while (1)
{
/* led2 on */
#ifndef RT_USING_FINSH
rt_kprintf(“led2 oncount : %d\r\n“count);
#endif
count++;
rt_hw_led_on(2);
rt_thread_delay(RT_TICK_PER_SECOND);
/* led2 off */
#ifndef RT_USING_FINSH
rt_kprintf(“led2 off\r\n“);
#endif
rt_hw_led_off(2);
rt_thread_delay(RT_TICK_PER_SECOND);
}
}
int rt_application_init()
{
// led_init();
//------- init led1 thread
rt_thread_init(&thread_led1
“led1“
rt_thread_entry_led1
RT_NULL
&thread_led1_stack[0]
sizeof(thread_led1_stack)115);
rt_thread_startup(&thread_led1);
//------- init led2 thread
rt_thread_init(&thread_led2
“led2“
rt_thread_entry_led2
RT_NULL
&thread_led2_stack[0]
sizeof(thread_led2_stack)125);
rt_thread_startup(&thread_led2);
return 0;
}
/*@}*/
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-06-03 08:15 stm32 tcpclient dm9000\
文件 571 2014-01-06 22:38 stm32 tcpclient dm9000\AUTHORS
文件 17992 2014-01-06 22:38 stm32 tcpclient dm9000\COPYING
文件 2688 2014-01-06 22:38 stm32 tcpclient dm9000\README.md
目录 0 2017-06-03 08:15 stm32 tcpclient dm9000\bsp\
目录 0 2017-06-03 08:15 stm32 tcpclient dm9000\bsp\nios_ii\
文件 2763 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\application.c
文件 2107 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\board.c
文件 542 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\board.h
文件 145 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\get_update_finsh.bat
文件 136 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\get_update_finsh.sh
文件 453 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\get_update_rt-thread.bat
文件 442 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\get_update_rt-thread.sh
文件 839 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\readme_cn.txt
文件 21 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\readme_en.txt
文件 3380 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\rtconfig.h
文件 1916 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\startup.c
文件 3186 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\uart.c
文件 111 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\nios_ii\uart.h
目录 0 2017-06-03 08:15 stm32 tcpclient dm9000\bsp\simulator\
文件 118 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\.gdbinit
文件 265 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SConsc
文件 3127 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SConstruct
目录 0 2017-06-03 08:15 stm32 tcpclient dm9000\bsp\simulator\SDL\
文件 489 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SDL\BUGS
文件 24390 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SDL\COPYING
文件 1864 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SDL\README
文件 425 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SDL\README-SDL.txt
文件 6164 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SDL\VisualC.html
文件 27856 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SDL\WhatsNew
文件 18336 2014-01-06 22:38 stm32 tcpclient dm9000\bsp\simulator\SDL\docs.html
............此处省略5621个文件信息
相关资源
- 基于stm32f407实现的modbus/tcp
- STM32F4x7+freertos+lwip+ssl+MQTT-(MDK5)稳定
- 嵌入式网络那些事:LwIP协议深度剖析
- stm32f407网络通讯工程 Freertos+lwip的t
- STM32F407+LAN8720+LWIP移植freemodbus TCP.zip
- STM32+FreeRtos+Lwip+ENC28J60
- STM32+LWIP+WEB_SSI_CGI
- lwip资料合集-嵌入式网络的那些事:
- GD32F4xx单片机-FreeRTOS10.2.0-LWIP2.0.2移植
- LWIP-freertos.rarSTM32F7芯片,lwip实现热插
- STM32F407+FREERTOS+LWIP+RMII_KSZ8031+SDIO_FATF
- STM32F4x7+freertos+lwip+ssl+MQTT(MDK5)源码
- lwip+ucosIII+stm32+keil
- 嵌入式网络那些事——LwIP开发基础与
- STM32f407平台下LWIP例程 有UCOSIII和UCOS
- lwip学习教程
- STM32嵌入式系统开发实战指南 FreeRTO
- STM32F4x7+freertos+lwip+ssl+MQTT-(MDK5)稳定
- STM32F107+LwIP 实现TCP/IP协议栈搭建
- LwIP协议栈源码详解 .pdf
- 基于AJAX方式实现的STM32H7_WebServer源码
- (基于KC705 Microblaze 的lwip echo server 实
- 原版官方稳定版本Lwip1.4.1
- KSZ8851 在lwip下的驱动程序。
- LWIP裸机实现TCPUDP通讯
- LWIP的pcb->net指向自己死机问题
- NXP LPC1768 Rtthread/裸机+lwip WEB网页A
- 嵌入式网络那些事-STM32物联实战 百度
- stm32cube+lwip无法PING通,解决思路
- lwip官方文档英文 lwip移植优化必备
评论
共有 条评论