use bigger display

This commit is contained in:
Alessandro Mauri 2026-05-22 19:10:45 +02:00
parent c3ffd3bbf8
commit 81a7faa6f6
3 changed files with 13 additions and 5 deletions

View File

@ -4,7 +4,7 @@ TARGET := main
TARGET_MCU := CH32X035 TARGET_MCU := CH32X035
TARGET_MCU_PACKAGE := CH32X035F8U6 TARGET_MCU_PACKAGE := CH32X035F8U6
BUILD_DIR := .build BUILD_DIR := .build
DISPLAY := ssd1312 DISPLAY := ssd1306_128x32
# include u8g2 # include u8g2
U8G2_DIR:=u8g2/csrc U8G2_DIR:=u8g2/csrc

View File

@ -3,10 +3,20 @@
#include <u8g2.h> #include <u8g2.h>
// #define SSD1306_128X32 1 #define SSD1306_128X32 1
#define SSD1312_96X16 1 // #define SSD1312_96X16 1
#define PIN_DISP_RST PA7 // display reset #define PIN_DISP_RST PA7 // display reset
#ifdef SSD1306_128X32
#define x_off 0
#define y_off 0
#endif
#ifdef SSD1312_96X16
#define x_off 0
#define y_off 8
#endif
u8g2_t* display_init(void); u8g2_t* display_init(void);
const char* i16toa(int16_t value); const char* i16toa(int16_t value);
const char* u16toa(uint16_t value); const char* u16toa(uint16_t value);

View File

@ -29,8 +29,6 @@ u8g2_t *u8g2;
int16_t encoder = 0; // rotary encoder counter int16_t encoder = 0; // rotary encoder counter
uint32_t last_interrupt = 0; // last time the encoder interrupt was triggered uint32_t last_interrupt = 0; // last time the encoder interrupt was triggered
struct pd_profile_t pd_profile; struct pd_profile_t pd_profile;
static const int8_t x_off = 0;
static const int8_t y_off = 8;
// Convert the raw adc reading to a temperature in celsius with the ntc lut, // Convert the raw adc reading to a temperature in celsius with the ntc lut,
// linearly interpolating between positions // linearly interpolating between positions