Style: fix some lines and whitespace

main
rkcf 2023-02-05 11:17:13 -06:00
parent ff9c2a22f1
commit d1ac219547
1 changed files with 8 additions and 8 deletions

View File

@ -115,7 +115,7 @@ static void update_seq(uint8_t *sequence) {
for (uint8_t i = 0; i < seq_len; i++) {
if (sequence[i] == 1) {
seq_str[i] = 'x';
} else {
} else {
seq_str[i] = 'o';
}
}
@ -181,8 +181,7 @@ static void control_event_handler(void* arg) {
uint8_t current_state = gpio_get_level(gpio_num);
if (xQueueReceive(control_event_queue, &gpio_num, portMAX_DELAY)) {
/* Check if interrupt triggered stays the same for long enough */
if ((current_state == last_btn_state) &&
(xTaskGetTickCount() - last_debounce_time > DEBOUNCE_TIMEOUT)) {
if ((current_state == last_btn_state) && (xTaskGetTickCount() - last_debounce_time > DEBOUNCE_TIMEOUT)) {
ESP_LOGI(TAG, "Handling control from GPIO %" PRIu32, gpio_num);
switch (gpio_num) {
case GPIO_MUTATE_BTN:
@ -261,7 +260,9 @@ static void gpio_init(void) {
ESP_ERROR_CHECK(gptimer_set_alarm_action(gate_timer, &cv_off_alarm_config));
/* Register gate timer callback */
gptimer_event_callbacks_t clk_cbs = {.on_alarm = gate_off_alarm_cb};
gptimer_event_callbacks_t clk_cbs = {
.on_alarm = gate_off_alarm_cb
};
ESP_ERROR_CHECK(gptimer_register_event_callbacks(gate_timer, &clk_cbs, NULL));
ESP_ERROR_CHECK(gptimer_enable(gate_timer));
}
@ -386,10 +387,8 @@ static void display_init(void) {
lv_init();
/* Allocate draw buffers */
lv_color_t *buf1 =
heap_caps_malloc(LCD_H_RES * 80 * sizeof(lv_color_t), MALLOC_CAP_DMA);
lv_color_t *buf2 =
heap_caps_malloc(LCD_H_RES * 80 * sizeof(lv_color_t), MALLOC_CAP_DMA);
lv_color_t *buf1 = heap_caps_malloc(LCD_H_RES * 80 * sizeof(lv_color_t), MALLOC_CAP_DMA);
lv_color_t *buf2 = heap_caps_malloc(LCD_H_RES * 80 * sizeof(lv_color_t), MALLOC_CAP_DMA);
/* Initialize draw buffers */
static lv_disp_draw_buf_t disp_buf;
lv_disp_draw_buf_init(&disp_buf, buf1, buf2, LCD_H_RES * 80);
@ -484,6 +483,7 @@ void app_main(void) {
/* Initialize GPIO */
gpio_init();
controls_init();
/* Initialize LCD */
display_init();
gui_create();