oled initialization with ssd1306
oled-main with structure ssd1306 initialization
This commit is contained in:
18
test/oled/helpers/inc/main.h
Normal file
18
test/oled/helpers/inc/main.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t dummy;
|
||||
}I2C_HandleTypeDef;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HAL_OK = 0x00U,
|
||||
HAL_ERROR = 0x01U,
|
||||
HAL_BUSY = 0x02U,
|
||||
HAL_TIMEOUT = 0x03
|
||||
} HAL_StatusTypeDef;
|
||||
|
||||
HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout);
|
||||
14
test/oled/helpers/src/mock_i2c.c
Normal file
14
test/oled/helpers/src/mock_i2c.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "main.h"
|
||||
|
||||
|
||||
HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout)
|
||||
{
|
||||
(void)hi2c;
|
||||
(void)DevAddress;
|
||||
(void)MemAddress;
|
||||
(void)MemAddSize;
|
||||
(void)pData;
|
||||
(void)Size;
|
||||
(void)Timeout;
|
||||
return HAL_OK;
|
||||
}
|
||||
Reference in New Issue
Block a user