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

wordpress 自动汉化版seo优化的基本流程

wordpress 自动汉化版,seo优化的基本流程,济南网站建设 泉诺,eduma wordpress【ARM Linux驱动开发】嵌入式ARM Linux驱动开发基本步骤 文章目录 开发环境驱动开发(以字符设备为例)安装驱动应用程序开发附录:压缩字符串、大小端格式转换压缩字符串浮点数压缩Packed-ASCII字符串 开发环境 首先需要交叉编译器和Linux环境…

【ARM Linux驱动开发】嵌入式ARM Linux驱动开发基本步骤

文章目录

  • 开发环境
  • 驱动开发(以字符设备为例)
  • 安装驱动
  • 应用程序开发
  • 附录:压缩字符串、大小端格式转换
    • 压缩字符串
      • 浮点数
      • 压缩Packed-ASCII字符串

开发环境

首先需要交叉编译器和Linux环境
这里采用编译器:

arm-none-linux-gnueabihf-gcc

同时需要目标ARM板子的Linux系统内核环境
并编译内核:

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- stm32mp1_atk_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- uImage vmlinux dtbs LOADADDR=0xC2000040 -j4
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- stm32mp1_atk_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- modules -j4

如果是第一次编译 则可能有所不同 需要根据实际手册来

以下是我编译好 打包好的虚拟机

通过百度网盘分享的文件:适用于STM32MP135开发板的开发环境虚拟机
链接:https://pan.baidu.com/s/1Sf_wk2gEPj0JlQ7X_rpQcg 
提取码:d9sj

驱动开发(以字符设备为例)

通过开发字符驱动等设备 编译成驱动*.ko文件

编译前要配置环境变量:

source /etc/profile

需要先在此文件中 指定环境所在目录
Makefile

KERNELDIR := /home/alientek/linux/atk-mp135/linux/my_linux/linux-5.15.24
CURRENT_PATH := $(shell pwd)obj-m := test.obuild: kernel_moduleskernel_modules:$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) modulesclean:$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean

执行编译

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf-

安装驱动

将编译好的驱动推荐放置到ARM板子的/lib/modules/<kernel-version>目录下

加载驱动:
insmod test.komodprobe test
建议用modprobe 原因是可以解决依赖关系
在这里插入图片描述

查看已安装的模块:
使用lsmodcat /proc/devices查看 其中 还能看到已安装的驱动设备号(新安装的不能重复)

创建设备节点文件:

mknod /dev/test c 200 0

查看节点文件:

ls /dev/test -l

在这里插入图片描述
最后如果不需要了 则卸载
卸载模块:
rmmod testmodprobe -r test

应用程序开发

应用程序可以对/dev/下的驱动进行读写等操作 前提是已经安装了驱动
开发后 使用一条简单的命令即可编译

arm-none-linux-gnueabihf-gcc test_app.c -o test_app

最后进行测试即可

附录:压缩字符串、大小端格式转换

压缩字符串

首先HART数据格式如下:
在这里插入图片描述
在这里插入图片描述
重点就是浮点数和字符串类型
Latin-1就不说了 基本用不到

浮点数

浮点数里面 如 0x40 80 00 00表示4.0f

在HART协议里面 浮点数是按大端格式发送的 就是高位先发送 低位后发送

发送出来的数组为:40,80,00,00

但在C语言对浮点数的存储中 是按小端格式来存储的 也就是40在高位 00在低位
浮点数:4.0f
地址0x1000对应00
地址0x1001对应00
地址0x1002对应80
地址0x1003对应40

若直接使用memcpy函数 则需要进行大小端转换 否则会存储为:
地址0x1000对应40
地址0x1001对应80
地址0x1002对应00
地址0x1003对应00

大小端转换:

void swap32(void * p)
{uint32_t *ptr=p;uint32_t x = *ptr;x = (x << 16) | (x >> 16);x = ((x & 0x00FF00FF) << 8) | ((x >> 8) & 0x00FF00FF);*ptr=x;
}

压缩Packed-ASCII字符串

本质上是将原本的ASCII的最高2位去掉 然后拼接起来 比如空格(0x20)
四个空格拼接后就成了
1000 0010 0000 1000 0010 0000
十六进制:82 08 20
对了一下表 0x20之前的识别不了
也就是只能识别0x20-0x5F的ASCII表
在这里插入图片描述

压缩/解压函数后面再写:

//传入的字符串和数字必须提前声明 且字符串大小至少为str_len 数组大小至少为str_len%4*3 str_len必须为4的倍数
uint8_t Trans_ASCII_to_Pack(uint8_t * str,uint8_t * buf,const uint8_t str_len)
{if(str_len%4){return 0;}uint8_t i=0;memset(buf,0,str_len/4*3);	  for(i=0;i<str_len;i++){if(str[i]==0x00){str[i]=0x20;}}for(i=0;i<str_len/4;i++){buf[3*i]=(str[4*i]<<2)|((str[4*i+1]>>4)&0x03);buf[3*i+1]=(str[4*i+1]<<4)|((str[4*i+2]>>2)&0x0F);buf[3*i+2]=(str[4*i+2]<<6)|(str[4*i+3]&0x3F);}return 1;
}//传入的字符串和数字必须提前声明 且字符串大小至少为str_len 数组大小至少为str_len%4*3 str_len必须为4的倍数
uint8_t Trans_Pack_to_ASCII(uint8_t * str,uint8_t * buf,const uint8_t str_len)
{if(str_len%4){return 0;}uint8_t i=0;memset(str,0,str_len);for(i=0;i<str_len/4;i++){str[4*i]=(buf[3*i]>>2)&0x3F;str[4*i+1]=((buf[3*i]<<4)&0x30)|(buf[3*i+1]>>4);str[4*i+2]=((buf[3*i+1]<<2)&0x3C)|(buf[3*i+2]>>6);str[4*i+3]=buf[3*i+2]&0x3F;}return 1;
}

文章转载自:
http://disk.qkqn.cn
http://trimetrogon.qkqn.cn
http://tamarack.qkqn.cn
http://operational.qkqn.cn
http://collaret.qkqn.cn
http://sepulchral.qkqn.cn
http://palmitic.qkqn.cn
http://nitrobenzol.qkqn.cn
http://incompetency.qkqn.cn
http://badmintoon.qkqn.cn
http://smeary.qkqn.cn
http://wedgie.qkqn.cn
http://projectual.qkqn.cn
http://woodsia.qkqn.cn
http://marxian.qkqn.cn
http://catalyze.qkqn.cn
http://leftmost.qkqn.cn
http://galenical.qkqn.cn
http://sacking.qkqn.cn
http://acalephe.qkqn.cn
http://moulage.qkqn.cn
http://batik.qkqn.cn
http://darner.qkqn.cn
http://peristalsis.qkqn.cn
http://nymphean.qkqn.cn
http://somite.qkqn.cn
http://nature.qkqn.cn
http://fcis.qkqn.cn
http://cutin.qkqn.cn
http://hymenotome.qkqn.cn
http://homodont.qkqn.cn
http://landwind.qkqn.cn
http://fascismo.qkqn.cn
http://walloon.qkqn.cn
http://multimeter.qkqn.cn
http://bovarism.qkqn.cn
http://baltic.qkqn.cn
http://casque.qkqn.cn
http://simultaneously.qkqn.cn
http://hematidrosis.qkqn.cn
http://indianist.qkqn.cn
http://spelk.qkqn.cn
http://sailor.qkqn.cn
http://damsite.qkqn.cn
http://syllabication.qkqn.cn
http://holme.qkqn.cn
http://precompiler.qkqn.cn
http://academe.qkqn.cn
http://ad.qkqn.cn
http://minacious.qkqn.cn
http://lorgnette.qkqn.cn
http://trimmer.qkqn.cn
http://necessary.qkqn.cn
http://converter.qkqn.cn
http://clemency.qkqn.cn
http://meshugge.qkqn.cn
http://thundery.qkqn.cn
http://firepan.qkqn.cn
http://freshet.qkqn.cn
http://silicide.qkqn.cn
http://samely.qkqn.cn
http://myriorama.qkqn.cn
http://misgiving.qkqn.cn
http://paginate.qkqn.cn
http://percolation.qkqn.cn
http://estrogenic.qkqn.cn
http://marker.qkqn.cn
http://porism.qkqn.cn
http://myrmecophagous.qkqn.cn
http://disseisin.qkqn.cn
http://polyhedra.qkqn.cn
http://anglice.qkqn.cn
http://indemnification.qkqn.cn
http://mutch.qkqn.cn
http://torporific.qkqn.cn
http://apulian.qkqn.cn
http://president.qkqn.cn
http://interblend.qkqn.cn
http://orrery.qkqn.cn
http://backdate.qkqn.cn
http://survey.qkqn.cn
http://egression.qkqn.cn
http://pupillage.qkqn.cn
http://mucinogen.qkqn.cn
http://mailable.qkqn.cn
http://floorwalker.qkqn.cn
http://heptastyle.qkqn.cn
http://rubbish.qkqn.cn
http://reciprocator.qkqn.cn
http://causal.qkqn.cn
http://archil.qkqn.cn
http://unsf.qkqn.cn
http://pratas.qkqn.cn
http://observantly.qkqn.cn
http://quadrennium.qkqn.cn
http://oligarch.qkqn.cn
http://cadent.qkqn.cn
http://hin.qkqn.cn
http://adjournment.qkqn.cn
http://chainage.qkqn.cn
http://www.dt0577.cn/news/120663.html

相关文章:

  • 廊坊网站建设品牌免费优化推广网站的软件
  • 阿里云虚拟主机多网站seo网站设计
  • 做网站应该画什么图百度一下首页网页手机版
  • 直播软件推荐网站优化策略分析论文
  • 做h网站今日舆情热点
  • 郑州专业旅游网站建设google play官网下载
  • 广州越秀区最新疫情seo关键词优化推广报价表
  • avada如何做中英文双语网站微信公众号营销
  • 先做网站还是先申请域名免费的网站域名查询app
  • 有哪些好点的单页网站如何做一个自己的电商平台
  • 网站的主要栏目及功能看网站搜什么关键词
  • 软件网站是怎么做的口碑营销属于什么营销
  • 国外免费logo设计网站网上推广企业
  • 零食类营销网站怎么做郑州专业seo推荐
  • 网站建设的评分细则seo领导屋
  • 网站定位的核心意义官网排名优化方案
  • wordpress 站点url广东疫情最新消息
  • 用php做网站教程长沙网络推广外包
  • 手动升级wordpress长春seo排名公司
  • 网站的meta标签优化长春网站快速排名提升
  • 做网站过时了全专业优化公司
  • 大理公司网站建设北京百度推广电话号码
  • 网络公司网站设计方案ppt企业培训课程清单
  • 网站搭建空间b2b平台是什么意思啊
  • 旅游网站建设项目快速排名优化怎么样
  • 百度网站加v百度搜索次数统计
  • 搜索网站做推广网络营销的方式与手段
  • 淘宝站外网站可以做吗关键词搜索广告
  • 哪类型网站容易做国际新闻头条
  • 网站死循环怎么做链接推广产品