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

西安网站建设收费标准seo如何优化网站推广

西安网站建设收费标准,seo如何优化网站推广,wordpress 获取下一篇,廊坊学校网站建设1.列表与列表项概念及结构体介绍 1.1列表项简介 列表相当于链表,列表项相当于节点,FreeRTOS 中的列表是一个双向环形链表 1.2 列表、列表项、迷你列表项结构体 1)列表结构体 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函数介绍

1)void vListInitialise(List_t * const pxList)
形参:pxList 待初始化列表项
描述:初始化列表,pxIndex 指向 xListEnd,xListEnd为oxFFFFFF
2)void vListInitialiseItem( ListItem_t * const pxItem )
形参: pxItem 带初始化列表项
描述: 初始化列表项,列表项所在列表为空,pxItem->pxContainer = NULL
3void vListInsertEnd ( List_t * const pxList , ListItem_t * const pxNewList)
形参:pxList 列表
pxNewListItem 待插入列表项 ,,无序的插入方法
描述:列表末尾插入列表项
4)void vListInsert ( List_t * const pxList , ListItem_t * const pxNewListItem )
形参:pxList 列表
pxNewListItem 待插入列表项
描述: 列表插入列表项,有序地插入到列表中
5)UBaseType_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);#endif

3.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,2,3,打印列表及列表项地址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.hkea.cn/news/982234/

相关文章:

  • 西安做网站企业网址怎么申请
  • 专业网站建设品牌百度指数里的资讯指数是什么
  • 做网站规避什么网站制作
  • 网站开发工作方案2022拉人头最暴利的app
  • 网站建设好还是阿里巴巴好磁力猫torrent kitty
  • wordpress跨域访问前端优化网站
  • 住房和城乡建设部网站买卖合同北京中文seo
  • WordPress自己安装了插件深圳seo推广外包
  • 建立网站舆情分析报告范文
  • wordpress 空格 插件班级优化大师app
  • 成都有实力的网站建设网络培训心得
  • 中企高呈建设网站在百度怎么创建自己的网站
  • 女的和女的做那个视频网站怎么在网上做网络营销
  • 网站开发需要什么软件百度怎样发布作品
  • 专门做宠物食品的网站市场调研怎么做
  • 兰州网站建设q.479185700棒成年s8视频加密线路
  • 付费网站推广seo关键词排名优化怎么收费
  • 网站由那些组成google网页搜索
  • 对一个网站做性能测试谷歌paypal官网入口
  • 北京住房投资建设中心网站首页快速排名怎么做
  • 中国网站制作 第一个佛山网站优化
  • thinkphp做的教育网站微商引流推广
  • 做特卖网站手机版电商最好卖的十大产品
  • 怎样做网站平叿trinseo公司
  • 北京大兴最专业的网站建设公司如何推广一个项目
  • 网页设计最牛的网站建设宁波网站优化公司哪家好
  • 建设通查询如何做网站推广及优化
  • 城乡建设网站首页百度seo收录软件
  • 永久免费建个人网站培训网站建设
  • 如何使用jq做弹幕网站好用的磁力搜索引擎