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

php动态网站开发 pdf免费推广的网站有哪些

php动态网站开发 pdf,免费推广的网站有哪些,养生网站建设,php做企业网站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.yidumall.com/news/33350.html

相关文章:

  • 做网站有一个火箭回顶部模板网站如何建站
  • 仿淘宝网站制作江苏网站建设制作
  • 沈阳专业做网站杭州网站seo优化
  • 网络工程师需要具备什么条件网站关键词优化网站推广
  • 奉贤集团网站建设什么是核心关键词
  • 网站建设登录页面怎么写小程序开发
  • 东方网景做网站怎么样广州网络营销运营
  • 北京网站设计培训班奉节县关键词seo排名优化
  • 阿里云网站怎么建设深圳做网站的公司有哪些
  • 微商城网站建设企业推广方式
  • 做网站首页图片素材湖南seo博客seo交流
  • 网站怎么样排名app推广拉新
  • wordpress讨论区插件seo基础
  • wordpress 调用文章列表win10一键优化工具
  • 网站 技术支持企业网站有哪些
  • 建设企业网站流程成都seo排名
  • 市局政府网站建设管理情况汇报青岛推广优化
  • 各大浏览器的网址seo1搬到哪里去了
  • 网站制作结算确认函seo管理与优化期末试题
  • h5微场景制作软件开鲁网站seo
  • 有哪些做图纸的网站网站排名快速提升工具
  • 比较好的设计网站推荐b站推广网站入口202
  • 郑州网站建设 论坛北京seo网络优化招聘网
  • 网站设计开发软件预测2025年网络营销的发展
  • 企业网站四大类型seo优化排名易下拉用法
  • 国外服装定制网站西安seo学院
  • 做策划的网站推广seo岗位有哪些
  • 最早动画是如何做的视频网站沈阳市网站
  • 网站制作网页设计品牌推广运营策划方案
  • wordpress后台泰州seo公司