中级会员
 
- 积分
- 285
- 金钱
- 285
- 注册时间
- 2017-10-3
- 在线时间
- 68 小时
|

楼主 |
发表于 2018-2-12 11:53:30
|
显示全部楼层
先謝謝各位大大的回答
先在這祝大家新年快樂
這邊有再去閱讀一下相關資料應該是使用此函式就足夠了
/**
* @brief Transmits in master mode an amount of data in blocking mode.
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
* the configuration information for the specified I2C.
* @param DevAddress Target device address: The device 7 bits address value
* in datasheet must be shift at right before call interface
* @param pData Pointer to data buffer
* @param Size Amount of data to be sent
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout)
但在其他地方有看到此種寫法
- while(HAL_I2C_Master_Transmit(&hi2c1,I2C1_WRITE_ADDRESS,®_Address,1,500) != HAL_OK)
- {
- if (HAL_I2C_GetError(&hi2c1) != HAL_I2C_ERROR_AF)
- {
- Error_Handler();
- }
- }
看起來是判斷使否有完整的傳送完資料否則等待
如果純打此行
HAL_I2C_Master_Transmit(&hi2c3, lcos, (uint8_t *)Tx_Buffer169, Numberofdata, 1000);
可以動作嗎?
HDMI轉DSI DSI轉LVDS的板子還在PCB LAYOUT無法馬上做測試
故先來詢問
Ref: http://www.stmcu.org/module/forum/thread-599190-1-1.html
謝謝
|
|