-
Notifications
You must be signed in to change notification settings - Fork 2
Adding FB OLED Support #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #ifdef __cplusplus | ||
| extern "C" | ||
| { | ||
| #endif | ||
| #ifndef INCLUDE_LCDLIB_COMMON_OLED_H_ | ||
| #define INCLUDE_LCDLIB_COMMON_OLED_H_ | ||
|
|
||
| /* Error Code */ | ||
| #define LCD_ERR_OPEN 0x80 | ||
| #define LCD_ERR_OPEN_I2C 0x81 | ||
| #define LCD_ERR_SET_CURSOR 0x82 | ||
| #define LCD_ERR_BAD_PARAM 0x83 | ||
| #define LCD_ERR_CLEAR_SCREEN 0x84 | ||
| #define LCD_ERR_WRITE 0x85 | ||
| #define LCD_ERR_IOCTL 0x86 | ||
| #define LCD_ERR_READ 0x87 | ||
|
|
||
| #define LINE_HEIGHT_PX 9 | ||
| #define CHARACTER_WIDTH_PX 6 | ||
| #define CHARACTER_HEIGHT_PX 8 | ||
|
|
||
| #define OLED_HEIGHT_PX 64 | ||
| #define OLED_WIDTH_PX 128 | ||
| #define OLED_HEIGHT_BYTES 64 | ||
| #define OLED_WIDTH_BYTES 64 | ||
|
|
||
| /* LCD Message type */ | ||
| typedef enum | ||
| { | ||
| POST_CODE = 1, | ||
| BMC_IPADDR, | ||
| BMC_VER, | ||
| BIOS_VER, | ||
| HPM_FPGA | ||
| } LCD_msgType_t; | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. int lcdlib_enable_dev(int lcdDeviceNum); |
||
| int lcdlib_open_dev(void); | ||
| int lcdlib_close_dev(void); | ||
| int lcdlib_write_string(LCD_msgType_t msgType, unsigned char *buffer, int str_len); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs a re-look to see if it needs to include deviceNumber as a parameter to write to the right display. |
||
| int lcdlib_clearScreen(void); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs a re-look to see if it needs to include deviceNumber as a parameter to clear the right display. |
||
|
|
||
| extern const unsigned char font6x8_ascii[128][6]; | ||
|
|
||
| #endif // INCLUDE_LCDLIB_COMMON_OLED_H_ | ||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should take this opportunity to move away from CMakeLists and use Meson as upstream modules are using meson to speed up compilation.