summaryrefslogtreecommitdiff
path: root/shared-module/displayio/display_core.c
diff options
context:
space:
mode:
authorJeff Epler <jeff@adafruit.com>2021-03-15 13:50:49 -0500
committerGitHub <noreply@github.com>2021-03-15 13:50:49 -0500
commit05ed179e11599dd45a76dfb14ecf624d0ff96d68 (patch)
treea046c6d1f117814168150484ed1bf7840d3400d7 /shared-module/displayio/display_core.c
parent3cbff45f9aac5ea2855bbc888083d356a91c80fe (diff)
parentf9b4189b4c640823dabb76de8effd2a836da2eb0 (diff)
Merge pull request #4362 from microDev1/code-formatting
Add code formatting and translations check
Diffstat (limited to 'shared-module/displayio/display_core.c')
-rw-r--r--shared-module/displayio/display_core.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c
index 57d33b565..a0b3afa0e 100644
--- a/shared-module/displayio/display_core.c
+++ b/shared-module/displayio/display_core.c
@@ -43,9 +43,9 @@
#define DISPLAYIO_CORE_DEBUG(...) (void)0
// #define DISPLAYIO_CORE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
-void displayio_display_core_construct(displayio_display_core_t* self,
- mp_obj_t bus, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation,
- uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word) {
+void displayio_display_core_construct(displayio_display_core_t *self,
+ mp_obj_t bus, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation,
+ uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word) {
self->colorspace.depth = color_depth;
self->colorspace.grayscale = grayscale;
self->colorspace.grayscale_bit = 8 - color_depth;
@@ -99,8 +99,8 @@ void displayio_display_core_construct(displayio_display_core_t* self,
displayio_display_core_set_rotation(self, rotation);
}
-void displayio_display_core_set_rotation( displayio_display_core_t* self,
- int rotation) {
+void displayio_display_core_set_rotation(displayio_display_core_t *self,
+ int rotation) {
int height = self->height;
int width = self->width;
@@ -157,7 +157,7 @@ void displayio_display_core_set_rotation( displayio_display_core_t* self,
}
}
-bool displayio_display_core_show(displayio_display_core_t* self, displayio_group_t* root_group) {
+bool displayio_display_core_show(displayio_display_core_t *self, displayio_group_t *root_group) {
if (root_group == NULL) {
if (!circuitpython_splash.in_group) {
root_group = &circuitpython_splash;
@@ -184,19 +184,19 @@ bool displayio_display_core_show(displayio_display_core_t* self, displayio_group
return true;
}
-uint16_t displayio_display_core_get_width(displayio_display_core_t* self){
+uint16_t displayio_display_core_get_width(displayio_display_core_t *self) {
return self->width;
}
-uint16_t displayio_display_core_get_height(displayio_display_core_t* self){
+uint16_t displayio_display_core_get_height(displayio_display_core_t *self) {
return self->height;
}
-void displayio_display_core_set_dither(displayio_display_core_t* self, bool dither){
+void displayio_display_core_set_dither(displayio_display_core_t *self, bool dither) {
self->colorspace.dither = dither;
}
-bool displayio_display_core_get_dither(displayio_display_core_t* self){
+bool displayio_display_core_get_dither(displayio_display_core_t *self) {
return self->colorspace.dither;
}
@@ -204,18 +204,18 @@ bool displayio_display_core_bus_free(displayio_display_core_t *self) {
return !self->bus || self->bus_free(self->bus);
}
-bool displayio_display_core_begin_transaction(displayio_display_core_t* self) {
+bool displayio_display_core_begin_transaction(displayio_display_core_t *self) {
return self->begin_transaction(self->bus);
}
-void displayio_display_core_end_transaction(displayio_display_core_t* self) {
+void displayio_display_core_end_transaction(displayio_display_core_t *self) {
self->end_transaction(self->bus);
}
-void displayio_display_core_set_region_to_update(displayio_display_core_t* self, uint8_t column_command,
- uint8_t row_command, uint16_t set_current_column_command, uint16_t set_current_row_command,
- bool data_as_commands, bool always_toggle_chip_select,
- displayio_area_t* area, bool SH1107_addressing) {
+void displayio_display_core_set_region_to_update(displayio_display_core_t *self, uint8_t column_command,
+ uint8_t row_command, uint16_t set_current_column_command, uint16_t set_current_row_command,
+ bool data_as_commands, bool always_toggle_chip_select,
+ displayio_area_t *area, bool SH1107_addressing) {
uint16_t x1 = area->x1;
uint16_t x2 = area->x2;
uint16_t y1 = area->y1;
@@ -320,7 +320,7 @@ void displayio_display_core_set_region_to_update(displayio_display_core_t* self,
}
}
-bool displayio_display_core_start_refresh(displayio_display_core_t* self) {
+bool displayio_display_core_start_refresh(displayio_display_core_t *self) {
if (!displayio_display_core_bus_free(self)) {
// Can't acquire display bus; skip updating this display. Try next display.
return false;
@@ -333,7 +333,7 @@ bool displayio_display_core_start_refresh(displayio_display_core_t* self) {
return true;
}
-void displayio_display_core_finish_refresh(displayio_display_core_t* self) {
+void displayio_display_core_finish_refresh(displayio_display_core_t *self) {
if (self->current_group != NULL) {
DISPLAYIO_CORE_DEBUG("displayiocore group_finish_refresh\n");
displayio_group_finish_refresh(self->current_group);
@@ -343,21 +343,21 @@ void displayio_display_core_finish_refresh(displayio_display_core_t* self) {
self->last_refresh = supervisor_ticks_ms64();
}
-void release_display_core(displayio_display_core_t* self) {
+void release_display_core(displayio_display_core_t *self) {
if (self->current_group != NULL) {
self->current_group->in_group = false;
}
}
-void displayio_display_core_collect_ptrs(displayio_display_core_t* self) {
+void displayio_display_core_collect_ptrs(displayio_display_core_t *self) {
gc_collect_ptr(self->current_group);
}
-bool displayio_display_core_fill_area(displayio_display_core_t *self, displayio_area_t* area, uint32_t* mask, uint32_t *buffer) {
+bool displayio_display_core_fill_area(displayio_display_core_t *self, displayio_area_t *area, uint32_t *mask, uint32_t *buffer) {
return displayio_group_fill_area(self->current_group, &self->colorspace, area, mask, buffer);
}
-bool displayio_display_core_clip_area(displayio_display_core_t *self, const displayio_area_t* area, displayio_area_t* clipped) {
+bool displayio_display_core_clip_area(displayio_display_core_t *self, const displayio_area_t *area, displayio_area_t *clipped) {
bool overlaps = displayio_area_compute_overlap(&self->area, area, clipped);
if (!overlaps) {
return false;