|
TB2026-YDS Firmware
|
#include "display_oled.h"#include "board_pins.h"#include "driver/gpio.h"#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include <string.h>Macros | |
| #define | DISP_W 176 |
| #define | DISP_H 176 |
| #define | CMD_COMMAND_LOCK 0xFD |
| #define | CMD_DISPLAY_OFF 0xAE |
| #define | CMD_DISPLAY_ON 0xAF |
| #define | CMD_REMAP_FORMAT 0xA0 |
| #define | CMD_START_LINE 0xA1 |
| #define | CMD_DISPLAY_OFFSET 0xA2 |
| #define | CMD_DISPLAY_NORMAL 0xA6 |
| #define | CMD_PHASE_LENGTH 0xB1 |
| #define | CMD_DISPLAY_CLOCK 0xB3 |
| #define | CMD_PRECHARGE_PER 0xB6 |
| #define | CMD_GAMMA 0xB8 |
| #define | CMD_PRECHARGE_VOLT 0xBB |
| #define | CMD_VCOMH 0xBE |
| #define | CMD_CONTRAST_COLOR 0xC1 |
| #define | CMD_MASTER_CURRENT 0xC7 |
| #define | CMD_MUX_RATIO 0xCA |
| #define | CMD_SET_COLUMN 0x15 |
| #define | CMD_SET_ROW 0x75 |
| #define | CMD_WRITE_RAM 0x5C |
Functions | |
| esp_err_t | display_oled_init (spi_device_handle_t spi) |
| Reset the panel and run the SSD1333 init sequence (gamma, contrast, display on). | |
| esp_err_t | display_oled_draw (const uint8_t *buf, size_t len) |
| Blit a full framebuffer to the panel. | |
| esp_err_t | display_oled_set_brightness (uint8_t level) |
| Set the global panel brightness (SSD1333 Master Current, cmd 0xC7). | |
| esp_err_t | display_oled_sleep (void) |
| Put the panel to sleep (SSD1333 Display OFF, cmd 0xAE). | |
| esp_err_t | display_oled_wake (void) |
| Wake the panel from sleep (SSD1333 Display ON, cmd 0xAF). | |
| esp_err_t | display_oled_clear (void) |
| Clear the panel to black directly, without a framebuffer. | |
| #define CMD_COMMAND_LOCK 0xFD |
| #define CMD_CONTRAST_COLOR 0xC1 |
| #define CMD_DISPLAY_CLOCK 0xB3 |
| #define CMD_DISPLAY_NORMAL 0xA6 |
| #define CMD_DISPLAY_OFF 0xAE |
| #define CMD_DISPLAY_OFFSET 0xA2 |
| #define CMD_DISPLAY_ON 0xAF |
| #define CMD_GAMMA 0xB8 |
| #define CMD_MASTER_CURRENT 0xC7 |
| #define CMD_MUX_RATIO 0xCA |
| #define CMD_PHASE_LENGTH 0xB1 |
| #define CMD_PRECHARGE_PER 0xB6 |
| #define CMD_PRECHARGE_VOLT 0xBB |
| #define CMD_REMAP_FORMAT 0xA0 |
| #define CMD_SET_COLUMN 0x15 |
| #define CMD_SET_ROW 0x75 |
| #define CMD_START_LINE 0xA1 |
| #define CMD_VCOMH 0xBE |
| #define CMD_WRITE_RAM 0x5C |
| #define DISP_H 176 |
| #define DISP_W 176 |