当前位置: 首页 > news >正文

企业网站建设方案怎么写网站建设咨询中心

企业网站建设方案怎么写,网站建设咨询中心,做网站 单页数量,电子产品定制开发1.列表与列表项概念及结构体介绍 1.1列表项简介 列表相当于链表#xff0c;列表项相当于节点#xff0c;FreeRTOS 中的列表是一个双向环形链表 1.2 列表、列表项、迷你列表项结构体 1#xff09;列表结构体 typedef struct xLIST { listFIRST_LIST_INTEGRITY_CHECK_VAL…1.列表与列表项概念及结构体介绍 1.1列表项简介 列表相当于链表列表项相当于节点FreeRTOS 中的列表是一个双向环形链表 1.2 列表、列表项、迷你列表项结构体 1列表结构体 typedef struct xLIST { listFIRST_LIST_INTEGRITY_CHECK_VALUE /* 校验值 / volatile UBaseType_t uxNumberOfItems; / 列表中的列表项数量 / ListItem_t * configLIST_VOLATILE pxIndex / 用于遍历列表项的指针 / MiniListItem_t xListEnd / 末尾列表项 / listSECOND_LIST_INTEGRITY_CHECK_VALUE / 校验值 / } List_t; 列表结构体示意图 2列表结构体 struct xLIST_ITEM { listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE / 用于检测列表项的数据完整性 / configLIST_VOLATILE TickType_t xItemValue / 列表项的值 / struct xLIST_ITEM * configLIST_VOLATILE pxNext / 下一个列表项 / struct xLIST_ITEM * configLIST_VOLATILE pxPrevious / 上一个列表项 / void * pvOwner / 列表项的拥有者 通常是任务控制块/ struct xLIST * configLIST_VOLATILE pxContainer; / 列表项所在列表 / listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE / 用于检测列表项的数据完整性 / }; typedef struct xLIST_ITEM ListItem_t; 2迷你结构体 迷你列表项也是列表项但迷你列表项仅用于标记列表的末尾和挂载其他插入列表中的列表项 struct xMINI_LIST_ITEM { listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE / 用于检测数据完整性 / configLIST_VOLATILE TickType_t xItemValue; / 列表项的值 / struct xLIST_ITEM * configLIST_VOLATILE pxNext; / 上一个列表项 / struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; / 下一个列表项 */ }; typedef struct xMINI_LIST_ITEM MiniListItem_t; 2.列表相关API函数介绍 1void vListInitialise(List_t * const pxList) 形参pxList 待初始化列表项 描述初始化列表pxIndex 指向 xListEndxListEnd为oxFFFFFF 2void vListInitialiseItem( ListItem_t * const pxItem ) 形参 pxItem 带初始化列表项 描述 初始化列表项,列表项所在列表为空pxItem-pxContainer NULL 3void vListInsertEnd ( List_t * const pxList , ListItem_t * const pxNewList 形参pxList 列表 pxNewListItem 待插入列表项 无序的插入方法 描述列表末尾插入列表项 4void vListInsert ( List_t * const pxList , ListItem_t * const pxNewListItem ) 形参pxList 列表 pxNewListItem 待插入列表项 描述 列表插入列表项有序地插入到列表中 5UBaseType_t uxListRemove ( ListItem_t * const pxItemToRemove ) 形参pxItemToRemove 待移除列表项 返回值整数 待移除列表项移除后所在列表剩余列表项的数量 描述列表移除列表项 3列表项的插入和删除实验free_ 3.1freertos_demo.h #ifndef __FREERTOS_DEMO_H #define __FREERTOS_DEMO_H//定义freeRTOS实验函数 void freertos_demo(void);#endif3.1freertos_demo.c #include freertos_demo.h #include ./SYSTEM/usart/usart.h #include ./BSP/LCD/lcd.h #include ./BSP/KEY/key.h /*FreeRTOS*********************************************************************************************/ #include FreeRTOS.h #include task.h///******************************************************************************************************/ //1.定义start_task配置与task任务配置以及声明列表项1.2.3 //1.1 start_task任务配置、包括栈大小、任务优先级、任务句柄以及start_task()函数定义 #define START_TASK_PRIO 1 #define START_STK_SIZE 128 TaskHandle_t g_start_task_handler; void start_task(void* pvParameters);//1.2 task1任务配置 #define TASK1_PRIO 2 #define TASK1_SIZE 128 TaskHandle_t g_task1_handler; void task1(void* pvParameters);//1.3 列表与列表项1、2、3声明 List_t test_list; ListItem_t list_item1; ListItem_t list_item2; ListItem_t list_item3;//2.创建freertos_demo()函数在此函数中创建start_task任务并开始任务调度 void freertos_demo(void) {//2.1创建任务satrt_taskxTaskCreate( (TaskFunction_t) start_task, //函数地址(char *) start_task, //函数名称(uint16_t) START_STK_SIZE, //栈大小(void *) NULL, //传递给任务函数参数(UBaseType_t) START_TASK_PRIO, //任务优先级(TaskHandle_t *) g_start_task_handler ); //任务句柄//2.2 开启任务调度器vTaskStartScheduler(); }//3.创建start_task函数中创建任务task1,并删除start_task任务 void start_task(void* pvParameters) {//3.2 设置临界代码保护taskENTER_CRITICAL();//3.1创建任务task1xTaskCreate( (TaskFunction_t) task1, //函数地址(char *) task1, //函数名称(uint16_t) TASK1_SIZE, //栈大小(void *) NULL, //传递给任务函数参数(UBaseType_t) TASK1_PRIO, //任务优先级(TaskHandle_t *) g_task1_handler ); //任务句柄//3.3 删除任务start_taskvTaskDelete(g_start_task_handler);taskEXIT_CRITICAL();}//4.在task1()函数中进行列表项与列表项的初始化、地址打印、插入与删除 void task1(void* pvParameters) {//4.1 初始化列表和列表项的地址vListInitialise(test_list);vListInitialiseItem(list_item1);vListInitialiseItem(list_item2);vListInitialiseItem(list_item3);//4.2打印列表和各列表项的地址printf(/**************第二步打印列表和列表项的地址**************/\r\n);printf(项目\t\t\t地址\r\n);printf(test_list\t\t0x%p\t\r\n, test_list);printf(test_list-pxIndex\t0x%p\t\r\n, test_list.pxIndex);printf(test_list-xListEnd\t0x%p\t\r\n, (test_list.xListEnd));printf(list_item1\t\t0x%p\t\r\n, list_item1);printf(list_item2\t\t0x%p\t\r\n, list_item2);printf(list_item3\t\t0x%p\t\r\n, list_item3);printf(/**************************结束***************************/\r\n);//4.3设置key0插入列表项1,23打印列表及列表项地址printf(按下KEY0键继续!\r\n\r\n\r\n);while(key_scan(0) ! KEY0_PRES){vTaskDelay(10);}printf(/**************第三步插入列表项1,2,3打印列表和列表项的地址**************/\r\n);vListInsert(test_list,list_item1);vListInsert(test_list,list_item2);vListInsert(test_list,list_item3);printf(项目\t\t\t\t地址\r\n);printf(test_list-xListEnd-pxNext\t0x%p\r\n, (test_list.xListEnd.pxNext));printf(test_list-xListEnd-pxPrevious\t0x%p\r\n, (test_list.xListEnd.pxPrevious));printf(list_item1-pxNext\t\t0x%p\r\n, (list_item1.pxNext));printf(list_item1-pxPrevious\t\t0x%p\r\n, (list_item1.pxPrevious));printf(list_item2-pxNext\t\t0x%p\r\n, (list_item2.pxNext));printf(list_item2-pxPrevious\t\t0x%p\r\n, (list_item2.pxPrevious));printf(list_item3-pxNext\t\t0x%p\r\n, (list_item3.pxNext));printf(list_item3-pxPrevious\t\t0x%p\r\n, (list_item3.pxPrevious));printf(/**************************结束***************************/\r\n);//4.4设置key0删除列表项2打印列表及列表项地址printf(按下KEY0键继续!\r\n\r\n\r\n);while(key_scan(0) ! KEY0_PRES){vTaskDelay(10);}printf(/*******************第六步移除列表项2********************/\r\n);uxListRemove(list_item2);printf(项目\t\t\t\t地址\r\n);printf(test_list-xListEnd-pxNext\t0x%p\r\n, (test_list.xListEnd.pxNext));printf(test_list-xListEnd-pxPrevious\t0x%p\r\n, (test_list.xListEnd.pxPrevious));printf(list_item1-pxNext\t\t0x%p\r\n, (list_item1.pxNext));printf(list_item1-pxNext\t\t0x%p\r\n, (list_item1.pxNext));printf(list_item3-pxPrevious\t\t0x%p\r\n, (list_item3.pxPrevious));printf(list_item3-pxPrevious\t\t0x%p\r\n, (list_item3.pxPrevious));printf(/**************************结束***************************/\r\n);//4.5设置key0尾插法插入列表项3打印列表及列表项地址printf(按下KEY0键继续!\r\n\r\n\r\n);while(key_scan(0) ! KEY0_PRES){vTaskDelay(10);}printf(/*******************第六步尾差法插入列表项2********************/\r\n);vListInsertEnd(test_list,list_item2);printf(项目\t\t\t\t地址\r\n);printf(test_list-xListEnd-pxNext\t0x%p\r\n, (test_list.xListEnd.pxNext));printf(test_list-xListEnd-pxPrevious\t0x%p\r\n, (test_list.xListEnd.pxPrevious));printf(list_item1-pxNext\t\t0x%p\r\n, (list_item1.pxNext));printf(list_item1-pxNext\t\t0x%p\r\n, (list_item1.pxNext));printf(list_item3-pxPrevious\t\t0x%p\r\n, (list_item3.pxPrevious));printf(list_item3-pxPrevious\t\t0x%p\r\n, (list_item3.pxPrevious));printf(list_item2-pxPrevious\t\t0x%p\r\n, (list_item2.pxPrevious));printf(list_item2-pxPrevious\t\t0x%p\r\n, (list_item2.pxPrevious));printf(/**************************结束***************************/\r\n); }
http://www.dnsts.com.cn/news/12403.html

相关文章:

  • 哈尔滨网站设计小程序开发定制外包15
  • a站app制作装饰公司网站
  • 怎样登录韵网网站浅谈一下网络营销的几个误区
  • 培训方案网站建设wordpress实现预览
  • 怎样做网站分流赚钱庄河市城乡规划建设局网站
  • 深圳画册设计网站wordpress yeti2.0
  • 网站负责人可以备案织梦网站程序安装
  • 大型网站的制作国内网站开发平台哪家强
  • 制作自己的网站合肥生态丽景网站建设
  • 做招聘信息的网站有哪些搭建本地网站做色流
  • 公司网站制作申请报告深圳专业高端网站建设多少钱
  • 网站名称创意大全北京正规网站建设公司
  • 维护网站的职位叫什么网站制作套餐
  • 湖北网站设计制作公司有哪些搜索引擎优化包括哪些方面
  • 呼和浩特做网站的地方做网站公司汉狮价格
  • 站长检测同ip网站很多怎么办产品设计需要学的软件
  • 网站兼容性代码比百度更好的网站
  • 怎么做推广和宣传企业做网站seo排名优化培训班
  • 官网和门户网站的区别软件开发专业哪个学校好
  • 网站建设学生选课课程设计报告网络营销案例ppt
  • 网站开发类合同asp.net mvc做网站难吗
  • 手机网站制作哪家公司好做网站运营如何提升用户粘度
  • 网站建设印花税网站建设服务外包
  • 做网站是要写代码的吗广州室内设计培训学校
  • 流量网站建设教程黑客如何攻击网站
  • 网站服务内容有哪些电子商务网站建设管理
  • 邢台网站制作公司wordpress自适应极简主题
  • 网页游戏网站下载微信做明天展现网站要多少钱
  • 天津专门做网站的公司的电话深圳企业黄页
  • 沈阳智能模板建站私密性最好的浏览器