![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ST_HAL库指南
ynot.ink
这个作者很懒,什么都没留下…
展开
-
ST MCU HAL 库I2C读取 MLX90614温度
uint8_t Data[2]={0};float GY906(void) // Get GY906's temperature{ uint8_t Pecreg = 0; uint16_t tem = 0; float temp = 0; HAL_I2C_Mem_Read(&hi2c1,0x00,0x07,1,Data,2,0x20); tem=((Data[1]<<8)|Data[0]); if( ( TEMPERATUREMIN <= t原创 2021-10-19 11:07:42 · 672 阅读 · 0 评论 -
STM32F103json格式发送数据
在startup中设置Stack_Size合适的值,Heap_size同理;#define FREE(p) myfree((void **)&p) void myfree(void ** point){ if(*point != NULL) { free(*point); *point = NULL; }} char* out;void create_json(){ cJSON * root = cJSON_C.原创 2021-07-21 16:25:38 · 1129 阅读 · 1 评论 -
通讯模块获取时间转成时间戳HAL库
uint8_t BC20_buffer[100];void get_time(){ uint16_t x,y; HAL_UART_Transmit(&huart1,AT_CCLK,sizeof(AT_CCLK),0x40); HAL_UART_Receive(&huart1,BC20_buffer,sizeof(BC20_buffer),0X50); for(x=0;x<100;x++) { if(BC20_buffer[x]==':') { fo原创 2021-01-30 11:11:10 · 427 阅读 · 2 评论 -
STM32L151C8T6_cJSON使用心得
STM32L151C8T6 Cjson使用心得一、Cjson_print无法输出字符串增大 Stack_Size 数值,Heap_Size 数值二、输出多次后内存溢出#define FREE§ myfree((void **)&p)void myfree(void ** point){if(*point != NULL){free(*point);point = NULL;}}char out;void create_json(){ cJSON原创 2021-01-29 11:13:59 · 254 阅读 · 0 评论