摘要: c文件 static uint8_t rx_buf[MAX_485_RX_LEN] = {0}; static uint8_t rx_buf_data_cnt = DATA; static uint8_t rs485TXBuf[MAX_485_RX_LEN] = {0}; usart_device_ 阅读全文
posted @ 2023-03-06 17:23 xMofang 阅读(69) 评论(0) 推荐(0) 编辑
摘要: i2c.c #include <stdio.h> #include "dri_simulate_i2c.h" #include "dri_timer.h" /************************************************ 函数名称 : I2C_Delay 功 能 : 阅读全文
posted @ 2023-03-06 16:56 xMofang 阅读(635) 评论(0) 推荐(1) 编辑
摘要: void dri_timer_delay_init(dri_timer_calc_type type) { timer_parameter_struct ptr_time; rcu_periph_clock_enable(PERIPH_DELAY_TIMER); rcu_timer_clock_pr 阅读全文
posted @ 2023-03-06 16:46 xMofang 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 中断: void USART1_IRQHandler(void) { int data = 0; if(usart_flag_get(USART1, USART_FLAG_PERR)!= RESET) { usart_data_receive(USART1); usart_flag_clear(US 阅读全文
posted @ 2023-03-06 16:43 xMofang 阅读(203) 评论(0) 推荐(0) 编辑
摘要: #define VDDA_APPLI ((uint32_t) 3300) /* Value of analog voltage supply Vdda (unit: mV) */ #define RANGE_12BITS ((uint8_t) 12) //移位/* Max digital value 阅读全文
posted @ 2023-03-06 16:29 xMofang 阅读(291) 评论(0) 推荐(0) 编辑