![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c
ding283595861
这个作者很懒,什么都没留下…
展开
-
UTC转周秒 & 具体时间接口
1. UTC转周秒 #define UNIX_GPS_DIF 315964800 // utc time base 1970.1.1; gps time base 1980.1.6, 3657 * 24 * 3600 #define GPS_TIME_LEAPSEC 18 #define SECONDS_PER_WEEK 604800//7*24*3600 int utc_to_gps_time(uint32_t *Week, double *原创 2021-11-22 15:27:59 · 1798 阅读 · 2 评论 -
linux读取解析文件中字段key=value值
** /tmp/test.txt 内容如下: test_field=23 test_field1=“test” ** ** > > int check_file_fields(const char *file, char *dst, int len) { > > #define FILEBUFSIZE 128 > > FILE *stream = NULL; > > char line[FILEBUFSIZE] = {0}; > &原创 2021-09-26 10:01:57 · 809 阅读 · 0 评论 -
linux 通过nand 存储、读取参数配置
1./dev/mtd9, 其nand块大小可以通过/proc/mtd查看。mtd9 size为0x001c0000, erasesize大小为0x20000. 2.如要存储/读取数据,可以以mtd9为列。可以调用如下接口参数: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <dirent.h> #include <原创 2020-09-28 09:03:54 · 1036 阅读 · 0 评论