随笔分类 -  c常用函数操作

常用的一些类型转换等操作
摘要:c语言实现软件spi接口,需要设备有三个IO设置为GPIO功能 阅读全文
posted @ 2020-11-23 15:01 HuDaXia 阅读(1976) 评论(0) 推荐(0)
摘要:/*两个函数实现将数字字符串转数字*/ //求 n次方 static unsigned long my_pow(int primitive ,int square){ if(square==0){ return 1; } int in=primitive; unsigned long out = p 阅读全文
posted @ 2020-11-03 19:32 HuDaXia 阅读(698) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> void StrToHex(unsigned char *pbDest, unsigned char *pbSrc, int nLen) { c 阅读全文
posted @ 2020-06-03 17:27 HuDaXia 阅读(2074) 评论(0) 推荐(0)
摘要:void short2char(uint8_t *charstr, uint16_t *shortstr, int len) { int x = 0; int y = 0; for (x; x < len; x++) { charstr[x++] = shortstr[y] >> 8; if (2 阅读全文
posted @ 2020-02-28 15:37 HuDaXia 阅读(5052) 评论(0) 推荐(0)