摘要:网线连接到电脑上开启DHCP自动获取ip地址,一定要在电脑还是那个开启网络共享, 可看以下链接:原文链接:https://blog.csdn.net/Dontla/article/details/132422418 #include "spi.h" SPI_HandleTypeDef g_spi1_
阅读全文
摘要:DHCP 服务器(Dynamic Host Configuration Protocol,动态主机配置协议),它是网络中用于自动分配 IP 地址和相关网络配置的核心服务。以下是详细解释: 1. DHCP 服务器的作用 DHCP 服务器的核心功能是 自动分配 IP 地址 和网络参数,简化网络管
阅读全文
摘要://定时器7是普通计数器,只提供定时的功能开启中断只有一个中断没有//__HAL_TIM_ENABLE_IT(&htim7,TIM_IT_UPDATE);更新中断加上这个就会死机 void TIM7_Init(void) { TIM_MasterConfigTypeDef sMasterConfig
阅读全文
摘要:#include "usart1.h" #include "main.h" #include "stdio.h" #include "string.h" #include "stdbool.h" #include "stdlib.h" #ifdef __GNUC__ /* With GCC, sma
阅读全文
摘要:FATFS一直是直接到fatfs官网上下载文件代码 移植只需要这几个代码, diskio.c是文件中需要更改驱动的代码,更改的驱动如下: #include "ff.h" /* Obtains integer types */ #include "diskio.h" /* Declarations o
阅读全文
摘要:#include "main.h" #include <stdio.h> #include <string.h> #include <stdbool.h> #include <stdlib.h> #include "sd.h" SD_HandleTypeDef hsd; // SDIO句柄 DMA_
阅读全文
摘要:16位计数器ARR最大到65535 /* * Encoder.c * * Created on: Feb 27, 2025 * Author: 13624 */ #include "main.h" #include "Encoder.h" #include "tim.h" #define DIR_U
阅读全文
摘要:关于usart串口收发信息网上能搜到很多相关资料,但大都是只能是有限的字符,有的能发不限字符,但大部分不能直接用,对新手来说不是很友好。按以下做,其实很简单就能实现 1、配置USART1,选择异步asynchronous,软件自动配置了PA9和PA10管脚 2、配置时钟树,我用默认的,然后生成代码。
阅读全文