日本黄色一级经典视频|伊人久久精品视频|亚洲黄色色周成人视频九九九|av免费网址黄色小短片|黄色Av无码亚洲成年人|亚洲1区2区3区无码|真人黄片免费观看|无码一级小说欧美日免费三级|日韩中文字幕91在线看|精品久久久无码中文字幕边打电话

當(dāng)前位置:首頁 > 單片機(jī) > 單片機(jī)
[導(dǎo)讀] 之前在裸機(jī)環(huán)境下移植了lwip,功能還是很強(qiáng)大的,但是就我看來,這和uip其實(shí)差別也不大,其實(shí)lwip更強(qiáng)大的功能需要在操作系統(tǒng)之下才能發(fā)揮出來,今天就來做這個(gè) 首先我們需要移植操作系統(tǒng),系統(tǒng)選擇ucos2.91,移植

之前在裸機(jī)環(huán)境下移植了lwip,功能還是很強(qiáng)大的,但是就我看來,這和uip其實(shí)差別也不大,其實(shí)lwip更強(qiáng)大的功能需要在操作系統(tǒng)之下才能發(fā)揮出來,今天就來做這個(gè)

首先我們需要移植操作系統(tǒng),系統(tǒng)選擇ucos2.91,移植過程網(wǎng)上都有,我就寫點(diǎn)不同的

配置文件修改如下

/* ---------------------- MISCELLANEOUS ----------------------- */

#define OS_APP_HOOKS_EN 0u /* Application-defined hooks are called from the uC/OS-II hooks */

#define OS_ARG_CHK_EN 0u /* Enable (1) or Disable (0) argument checking */

#define OS_CPU_HOOKS_EN 1u /* uC/OS-II hooks are found in the processor port files */


#define OS_DEBUG_EN 0u /* Enable(1) debug variables */


#define OS_EVENT_MULTI_EN 0u /* Include code for OSEventPendMulti() */

#define OS_EVENT_NAME_EN 0u /* Enable names for Sem, Mutex, Mbox and Q */


#define OS_LOWEST_PRIO 63u /* Defines the lowest priority that can be assigned ... */

/* ... MUST NEVER be higher than 254! */


#define OS_MAX_EVENTS 10u /* Max. number of event control blocks in your application */

#define OS_MAX_FLAGS 5u /* Max. number of Event Flag Groups in your application */

#define OS_MAX_MEM_PART 0u /* Max. number of memory partitions */

#define OS_MAX_QS 5u /* Max. number of queue control blocks in your application */

#define OS_MAX_TASKS 10u /* Max. number of tasks in your application, MUST be >= 2 */


#define OS_SCHED_LOCK_EN 1u /* Include code for OSSchedLock() and OSSchedUnlock() */


#define OS_TICK_STEP_EN 1u /* Enable tick stepping feature for uC/OS-View */

#define OS_TICKS_PER_SEC 200u /* Set the number of ticks in one second 1000/200 = 5 5ms中斷一次 */



/* --------------------- TASK STACK SIZE ---------------------- */

#define OS_TASK_TMR_STK_SIZE 128u /* Timer task stack size (# of OS_STK wide entries) */

#define OS_TASK_STAT_STK_SIZE 128u /* Statistics task stack size (# of OS_STK wide entries) */

#define OS_TASK_IDLE_STK_SIZE 128u /* Idle task stack size (# of OS_STK wide entries) */



/* --------------------- TASK MANAGEMENT ---------------------- */

#define OS_TASK_CHANGE_PRIO_EN 1u /* Include code for OSTaskChangePrio() */

#define OS_TASK_CREATE_EN 1u /* Include code for OSTaskCreate() */

#define OS_TASK_CREATE_EXT_EN 1u /* Include code for OSTaskCreateExt() */

#define OS_TASK_DEL_EN 1u /* Include code for OSTaskDel() */

#define OS_TASK_NAME_EN 1u /* Enable task names */

#define OS_TASK_PROFILE_EN 1u /* Include variables in OS_TCB for profiling */

#define OS_TASK_QUERY_EN 1u /* Include code for OSTaskQuery() */

#define OS_TASK_REG_TBL_SIZE 1u /* Size of task variables array (#of INT32U entries) */

#define OS_TASK_STAT_EN 1u /* Enable (1) or Disable(0) the statistics task */

#define OS_TASK_STAT_STK_CHK_EN 1u /* Check task stacks from statistic task */

#define OS_TASK_SUSPEND_EN 1u /* Include code for OSTaskSuspend() and OSTaskResume() */

#define OS_TASK_SW_HOOK_EN 1u /* Include code for OSTaskSwHook() */



/* ----------------------- EVENT FLAGS ------------------------ */

#define OS_FLAG_EN 1u /* Enable (1) or Disable (0) code generation for EVENT FLAGS */

#define OS_FLAG_ACCEPT_EN 1u /* Include code for OSFlagAccept() */

#define OS_FLAG_DEL_EN 1u /* Include code for OSFlagDel() */

#define OS_FLAG_NAME_EN 1u /* Enable names for event flag group */

#define OS_FLAG_QUERY_EN 1u /* Include code for OSFlagQuery() */

#define OS_FLAG_WAIT_CLR_EN 1u /* Include code for Wait on Clear EVENT FLAGS */

#define OS_FLAGS_NBITS 16u /* Size in #bits of OS_FLAGS data type (8, 16 or 32) */



/* -------------------- MESSAGE MAILBOXES --------------------- */

#define OS_MBOX_EN 1u /* Enable (1) or Disable (0) code generation for MAILBOXES */

#define OS_MBOX_ACCEPT_EN 1u /* Include code for OSMboxAccept() */

#define OS_MBOX_DEL_EN 1u /* Include code for OSMboxDel() */

#define OS_MBOX_PEND_ABORT_EN 1u /* Include code for OSMboxPendAbort() */

#define OS_MBOX_POST_EN 1u /* Include code for OSMboxPost() */

#define OS_MBOX_POST_OPT_EN 1u /* Include code for OSMboxPostOpt() */

#define OS_MBOX_QUERY_EN 1u /* Include code for OSMboxQuery() */



/* --------------------- MEMORY MANAGEMENT -------------------- */

#define OS_MEM_EN 1u /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */

#define OS_MEM_NAME_E

本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點(diǎn),本站亦不保證或承諾內(nèi)容真實(shí)性等。需要轉(zhuǎn)載請(qǐng)聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請(qǐng)及時(shí)聯(lián)系本站刪除( 郵箱:macysun@21ic.com )。
換一批
延伸閱讀
關(guān)閉