stm32的HAL庫i2c從機實現

stm32的i2c默認就是slave模式,本文基於HAL庫實現中斷方式的接收和發送,首先是初始化gpio和i2c,代碼以下:函數 I2C_HandleTypeDef I2cHandle; void HAL_I2C_MspInit(I2C_HandleTypeDef* i2cHandle) { GPIO_InitTypeDef GPIO_InitStruct; __HAL_RCC
相關文章
相關標籤/搜索