Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
vroland committed Sep 4, 2024
1 parent 820bf89 commit a5d4553
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 25 deletions.
4 changes: 2 additions & 2 deletions examples/fb_mode_test/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ void app_main() {
memset(framebuffer, 0xFF, fb_size);

test_2ppB();

// clear a small square to test selective clear.
EpdRect area = {.x = 250, .y = 150, .width=50, .height=50};
EpdRect area = { .x = 250, .y = 150, .width = 50, .height = 50 };
clear(area);

printf("going to sleep...\n");
Expand Down
4 changes: 2 additions & 2 deletions examples/weather/main/ArduinoJson.h
Original file line number Diff line number Diff line change
Expand Up @@ -4546,8 +4546,8 @@ struct BoundedReader<TSource*, typename enable_if<IsCharOrVoid<TSource>::value>:
public:
explicit BoundedReader(const void* ptr, size_t len)
: IteratorReader<const char*>(
reinterpret_cast<const char*>(ptr), reinterpret_cast<const char*>(ptr) + len
) {}
reinterpret_cast<const char*>(ptr), reinterpret_cast<const char*>(ptr) + len
) {}
};
template <typename TArray>
struct Reader<ElementProxy<TArray>, void> : Reader<char*, void> {
Expand Down
13 changes: 7 additions & 6 deletions examples/www-image/main/jpg-render.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,15 @@ static void http_post(void) {
* either in URL or as host and path parameters.
* FIX: Uncommenting cert_pem restarts even if providing the right certificate
*/
esp_http_client_config_t config = { .url = IMG_URL,
.event_handler = _http_event_handler,
.buffer_size = HTTP_RECEIVE_BUFFER_SIZE,
.disable_auto_redirect = false,
esp_http_client_config_t config
= {.url = IMG_URL,
.event_handler = _http_event_handler,
.buffer_size = HTTP_RECEIVE_BUFFER_SIZE,
.disable_auto_redirect = false,
#if VALIDATE_SSL_CERTIFICATE == true
.cert_pem = (char*)server_cert_pem_start
.cert_pem = (char*)server_cert_pem_start
#endif
};
};
esp_http_client_handle_t client = esp_http_client_init(&config);

#if DEBUG_VERBOSE
Expand Down
11 changes: 6 additions & 5 deletions examples/www-image/main/jpgdec-render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,14 @@ static void http_post(void) {
* NOTE: All the configuration parameters for http_client must be specified
* either in URL or as host and path parameters.
*/
esp_http_client_config_t config = { .url = IMG_URL,
esp_http_client_config_t config
= {.url = IMG_URL,
#if VALIDATE_SSL_CERTIFICATE == true
.cert_pem = (char*)server_cert_pem_start,
.cert_pem = (char*)server_cert_pem_start,
#endif
.disable_auto_redirect = false,
.event_handler = _http_event_handler,
.buffer_size = HTTP_RECEIVE_BUFFER_SIZE };
.disable_auto_redirect = false,
.event_handler = _http_event_handler,
.buffer_size = HTTP_RECEIVE_BUFFER_SIZE };

esp_http_client_handle_t client = esp_http_client_init(&config);

Expand Down
1 change: 0 additions & 1 deletion src/output_common/lut.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ static inline int max(int x, int y) {
// status tracker for row skipping
uint32_t skipping;


__attribute__((optimize("O3"))) void IRAM_ATTR calc_epd_input_8ppB(
const uint32_t* line_data, uint8_t* epd_input, const uint8_t* lut, uint32_t epd_width
) {
Expand Down
1 change: 0 additions & 1 deletion src/output_common/lut.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ typedef struct {
* for the selected draw mode and allocated LUT size.
*/
LutFunctionPair find_lut_functions(enum EpdDrawMode mode, uint32_t lut_size);

10 changes: 5 additions & 5 deletions src/output_lcd/render_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#include "lcd_driver.h"
#include "render_lcd.h"


void epd_apply_line_mask_VE(uint8_t * line, const uint8_t* mask, int mask_len);

void epd_apply_line_mask_VE(uint8_t* line, const uint8_t* mask, int mask_len);

static bool IRAM_ATTR fill_line_noop(RenderContext_t* ctx, uint8_t* line) {
memset(line, 0x00, ctx->display_width / 4);
Expand All @@ -30,7 +28,8 @@ static bool IRAM_ATTR fill_line_noop(RenderContext_t* ctx, uint8_t* line) {

static bool IRAM_ATTR fill_line_white(RenderContext_t* ctx, uint8_t* line) {
// do a no-op if we're out of the draw area
if (ctx->lines_consumed < ctx->area.y || ctx->lines_consumed >= ctx->area.y + ctx->area.height) {
if (ctx->lines_consumed < ctx->area.y
|| ctx->lines_consumed >= ctx->area.y + ctx->area.height) {
return fill_line_noop(ctx, line);
}

Expand All @@ -43,7 +42,8 @@ static bool IRAM_ATTR fill_line_white(RenderContext_t* ctx, uint8_t* line) {

static bool IRAM_ATTR fill_line_black(RenderContext_t* ctx, uint8_t* line) {
// do a no-op if we're out of the draw area
if (ctx->lines_consumed < ctx->area.y || ctx->lines_consumed >= ctx->area.y + ctx->area.height) {
if (ctx->lines_consumed < ctx->area.y
|| ctx->lines_consumed >= ctx->area.y + ctx->area.height) {
return fill_line_noop(ctx, line);
}

Expand Down
5 changes: 2 additions & 3 deletions src/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ static inline int rounded_display_height() {
*
* don't inline for to ensure availability in tests.
*/
void __attribute__((noinline)) _epd_populate_line_mask(
uint8_t* line_mask, const uint8_t* dirty_columns, int mask_len
) {
void __attribute__((noinline))
_epd_populate_line_mask(uint8_t* line_mask, const uint8_t* dirty_columns, int mask_len) {
if (dirty_columns == NULL) {
memset(line_mask, 0xFF, mask_len);
} else {
Expand Down

0 comments on commit a5d4553

Please sign in to comment.