1.1 --- a/include/display.h Tue Oct 23 22:14:20 2018 +0200
1.2 +++ b/include/display.h Tue Oct 23 23:25:47 2018 +0200
1.3 @@ -22,7 +22,37 @@
1.4
1.5 #include <stdint.h>
1.6
1.7 -int get_position(int x);
1.8 -void test_linedata(uint8_t *framebuffer);
1.9 +
1.10 +
1.11 +/* Display configuration type. */
1.12 +
1.13 +typedef struct
1.14 +{
1.15 + /* Framebuffer pointer and size. */
1.16 +
1.17 + uint8_t *framebuffer;
1.18 + uint32_t screen_size;
1.19 + uint32_t line_length, line_count; /* width, height */
1.20 +
1.21 + /* Screen start/top and limit pointers. */
1.22 +
1.23 + uint8_t *screen_start, *screen_limit;
1.24 +
1.25 + /* Number of scanlines per display line. */
1.26 +
1.27 + int line_multiplier;
1.28 +
1.29 + /* Number of consecutive pixels provided by a framebuffer region. */
1.30 +
1.31 + int cell_size;
1.32 +
1.33 +} display_config_t;
1.34 +
1.35 +
1.36 +
1.37 +/* Access functions. */
1.38 +
1.39 +int get_position(display_config_t *cfg, int x);
1.40 +void test_linedata(display_config_t *cfg);
1.41
1.42 #endif /* __DISPLAY_H__ */