摘要: 1、概述 **华 润 微 集 成 电 路 ( 无 锡 ) 有 限 公 司** CS2109 是一款具有低噪声放大器和 ADC 功能的低功耗可编程传感器专用检测电路, 专门为需要直接接模拟信号的各式传感器应用产品所设计。比如光电式烟雾报警器,可 燃气体探测器,电子测量仪器、环境监控、手持式测量工具、家 阅读全文
posted @ 2022-10-17 16:00 孤走 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 这里只讲代码,理论自已先理解 Tout = ((arr+1)*(psc+1))/Tclk ; 1S = ( (9999+1) * (7199+1))/72000000 => 1S = ( (TIM_Period+1) * (TIM_Prescaler+1))/定时器时钟 **步骤:** ## 1.开 阅读全文
posted @ 2022-06-08 20:21 孤走 阅读(223) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> int DTG[8]={0,0,0,0,0,0,0,0}; ///是十进制转二进制 int dectobin(int n) { int sum = 阅读全文
posted @ 2022-06-05 16:01 孤走 阅读(234) 评论(0) 推荐(0) 编辑
摘要: ## RCC_HSE配置到72MHZ,编程步骤: 0,RCC外设初始化成复位状态 1,打开HSE 2,等待外部高速时钟稳定且就绪 3.使能FLASH 预存取缓冲区 4,设置PLL时钟源和倍频系数 5,使能PLL 6,等待PLL准备就绪 7,设置AHB预分频器 8,设置APB1预分频器 9,设置APB 阅读全文
posted @ 2022-06-01 17:09 孤走 阅读(182) 评论(0) 推荐(0) 编辑
摘要: ## 编译时 gcc xx.c -o xx -pthread #include <stdio.h> #include <sys/types.h> #include <sys/ipc.h> #include <stdlib.h> #include <sys/msg.h> #include <strin 阅读全文
posted @ 2022-05-16 09:40 孤走 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 线程的互斥:使用线程互斥锁 初始化锁 #include <pthread.h> int pthread_mutex_init(pthread_mutex_t *restrict mutex,const pthread_mutexattr_t *restrict attr); 功能: 初始化互斥锁 参 阅读全文
posted @ 2022-05-15 20:39 孤走 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 线程的同步:用的是信号灯来实现 1. 线程信号灯的初始化 - include <semaphore.h> - sem_t sem; int sem_init(sem_t *sem, int pshared, unsigned int value); ****编译时后面如**gcc xx.c -o x 阅读全文
posted @ 2022-05-15 18:59 孤走 阅读(15) 评论(0) 推荐(0) 编辑
摘要: ## 标题队列:先进先出 对数据进行分类(存储的时候分类) 操作: 1. 创建或者获取消息队列 1. 写入或者读取数据 2. 删除消息队列 ## 标题创建或者获取消息队列:#include <sys/types.h>#include <sys/ipc.h>#include <sys/msg.h>in 阅读全文
posted @ 2022-05-15 13:50 孤走 阅读(42) 评论(0) 推荐(0) 编辑
摘要: **tonly.c** ```c#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <fcntl. 阅读全文
posted @ 2022-05-14 20:11 孤走 阅读(28) 评论(0) 推荐(0) 编辑
摘要: xx.c ```c#include <stdio.h>#include <sys/types.h>#include <sys/ipc.h>#include <stdlib.h>#include <sys/shm.h>#include <unistd.h>#include <sys/sem.h>int 阅读全文
posted @ 2022-05-14 19:02 孤走 阅读(21) 评论(0) 推荐(0) 编辑