oled initialization with ssd1306
oled-main with structure ssd1306 initialization
This commit is contained in:
27
oled/oled.h
Normal file
27
oled/oled.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define I2C_COMMAND 0x00
|
||||
#define I2C_DATA 0x40
|
||||
#define I2C_TIMEOUT 100
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNKNOWN,
|
||||
SSD1306,
|
||||
SH1106
|
||||
} OLED_DisplayTypeDef;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
I2C_HandleTypeDef *hi2c;
|
||||
OLED_DisplayTypeDef OledType;
|
||||
uint8_t DevAddress;
|
||||
uint8_t Width;
|
||||
uint8_t Height;
|
||||
uint8_t *Buffer;
|
||||
|
||||
} OLED_HandleTypeDef;
|
||||
|
||||
void oled_init(OLED_HandleTypeDef *hOled, I2C_HandleTypeDef *hi2c);
|
||||
Reference in New Issue
Block a user