摘要: 一、 概述 将RGB图片打在YUV上需要注意的是, 字体之外应该透明, 否则背景也会被覆盖不好看, 所以RGB必须有透明度, 本测试格式为BMP ARGB8888(也即B是最低字节, A是最高字节), YUV格式为NV21(YUV420SP), 第一步是将ARGB转换成NV21, 然后小NV21打在 阅读全文
posted @ 2020-09-09 11:24 Vedic 阅读(990) 评论(0) 推荐(0) 编辑
摘要: 一、介绍 BMP文件格式,又称为位图,是Windows系统中广泛使用的图像文件格式。 BMP文件的数据分为四个部分: bmp文件头(bmp file header):提供文件的格式、大小等信息 位图信息头(bitmap information):提供图像数据的尺寸、位平面数、压缩方式、颜色索引等信息 阅读全文
posted @ 2020-09-03 16:58 Vedic 阅读(1622) 评论(0) 推荐(0) 编辑
摘要: #include int checkCPU() { union w{ int a; char b; }c; c.a = 1; return (c.b == 1); } int main() { printf("This CPU is %s\n", checkCPU() ? "little" : "big"); ... 阅读全文
posted @ 2019-07-17 16:12 Vedic 阅读(445) 评论(0) 推荐(0) 编辑
摘要: #include #define LINUX_REBOOT_CMD_RESTART 0x01234567 int main() { reboot(LINUX_REBOOT_CMD_RESTART); return 0; } 阅读全文
posted @ 2019-07-17 16:09 Vedic 阅读(322) 评论(0) 推荐(0) 编辑
摘要: /* main.c */ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <unist 阅读全文
posted @ 2019-07-17 16:06 Vedic 阅读(603) 评论(0) 推荐(0) 编辑
摘要: /* uart_tx.c */ #include #include #include #include #include #include #include #include #include #include #define TEST_LEN (1024 * 400) static char *dev_name = "/dev/ttyS2"; static int bau... 阅读全文
posted @ 2019-07-17 15:48 Vedic 阅读(1160) 评论(0) 推荐(0) 编辑
摘要: 一. 整体介绍 soft lockup:检测调度异常, 一般是驱动禁止调度或者阻塞比如while(1), 导致无法调度其他线程, 需要注意的是, 应用程序while(1)不会影响其调度, 只要有更高的优先级出现会在时间滴答(10ms)选中并切换进程, 但如果是在驱动也即内核态, 即使有更高优先级时间 阅读全文
posted @ 2019-07-16 14:43 Vedic 阅读(2388) 评论(0) 推荐(0) 编辑
摘要: 我的环境 PC 端: win7 + vmware-15 ubuntu16.04开发板:Freescale i.MX6 单CPU Linux-4.1.15 交叉编译器为 arm-none-linux-gnueabi-gcc(gcc version 4.6.3) 1. 前言 上篇博文介绍了应用程序调试工 阅读全文
posted @ 2019-07-10 17:01 Vedic 阅读(5713) 评论(2) 推荐(1) 编辑
摘要: 我的环境 PC 端: CPU:x86_64, 系统:Ubuntu,IP:172.16.2.212开发板:CPU:sw9820c,系统:openwrt linux,IP:172.16.30.20PC端安装的 C 交叉编译器为 arm-none-linux-gnueabi-gcc(gcc version 阅读全文
posted @ 2019-06-28 18:11 Vedic 阅读(6354) 评论(0) 推荐(0) 编辑
摘要: 参考 代码:linux-3.10.65/kernel/workqueue.c 1. workqueue 是什么? workqueue是对内核线程封装的用于处理各种工作项的一种处理方法, 由于处理对象是用链表拼接一个个工作项, 依次取出来处理, 然后从链表删除,就像一个队列排好队依次处理一样, 所以也 阅读全文
posted @ 2019-06-22 16:15 Vedic 阅读(19632) 评论(4) 推荐(2) 编辑