-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolorspace.h
36 lines (30 loc) · 922 Bytes
/
colorspace.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* File: colorspace.h
* Author: [email protected]
*
* Created on 3. Juli 2024, 19:02
*/
#ifndef COLORSPACE_H
#define COLORSPACE_H
// TODO use enum? typedef?
#define SPACE_MONO1 1
#define SPACE_GREY4 4
#define SPACE_RGB16 16
#include <stdint.h>
#include "types.h"
#include "spi.h"
/**
* Helper to write image data to the display, converting from the given
* color space to that of the display.
*
* @param bitmap pointer to bitmap data in program memory
* @param width width of the bitmap in pixels
* @param height height of the bitmap in pixels
* @param space color space of the bitmap
* @param bg background color (used only with SPACE_MONO1)
* @param fg foreground color (used only with SPACE_MONO1)
*/
void writeSpace(const __flash uint8_t *bitmap,
width_t width, height_t height,
space_t space, uint16_t bg, uint16_t fg);
#endif /* COLORSPACE_H */