Skip to content

Commit f1e4a2f

Browse files
author
Melissa LeBlanc-Williams
committed
Removed unnecessary bit-ANDing
1 parent 8e9f75b commit f1e4a2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shared-module/displayio/Display.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, uint1
216216
self->send(self->bus, true, &self->set_column_command, 1);
217217
if (self->single_byte_bounds) {
218218
uint8_t data[2];
219-
data[0] = (x0 + self->colstart) & 0xFF;
220-
data[1] = (x1 - 1 + self->colstart) & 0xFF;
219+
data[0] = x0 + self->colstart;
220+
data[1] = x1 - 1 + self->colstart;
221221
self->send(self->bus, false, (uint8_t*) data, 2);
222222
} else {
223223
uint16_t data[2];
@@ -228,8 +228,8 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, uint1
228228
self->send(self->bus, true, &self->set_row_command, 1);
229229
if (self->single_byte_bounds) {
230230
uint8_t data[2];
231-
data[0] = (y0 + self->rowstart) & 0xFF;
232-
data[1] = (y1 - 1 + self->rowstart) & 0xFF;
231+
data[0] = y0 + self->rowstart;
232+
data[1] = y1 - 1 + self->rowstart;
233233
self->send(self->bus, false, (uint8_t*) data, 2);
234234
} else {
235235
uint16_t data[2];

0 commit comments

Comments
 (0)