oled initialization with ssd1306
oled-main with structure ssd1306 initialization
This commit is contained in:
12
oled/connection.c
Normal file
12
oled/connection.c
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#include "connection.h"
|
||||
|
||||
HAL_StatusTypeDef oled_SendCommand(OLED_HandleTypeDef *hOled, uint8_t *pData, uint16_t Size)
|
||||
{
|
||||
return HAL_I2C_Mem_Write(hOled->hi2c, (hOled->DevAddress) << 1, I2C_COMMAND, 1, pData, Size, I2C_TIMEOUT);
|
||||
}
|
||||
|
||||
HAL_StatusTypeDef oled_SendData(OLED_HandleTypeDef *hOled, uint8_t *pData, uint16_t Size)
|
||||
{
|
||||
return HAL_I2C_Mem_Write(hOled->hi2c, (hOled->DevAddress) << 1, I2C_DATA, 1, pData, Size, I2C_TIMEOUT);
|
||||
}
|
||||
Reference in New Issue
Block a user