摘要: 大端(big endian)与小端(little endian) 如果向内存中写入一个为:0x1234的数据,大端和小端的存储方式如下。 大端(big endian):低地址存储高字节,高地址存储低字节 | 内存地址 | 0x0001 | 0x0002 | | | | | | 数据 | 0x12 | 阅读全文
posted @ 2023-02-19 00:45 荒诞的X 阅读(1793) 评论(0) 推荐(0) 编辑
摘要: #获取bit位 def get_bit(num): bit0 = num >> 0 & 0x1 bit1 = num >> 1 & 0x1 bit2 = num >> 2 & 0x1 bit3 = num >> 3 & 0x1 bit4 = num >> 4 & 0x1 bit5 = num >> 阅读全文
posted @ 2022-10-08 17:05 荒诞的X 阅读(2300) 评论(0) 推荐(0) 编辑
摘要: 设置方法 **1、**windows中已经安装有ADB,且已经配置好环境变量 2、编辑wsl中.bashrc文件,在其末尾添加如下语句,编辑后执行source ~/.bashrc # ADB export PATH=$PATH:/mnt/c/Software/adb/Sdk/platform-too 阅读全文
posted @ 2022-08-22 10:50 荒诞的X 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 安装方式 pip install pyserial python串口收发数据简单DEMO import serial import time from datetime import datetime import threading # 开启com12口,波特率115200,超时15s ser = 阅读全文
posted @ 2022-07-14 17:48 荒诞的X 阅读(35) 评论(0) 推荐(0) 编辑
摘要: import sys import binascii import can import time from datetime import datetime # 时间戳转换为真实时间 def timestamp_convert_realtime(ts): return str(datetime.f 阅读全文
posted @ 2022-05-07 14:56 荒诞的X 阅读(330) 评论(0) 推荐(0) 编辑
摘要: Markdown基础语法学习记录 **Markdown:**Markdown是一种轻量级的标记语言,可用于将格式设置元素添加到纯文本文档中。Markdown 由John Gruber于2004年创建,如今已成为世界上最受欢迎的标记语言之一。 标题 // 语法:# + 空格 + 标题名,有几个#号就是 阅读全文
posted @ 2021-01-13 12:44 荒诞的X 阅读(53) 评论(0) 推荐(0) 编辑