42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_spi_master.h"
54#include "generic_pointer.h"
67#define LCDMONO_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
69 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
70 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
71 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
72 cfg.com = MIKROBUS( mikrobus, MIKROBUS_PWM )
80#define LCDMONO_ERROR -1
87#define LCDMONO_DISPLAY_WIDTH 128
88#define LCDMONO_DISPLAY_HEIGHT 128
89#define LCDMONO_DISPLAY_RESOLUTIONS 2307
96#define LCDMONO_COLOR_WHITE 0x00
97#define LCDMONO_COLOR_BLACK 0x01
104#define LCDMONO_REFRESH_DISPLAY_END 0x01
105#define LCDMONO_CHECK_NEW_TEXT 0x00
106#define LCDMONO_REFRESH_TEXT_BUFFER 0x10
113#define LCDMONO_CMD_DISPLAY_FLAG 0x80
114#define LCDMONO_CMD_CLEAR_FLAG 0x20
115#define LCDMONO_DUMMY_BYTE 0x00
122#define LCDMONO_POWER_ON 1
123#define LCDMONO_POWER_OFF 0
171 uint8_t lcd_frame[ 2307 ];
void lcdmono_cfg_setup(lcdmono_cfg_t *cfg)
Config Object Initialization function.
void lcdmono_set_font(lcdmono_t *ctx, lcdmono_font_t *dev_lcd_font)
Set font.
void lcdmono_display_power(lcdmono_t *ctx, uint8_t ctrl)
Display Power State.
void lcdmono_draw_text(lcdmono_t *ctx, uint8_t *__generic_ptr text_buf, lcdmono_text_settings_t *tx_set, uint8_t end_mode)
Draw text on the screen.
err_t lcdmono_init(lcdmono_t *ctx, lcdmono_cfg_t *cfg)
Initialization function.
void lcdmono_display_reset(lcdmono_t *ctx)
Reset procedure.
void lcdmono_send_line_package(lcdmono_t *ctx, uint8_t addr, uint8_t *__generic_ptr tx_data)
Send line data package.
void lcdmono_draw_frame(lcdmono_t *ctx, uint8_t *__generic_ptr frame_data)
Displays draw frame.
void lcdmono_clear(lcdmono_t *ctx)
Clear display.
Click configuration structure definition.
Definition lcdmono.h:184
uint8_t dev_lcd_frame_color
Definition lcdmono.h:199
spi_master_chip_select_polarity_t cs_polarity
Definition lcdmono.h:197
pin_name_t sck
Definition lcdmono.h:188
spi_master_mode_t spi_mode
Definition lcdmono.h:196
pin_name_t com
Definition lcdmono.h:192
pin_name_t mosi
Definition lcdmono.h:187
uint32_t spi_speed
Definition lcdmono.h:195
pin_name_t miso
Definition lcdmono.h:186
pin_name_t cs
Definition lcdmono.h:189
uint16_t x
Definition lcdmono.h:144
uint16_t y
Definition lcdmono.h:145
uint16_t first_char
Definition lcdmono.h:136
uint8_t *__generic_ptr this_font
Definition lcdmono.h:135
uint16_t height
Definition lcdmono.h:138
uint16_t last_char
Definition lcdmono.h:137
Click ctx object definition.
Definition lcdmono.h:163
spi_master_t spi
Definition lcdmono.h:168
uint8_t lcd_frame_color
Definition lcdmono.h:172
digital_out_t com
Definition lcdmono.h:165
lcdmono_text_settings_t tx_set
Definition lcdmono.h:176
lcdmono_font_t lcd_font
Definition lcdmono.h:174
lcdmono_coordinate_t lcd_cord
Definition lcdmono.h:175
pin_name_t chip_select
Definition lcdmono.h:169
uint8_t bg_color
Definition lcdmono.h:155
uint16_t start_cord_y
Definition lcdmono.h:154
uint8_t len
Definition lcdmono.h:152
uint16_t start_cord_x
Definition lcdmono.h:153