File tree Expand file tree Collapse file tree 3 files changed +477
-3
lines changed Expand file tree Collapse file tree 3 files changed +477
-3
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,14 @@ if (NOT DEFINED CPACK_PACKAGE_CONTACT)
60
60
endif ()
61
61
62
62
if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY )
63
- set (CPACK_PACKAGE_DESCRIPTION_SUMMARY
64
- "GENOA™ LCD display Interface library" )
63
+ # Conditionally set the description summary based on the selected version
64
+ if (USE_OLED_VERSION )
65
+ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY
66
+ "SP7 LCD display Interface library" )
67
+ else ()
68
+ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY
69
+ "GENOA™ LCD display Interface library" )
70
+ endif ()
65
71
endif ()
66
72
67
73
set (CPACK_PACKAGE_FILE_NAME "lcdlib_lib32-${BUILD_VERSION_STRING} " )
@@ -81,7 +87,24 @@ else ()
81
87
endif ()
82
88
83
89
include_directories (${CMAKE_CURRENT_SOURCE_DIR} /include )
84
- set (LCDLIB_SRC_LIST ${LCDLIB_SRC_LIST} "${SRC_DIR} /lcdlib_common.c" )
90
+ # Conditionally include source and header files based on the selected version
91
+ if (USE_OLED_VERSION )
92
+ set (LCDLIB_SRC_LIST
93
+ "${SRC_DIR} /lcdlib_common_oled.c"
94
+ )
95
+ set (LCD_INC_LIST
96
+ "${INC_DIR} /lcdlib_common_oled.h"
97
+ )
98
+ message (STATUS "Building the OLED version of lcdlib" )
99
+ else ()
100
+ set (LCDLIB_SRC_LIST
101
+ "${SRC_DIR} /lcdlib_common.c"
102
+ )
103
+ set (LCD_INC_LIST
104
+ "${INC_DIR} /lcdlib_common.h"
105
+ )
106
+ message (STATUS "Building the legacy version of lcdlib" )
107
+ endif ()
85
108
86
109
87
110
#set(LCD_TOOL "lcdlib_tool")
Original file line number Diff line number Diff line change
1
+ #ifdef __cplusplus
2
+ extern "C"
3
+ {
4
+ #endif
5
+ #ifndef INCLUDE_LCDLIB_COMMON_OLED_H_
6
+ #define INCLUDE_LCDLIB_COMMON_OLED_H_
7
+
8
+ /* Error Code */
9
+ #define LCD_ERR_OPEN 0x80
10
+ #define LCD_ERR_OPEN_I2C 0x81
11
+ #define LCD_ERR_SET_CURSOR 0x82
12
+ #define LCD_ERR_BAD_PARAM 0x83
13
+ #define LCD_ERR_CLEAR_SCREEN 0x84
14
+ #define LCD_ERR_WRITE 0x85
15
+ #define LCD_ERR_IOCTL 0x86
16
+ #define LCD_ERR_READ 0x87
17
+
18
+ #define LINE_HEIGHT_PX 9
19
+ #define CHARACTER_WIDTH_PX 6
20
+ #define CHARACTER_HEIGHT_PX 8
21
+
22
+ #define OLED_HEIGHT_PX 64
23
+ #define OLED_WIDTH_PX 128
24
+ #define OLED_HEIGHT_BYTES 64
25
+ #define OLED_WIDTH_BYTES 64
26
+
27
+ /* LCD Message type */
28
+ typedef enum
29
+ {
30
+ POST_CODE = 1 ,
31
+ BMC_IPADDR ,
32
+ BMC_VER ,
33
+ BIOS_VER ,
34
+ HPM_FPGA
35
+ } LCD_msgType_t ;
36
+
37
+ int lcdlib_open_dev (void );
38
+ int lcdlib_close_dev (void );
39
+ int lcdlib_write_string (LCD_msgType_t msgType , unsigned char * buffer , int str_len );
40
+ int lcdlib_clearScreen (void );
41
+
42
+ extern const unsigned char font6x8_ascii [128 ][6 ];
43
+
44
+ #endif // INCLUDE_LCDLIB_COMMON_OLED_H_
45
+ #ifdef __cplusplus
46
+ }
47
+ #endif
You can’t perform that action at this time.
0 commit comments