🔍 About the Library
Graphic Display is a C library designed for controlling monochromatic displays without any chipset or microcontroller dependency. This library allows you to use any display by providing a driver logic, making it a versatile solution for your project.
✨ Features
- Chipset and Microcontroller Independent: Graphic Display does not rely on any specific chipset or microcontroller, allowing you to use it with a wide range of hardware.
- Customizable Driver Logic: The library provides a flexible interface for implementing your own display driver logic, enabling you to support various types of displays.
- Cross-platform Compatibility: Graphic Display is designed to be platform-independent, making it easy to integrate into your projects across different operating systems.
- Efficient and Lightweight: The library is optimized for performance and has a small footprint, ensuring minimal impact on your project's resources.
- Independent Drivers: The drivers of this libraries is builded thinking on a independency with the middle layer (GraphicDisplay.h), allowing you to use in more advanced graphic libraries, like LVGL.
🗂️ API Reference
Access the Link Graphic Display API Reference to see detailed information about functions, structs and more.
🛠️ Installation
To use Graphic Display in your project, follow these steps:
- git clone
git@github.com:Pablo-Jean/Graphic-Display.git
.
- Include the library into source code compilation and include paths.
#include "GraphicDisplay.h"
.
- Link the library to your project during compilation.
Do not forget to remove examples from source code path :).
🚀 Usage
Here's a basic example of how to use the Graphic Display library with SSD1306 display in I2C mode:
void _display_i2c_interface(uint8_t i2cAddr, uint8_t reg, uint8_t *buff, uint32_t len){
uint8_t resp = I2C_Write_mem(i2cHandler, i2cAddr, reg, buff, len);
return resp;
}
void main (){
.u32Heigth = 64,
.u32Width = 128,
.bUseExternalFrameBuffer = false,
.delayMs = DelayMs,
.i2cWrite = _display_i2c_interface,
.u8I2CAddr = 0x3C
};
.DisplayHandle = (void*)(&Ssd1306),
.u32Height = 64,
.u32Width = 128
};
GD_Init(&Graphic, &Graphic_Params);
}
Main header file of Graphic Display Library, here we have the middle layer of the library....
gd_driver_t * Gd_Driver_SSD1306
SSD1306 Display Driver pointer.
Definition GraphicDisplay.c:37
gd_error_e GD_Init(gd_t *Gd, gd_params_t *params)
Initializes the Graphic Display module, configured with the parameters provided.
Definition GraphicDisplay.c:117
gd_error_e GD_UpdateScreen(gd_t *Gd)
Update and refresh the update screen with the data into Frame Buffer.
Definition GraphicDisplay.c:160
uint8_t SSD1306_Init(ssd1306_t *ssd1306, ssd1306_params_t *params)
Definition ssd1306.c:112
@ SSD1306_MODE_I2C
Definition ssd1306.h:41
Parameters to initialize the Graphic Display Handler.
Definition GraphicDisplay.h:375
gd_driver_t * DisplayDriver
Driver for the display. External Drivers Already Implemented.
Definition GraphicDisplay.h:396
Handler of Graphic Display. Each display must need your own handler. Yes, this library supports multi...
Definition GraphicDisplay.h:332
ssd1306_mode_e Mode
Definition ssd1306.h:88
💡 Examples
You can find various examples of using the Graphic Display library in the **examples** directory. These examples cover different use cases and demonstrate the library's capabilities.
🤝 Contributing
We welcome contributions to the Graphic Display library! If you find any issues or have ideas for improvements, please feel free to submit a pull request or open an issue on the GitHub repository.
🛠️ Creating Your Driver
You can write your own driver to use with this library, the only requirement is that your display is Monochromatic, this library doesn't support color displays.
Feel free to perform a Fork, implement your driver, and make a Pull request, sharing your contributing with other developers.
To see what you need to do, check the API reference.
📄 License
Graphic Display is released under the MIT License. Feel free to use, modify, and distribute the library as per the terms of the license.
Credits
This library was based on Afiskon/stm32-ssd1306.
My object is to create a easy simple Graphic Display Library, with all flexibility it deserves.