@@ -32,28 +32,38 @@ void M5Display::setBrightness(uint8_t brightness) {
32
32
}
33
33
34
34
void M5Display::drawBitmap (int16_t x0, int16_t y0, int16_t w, int16_t h, const uint16_t *data) {
35
+ bool swap = getSwapBytes ();
35
36
setSwapBytes (true );
36
37
pushImage ((int32_t )x0, (int32_t )y0, (uint32_t )w, (uint32_t )h, data);
38
+ setSwapBytes (swap);
37
39
}
38
40
39
41
void M5Display::drawBitmap (int16_t x0, int16_t y0, int16_t w, int16_t h, uint16_t *data) {
42
+ bool swap = getSwapBytes ();
40
43
setSwapBytes (true );
41
44
pushImage ((int32_t )x0, (int32_t )y0, (uint32_t )w, (uint32_t )h, data);
45
+ setSwapBytes (swap);
42
46
}
43
47
44
48
void M5Display::drawBitmap (int16_t x0, int16_t y0, int16_t w, int16_t h, const uint16_t *data, uint16_t transparent) {
49
+ bool swap = getSwapBytes ();
45
50
setSwapBytes (true );
46
51
pushImage ((int32_t )x0, (int32_t )y0, (uint32_t )w, (uint32_t )h, data, transparent);
52
+ setSwapBytes (swap);
47
53
}
48
54
49
55
void M5Display::drawBitmap (int16_t x0, int16_t y0, int16_t w, int16_t h, const uint8_t *data) {
56
+ bool swap = getSwapBytes ();
50
57
setSwapBytes (true );
51
58
pushImage ((int32_t )x0, (int32_t )y0, (uint32_t )w, (uint32_t )h, (const uint16_t *)data);
59
+ setSwapBytes (swap);
52
60
}
53
61
54
62
void M5Display::drawBitmap (int16_t x0, int16_t y0, int16_t w, int16_t h, uint8_t *data) {
63
+ bool swap = getSwapBytes ();
55
64
setSwapBytes (true );
56
65
pushImage ((int32_t )x0, (int32_t )y0, (uint32_t )w, (uint32_t )h, (uint16_t *)data);
66
+ setSwapBytes (swap);
57
67
}
58
68
59
69
void M5Display::progressBar (int x, int y, int w, int h, uint8_t val) {
0 commit comments