diff options
| author | Melissa LeBlanc-Williams <melissa@melissagirl.com> | 2019-03-25 23:58:58 -0700 |
|---|---|---|
| committer | Melissa LeBlanc-Williams <melissa@melissagirl.com> | 2019-03-25 23:58:58 -0700 |
| commit | cc96c39e6d15503d121778f9110d521ffe55a458 (patch) | |
| tree | e6ad85277c02de774134fbd729efa6b99515d00f /shared-module/displayio | |
| parent | c3329e224ddf352131568a5dd914943bc5194d4d (diff) | |
Fixed wrong operator
Diffstat (limited to 'shared-module/displayio')
| -rw-r--r-- | shared-module/displayio/Display.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 3936f3b17..b7ed2c64c 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -222,7 +222,7 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, uint1 uint16_t data[2]; self->send(self->bus, true, &self->set_column_command, 1); if (self->single_byte_bounds) { - data[0] = __builtin_bswap16((x0 + self->colstart) << 8 | (x1 - 1 + self->colstart) && 0xFF); + data[0] = __builtin_bswap16(((x0 + self->colstart) << 8) | ((x1 - 1 + self->colstart) & 0xFF)); self->send(self->bus, false, (uint8_t*) data, 2); } else { data[0] = __builtin_bswap16(x0 + self->colstart); @@ -231,7 +231,7 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, uint1 } self->send(self->bus, true, &self->set_row_command, 1); if (self->single_byte_bounds) { - data[0] = __builtin_bswap16((y0 + self->rowstart) << 8 | (y1 - 1 + self->rowstart) && 0xFF); + data[0] = __builtin_bswap16(((y0 + self->rowstart) << 8) | ((y1 - 1 + self->rowstart) & 0xFF)); self->send(self->bus, false, (uint8_t*) data, 2); } else { data[0] = __builtin_bswap16(y0 + self->rowstart); |
