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
54 #define DisplayHeight 32
55 #define DisplayWidth 128
60 #define MatrixRows (DisplayHeight / FontHeight)
61 #define MatrixCols (DisplayWidth / FontWidth)
63 struct CharacterMatrix
{
64 uint8_t display
[MatrixRows
][MatrixCols
];
69 struct CharacterMatrix display
;
71 bool iota_gfx_init(bool rotate
);
72 void iota_gfx_task(void);
73 bool iota_gfx_off(void);
74 bool iota_gfx_on(void);
75 void iota_gfx_flush(void);
76 void iota_gfx_write_char(uint8_t c
);
77 void iota_gfx_write(const char *data
);
78 void iota_gfx_write_P(const char *data
);
79 void iota_gfx_clear_screen(void);
81 void iota_gfx_task_user(void);
83 void matrix_clear(struct CharacterMatrix
*matrix
);
84 void matrix_write_char_inner(struct CharacterMatrix
*matrix
, uint8_t c
);
85 void matrix_write_char(struct CharacterMatrix
*matrix
, uint8_t c
);
86 void matrix_write(struct CharacterMatrix
*matrix
, const char *data
);
87 void matrix_write_ln(struct CharacterMatrix
*matrix
, const char *data
);
88 void matrix_write_P(struct CharacterMatrix
*matrix
, const char *data
);
89 void matrix_render(struct CharacterMatrix
*matrix
);
91 bool process_record_gfx(uint16_t keycode
, keyrecord_t
*record
);