0

Is there a way to display stuff in landscape mode and not portrait mode, which the program is set to by default in the C example?

I know you can do that in python, but I'm more familiar with c and i want to use it, but i can't find any way to change how things are displayed.

The code i use is just the example code but modified. Here it is in case you need it: Main.c

#include "LCD_Driver.h"
#include "LCD_Touch.h"
#include "LCD_GUI.h"
#include "LCD_Bmp.h"
#include "DEV_Config.h"
#include <stdio.h>
#include "hardware/watchdog.h"
#include "pico/stdlib.h"

#define BG_COLOR 0x422b
#define FG_COLOR 0x7c14
#define OL_COLOR 0x5b10

int main(void)
{
    // OVERCLOCK
    set_sys_clock_khz(270000, true);

    uint8_t counter = 0;
    
    System_Init();

    LCD_SCAN_DIR lcd_scan_dir = L2R_U2D;
    LCD_Init(lcd_scan_dir,600);
    GUI_Clear(BG_COLOR); // Set BG Color
    GUI_DrawRectangle(20, 10, 200, 300, FG_COLOR, 1, DOT_STYLE_DFT); // List Background
    GUI_DrawRectangle(20, 10, 200, 300, OL_COLOR, 0, DOT_PIXEL_2X2); // List Outline
    GUI_DisString_EN(25, 15, "Test", &Font24, FONT_BACKGROUND, FONT_BACKGROUND);
    return 0;
}

The display is a WaveShare Pico ResTouch LCD 2.8"

HEJOK254
  • 23
  • 7

1 Answers1

0

With a bit of work I was able to get the display and touch working how i wanted it to.

I'm not gonna get into much detail here but I basically had to copy and modify a bunch of the 3.5" display code and calibrate the touch.

If you're interested in the code, you can find it here since the it's too long to post here.

HEJOK254
  • 23
  • 7