Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_spi_master.h"
52 #define OLEDC_FO_HORIZONTAL 0x00
53 #define OLEDC_FO_VERTICAL 0x01
54 #define OLEDC_FO_VERTICAL_COLUMN 0x02
61 #define OLEDC_RMP_INC_HOR 0x00
62 #define OLEDC_RMP_INC_VER 0x01
63 #define OLEDC_RMP_COLOR_NOR 0x00
64 #define OLEDC_RMP_COLOR_REV 0x02
65 #define OLEDC_RMP_SEQ_RGB 0x00
66 #define OLEDC_RMP_SEQ_BGR 0x04
67 #define OLEDC_RMP_SCAN_NOR 0x00
68 #define OLEDC_RMP_SCAN_REV 0x10
69 #define OLEDC_RMP_SPLIT_DISABLE 0x00
70 #define OLEDC_RMP_SPLIT_ENABLE 0x20
71 #define OLEDC_COLOR_65K 0x00
72 #define OLEDC_COLOR_262K 0x80
73 #define OLEDC_IMG_HEAD 0x06
80 #define OLEDC_SCREEN_WIDTH 0x60
81 #define OLEDC_SCREEN_HEIGHT 0x60
82 #define OLEDC_SCREEN_SIZE 0x2400
83 #define OLEDC_ROW_OFF 0x00
84 #define OLEDC_COL_OFF 0x10
91 #define OLEDC_SET_COL_ADDRESS 0x15
92 #define OLEDC_SET_ROW_ADDRESS 0x75
93 #define OLEDC_WRITE_RAM 0x5C
94 #define OLEDC_READ_RAM 0x5D
95 #define OLEDC_SET_REMAP 0xA0
96 #define OLEDC_SET_START_LINE 0xA1
97 #define OLEDC_SET_OFFSET 0xA2
98 #define OLEDC_MODE_OFF 0xA4
99 #define OLEDC_MODE_ON 0xA5
100 #define OLEDC_MODE_NORMAL 0xA6
101 #define OLEDC_MODE_INVERSE 0xA7
102 #define OLEDC_FUNCTION 0xAB
103 #define OLEDC_SLEEP_ON 0xAE
104 #define OLEDC_SLEEP_OFF 0xAF
105 #define OLEDC_NOP 0xB0
106 #define OLEDC_SET_RESET_PRECH 0xB1
107 #define OLEDC_ENHANCEMENT 0xB2
108 #define OLEDC_CLOCK_DIV 0xB3
109 #define OLEDC_VSL 0xB4
110 #define OLEDC_GPIO 0xB5
111 #define OLEDC_SETSEC_PRECH 0xB6
112 #define OLEDC_GREY_SCALE 0xB8
113 #define OLEDC_LUT 0xB9
114 #define OLEDC_PRECH_VOL 0xBB
115 #define OLEDC_VCOMH 0xBE
116 #define OLEDC_CONTRAST 0xC1
117 #define OLEDC_MASTER_CONTRAST 0xC7
118 #define OLEDC_MUX_RATIO 0xCA
119 #define OLEDC_COMMAND_LOCK 0xFD
120 #define OLEDC_SCROLL_HOR 0x96
121 #define OLEDC_START_MOV 0x9E
122 #define OLEDC_STOP_MOV 0x9F
129 #define OLEDC_MAP_MIKROBUS( cfg, mikrobus ) \
130 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
131 cfg.dc = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
132 cfg.en = MIKROBUS( mikrobus, MIKROBUS_INT ); \
133 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
134 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
135 cfg.sdo = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
136 cfg.sdi = MIKROBUS( mikrobus, MIKROBUS_MOSI )
294 uint8_t col_end, uint8_t row_end, uint16_t color );
339 uint8_t orientation );
354 uint16_t bottom, uint16_t right, uint16_t color );
uint16_t font_last_char
Definition: oledc.h:164
Click context object definition.
Definition: oledc.h:149
void oledc_image(oledc_t *ctx, const uint8_t *img, uint8_t column_off, uint8_t row_off)
Draw BMP Image.
void oledc_reset(oledc_t *ctx)
Click Hardware Reset.
const uint8_t * font
Definition: oledc.h:160
uint16_t x_coord
Definition: oledc.h:166
void oledc_enable(oledc_t *ctx, uint8_t state)
Click Enable/Disable.
uint16_t y_coord
Definition: oledc.h:167
digital_out_t dc
Definition: oledc.h:156
pin_name_t cs
Definition: oledc.h:180
Click configuration structure definition.
Definition: oledc.h:174
pin_name_t en
Definition: oledc.h:179
void oledc_begin_frame(oledc_t *ctx, uint16_t top, uint16_t left, uint16_t bottom, uint16_t right)
Begin Frame.
void oledc_rectangle(oledc_t *ctx, uint8_t col_off, uint8_t row_off, uint8_t col_end, uint8_t row_end, uint16_t color)
Draw Rectangle.
uint8_t font_orientation
Definition: oledc.h:162
digital_out_t rst
Definition: oledc.h:155
spi_master_t spi
Definition: oledc.h:152
pin_name_t rst
Definition: oledc.h:177
uint16_t font_height
Definition: oledc.h:165
pin_name_t sdi
Definition: oledc.h:183
void oledc_cfg_setup(oledc_cfg_t *cfg)
Configuartion Object Setup.
void oledc_end_frame(oledc_t *ctx)
End Frame.
void oledc_fill_screen(oledc_t *ctx, uint16_t color)
Fill Screen.
digital_out_t en
Definition: oledc.h:157
void oledc_default_cfg(oledc_t *ctx)
Click Default Configuration.
pin_name_t sdo
Definition: oledc.h:182
void oledc_frame_data(oledc_t *ctx, uint16_t color)
Frame Data.
uint16_t font_first_char
Definition: oledc.h:163
void oledc_text(oledc_t *ctx, uint8_t *text, uint16_t col_off, uint16_t row_off)
Draw Text.
void oledc_fill_area(oledc_t *ctx, uint16_t top, uint16_t left, uint16_t bottom, uint16_t right, uint16_t color)
Fill Area.
void oledc_command(oledc_t *ctx, uint8_t cmd, uint8_t *args, uint16_t args_len)
Command Send.
int8_t oledc_init(oledc_t *ctx, oledc_cfg_t *cfg)
Click Initialization.
uint16_t font_color
Definition: oledc.h:161
void oledc_set_font(oledc_t *ctx, const uint8_t *font, uint16_t color, uint8_t orientation)
Font Setup.
pin_name_t sck
Definition: oledc.h:181
pin_name_t dc
Definition: oledc.h:178