5 #include "pincontrol.h"
13 DisplayAllOnResume = 0xA4,
18 SetDisplayOffset = 0xD3,
21 SetDisplayClockDiv = 0xD5,
39 ActivateScroll = 0x2f,
40 DeActivateScroll = 0x2e,
41 SetVerticalScrollArea = 0xa3,
42 RightHorizontalScroll = 0x26,
43 LeftHorizontalScroll = 0x27,
44 VerticalAndRightHorizontalScroll = 0x29,
45 VerticalAndLeftHorizontalScroll = 0x2a,
48 // Controls the SSD1306 128x32 OLED display via i2c
50 #ifndef SSD1306_ADDRESS
51 #define SSD1306_ADDRESS 0x3C
55 #define DisplayHeight 64
57 #define DisplayHeight 32
59 #define DisplayWidth 128
65 #define MatrixRows (DisplayHeight / FontHeight)
66 #define MatrixCols (DisplayWidth / FontWidth)
68 struct CharacterMatrix {
69 uint8_t display[MatrixRows][MatrixCols];
74 struct CharacterMatrix display;
76 bool iota_gfx_init(bool rotate);
77 void iota_gfx_task(void);
78 bool iota_gfx_off(void);
79 bool iota_gfx_on(void);
80 void iota_gfx_flush(void);
81 void iota_gfx_write_char(uint8_t c);
82 void iota_gfx_write(const char *data);
83 void iota_gfx_write_P(const char *data);
84 void iota_gfx_clear_screen(void);
86 void iota_gfx_task_user(void);
88 void matrix_clear(struct CharacterMatrix *matrix);
89 void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c);
90 void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c);
91 void matrix_write(struct CharacterMatrix *matrix, const char *data);
92 void matrix_write_ln(struct CharacterMatrix *matrix, const char *data);
93 void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
94 void matrix_render(struct CharacterMatrix *matrix);
96 bool process_record_gfx(uint16_t keycode, keyrecord_t *record);