
keybd_event Shift 组合键无效
关于keybd_event 配置好的shift组合键无效时的解决方案: 不生效的写法: keybd_event(16, 0, 0, 0); 生效写法: keybd_event(16, 0x2A, 0, 0); keybd_event(16,...
关于keybd_event 配置好的shift组合键无效时的解决方案: 不生效的写法: keybd_event(16, 0, 0, 0); 生效写法: keybd_event(16, 0x2A, 0, 0); keybd_event(16,...
使用aplay 播放wav文件,会发现同时只能播放一个音频文件,同时播放多个的话系统会提示audio busy,对于复杂场景如游戏音效的播放完全不符合。 解决方案: aplay -D plug:dmix success.wav & ...
最近项目用到了PNP532,官方提供了库,使用的是libnfc,但出于速度,本着使用简单就没研读具体的协议。 也是为了再各个平台方便移植。 思路是通过串口的方式用上位机进行P2P的方式,通过串口监测软件进行抓包,然后写一个简单的程序按照抓包...
头文件 #include "get_mac.h" #include #include #include #include #include #include #include #include #include #include #incl...
获取方法如下: #include #include #include #include #include #include #include #include #include #include #include #include #inc...
在Linux平台读取本地网卡IP的方法如下 #include #include #include #include #include #include #include #include #include #include #include...
最近一个项目需要使用一个定时器,周期大概10ms左右,开始尝试了windos api 的settimer ,发现 这个定时器精度很低,最小周期都要在15ms 以上,满满不满足需求,后查询资料,找到一个多媒体计时器timeSetEvent,试...
c语言字符串分割–strtok | 逗号分隔 代码,原理是使用字符串分隔函数 Strtok()函数详解: 该函数包含在”string.h”头文件中 函数原型: char* strtok (char* st...
C语言将16进制转换成浮点型float 转换方法: //0xF893DF42 //111.789 ; unsigned char buf[4] = [0xf8, 0x93, 0xdf, 0x42]; float *p = (float *)...
APDS9960是一款集成ALS、红外LED 和接近检测器的光学模块和环境亮度感测(ALS, Ambient Light Sensing)的环境亮度传感器,本文是将其驱动代码移植到STM32平台,stm32运用的stm32f103。 下面是...
在编写Linux程序的时候,在程序内部有些时候会涉及执行一些命令行内容,如ls,cat等命令,执行该命令当然也有的时候需要得到返回内容,如执行ls命令时需要返回当前目录的内容。那么如何操作呢? 答案是popen,通过popen创建一个管道,...
关于文件对比工具有很多,但是Xcode也带了对比工具,功能相对简单,但对于merge工作却也足以,Xcode自带的merge工具叫做FileMerge。 具体使用方法,打开Xcode后,点击Xcode左上角的Xcode->Open Deve...
mac下gcc/g++找不到 /usr/local/include /usr/local/lib的解决方法: // C_INCLUDE_PATH=/usr/local/include/ export C_INCLUDE_PATH CPLUS...
递归函数 void flood_array8(int x, int y, int width, int height,unsigned char * buf) { if(x >= 0 && x < height ...
解决多客户端高并发的问题,通过非阻塞的模式去轮训多个clent客户端的发送内容,进行解析。 // // main.c // 震动台server // // Created by ea huang on 2016/7/19. // Copyr...