From 080e623a14a3a1ca1d49a322a03b403725337ffe Mon Sep 17 00:00:00 2001 From: DiSlord Date: Mon, 13 Jul 2020 06:56:49 +0300 Subject: [PATCH] Small code fixes --- adc.c | 2 +- nanovna.h | 3 --- ui.c | 12 ++++++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/adc.c b/adc.c index e578681..f3d4fda 100644 --- a/adc.c +++ b/adc.c @@ -140,7 +140,7 @@ void adc_stop(void) } } -void adc_interrupt(void) +static void adc_interrupt(void) { uint32_t isr = VNA_ADC->ISR; VNA_ADC->ISR = isr; diff --git a/nanovna.h b/nanovna.h index 2eb89ce..f87d454 100644 --- a/nanovna.h +++ b/nanovna.h @@ -433,8 +433,6 @@ void ili9341_drawstring_size(const char *str, int x, int y, uint8_t size); void ili9341_drawfont(uint8_t ch, int x, int y); void ili9341_read_memory(int x, int y, int w, int h, int len, uint16_t* out); void ili9341_line(int x0, int y0, int x1, int y1); -void show_version(void); -void show_logo(void); // SD Card support, discio functions for FatFS lib implemented in ili9341.c #ifdef __USE_SD_CARD__ @@ -565,7 +563,6 @@ void ui_show(void); void ui_hide(void); void touch_start_watchdog(void); -void touch_position(int *x, int *y); void handle_touch_interrupt(void); #define TOUCH_THRESHOLD 2000 diff --git a/ui.c b/ui.c index e7e22b5..eada07e 100644 --- a/ui.c +++ b/ui.c @@ -163,7 +163,7 @@ static void leave_ui_mode(void); static void erase_menu_buttons(void); static void ui_process_keypad(void); static void ui_process_numeric(void); - +static void touch_position(int *x, int *y); static void menu_move_back(bool leave_ui); static void menu_push_submenu(const menuitem_t *submenu); @@ -419,18 +419,18 @@ touch_draw_test(void) } -void +static void touch_position(int *x, int *y) { *x = (last_touch_x - config.touch_cal[0]) * 16 / config.touch_cal[2]; *y = (last_touch_y - config.touch_cal[1]) * 16 / config.touch_cal[3]; } -void +static void show_version(void) { int x = 5, y = 5, i = 1; - adc_stop(); +// adc_stop(); ili9341_set_foreground(DEFAULT_FG_COLOR); ili9341_set_background(DEFAULT_BG_COLOR); @@ -471,7 +471,7 @@ show_version(void) // ili9341_drawstring(buffer, x, y + FONT_STR_HEIGHT + 2); } - touch_start_watchdog(); +// touch_start_watchdog(); } void @@ -1741,7 +1741,7 @@ ui_mode_keypad(int _keypad_mode) ui_mode = UI_KEYPAD; area_width = AREA_WIDTH_NORMAL - MENU_BUTTON_WIDTH; - area_height = HEIGHT - 32; + area_height = LCD_HEIGHT-NUM_INPUT_HEIGHT; draw_menu(); draw_keypad(); draw_numeric_area_frame();