-
Notifications
You must be signed in to change notification settings - Fork 5
/
panel_config.h
56 lines (48 loc) · 1.94 KB
/
panel_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include "core/config_defines.h"
/**
* Panel interface select
**/
#define PANEL_TYPE LVDS
#define PANEL_18_BIT FALSE
#define PANEL_DOUBLE_PORT FALSE // Only applicable when PANEL_TYPE==LVDS
/**
* Panel resolution and timings
**/
// |HPW| HBP | HACT | HFP |
// ┐ ┌───────────────────────────────
// └───┘ | | |
// ---- └─┐ +----------------------------------+
// VPW │ | | | |
// ---- ┌─┘ | |
// VBP │ | | | |
// ---- │- -|- - - - - - -+--------------+ |
// │ | | | |
// VACT │ | | ACTIVE VIDEO | |
// │ | | | |
// ---- │- -|- - - - - - -+--------------+ |
// VFP │ | |
// ---- │ +----------------------------------+
//
// Panel pixel clock (aka data clock) (Hz)
#define PANEL_DCLK 51200000UL // NOTE: for my display 40.8 - min; 67.2 - max
// Horizontal timings
#define PANEL_H_SYNC_WIDTH 64 // HPW
#define PANEL_H_BACK_PORCH 96 // HBP
#define PANEL_H_ACTIVE 1024 // HACT, AKA: Horizontal resolution
#define PANEL_H_FRONT_PORCH 160 // HFP
// Vertical timings
#define PANEL_V_SYNC_WIDTH 5 // VPW
#define PANEL_V_BACK_PORCH 10 // VBP
#define PANEL_V_ACTIVE 600 // VACT, AKA: Vertical resolution
#define PANEL_V_FRONT_PORCH 20 // VFP
/**
* Panel signal polarity and data order
**/
#define PANEL_INVERT_DCLK FALSE
#define PANEL_INVERT_DHS FALSE
#define PANEL_INVERT_DVS FALSE
#define PANEL_INVERT_DEN FALSE
#define PANEL_SWAP_BIT_ORDER FALSE
#define PANEL_SWAP_RED_BLU FALSE
#define PANEL_SWAP_ODD_EVEN FALSE