mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
Small code fixes
This commit is contained in:
parent
fb258a9201
commit
080e623a14
2
adc.c
2
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;
|
uint32_t isr = VNA_ADC->ISR;
|
||||||
VNA_ADC->ISR = isr;
|
VNA_ADC->ISR = isr;
|
||||||
|
|
|
||||||
|
|
@ -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_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_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 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
|
// SD Card support, discio functions for FatFS lib implemented in ili9341.c
|
||||||
#ifdef __USE_SD_CARD__
|
#ifdef __USE_SD_CARD__
|
||||||
|
|
@ -565,7 +563,6 @@ void ui_show(void);
|
||||||
void ui_hide(void);
|
void ui_hide(void);
|
||||||
|
|
||||||
void touch_start_watchdog(void);
|
void touch_start_watchdog(void);
|
||||||
void touch_position(int *x, int *y);
|
|
||||||
void handle_touch_interrupt(void);
|
void handle_touch_interrupt(void);
|
||||||
|
|
||||||
#define TOUCH_THRESHOLD 2000
|
#define TOUCH_THRESHOLD 2000
|
||||||
|
|
|
||||||
12
ui.c
12
ui.c
|
|
@ -163,7 +163,7 @@ static void leave_ui_mode(void);
|
||||||
static void erase_menu_buttons(void);
|
static void erase_menu_buttons(void);
|
||||||
static void ui_process_keypad(void);
|
static void ui_process_keypad(void);
|
||||||
static void ui_process_numeric(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_move_back(bool leave_ui);
|
||||||
static void menu_push_submenu(const menuitem_t *submenu);
|
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)
|
touch_position(int *x, int *y)
|
||||||
{
|
{
|
||||||
*x = (last_touch_x - config.touch_cal[0]) * 16 / config.touch_cal[2];
|
*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];
|
*y = (last_touch_y - config.touch_cal[1]) * 16 / config.touch_cal[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
show_version(void)
|
show_version(void)
|
||||||
{
|
{
|
||||||
int x = 5, y = 5, i = 1;
|
int x = 5, y = 5, i = 1;
|
||||||
adc_stop();
|
// adc_stop();
|
||||||
ili9341_set_foreground(DEFAULT_FG_COLOR);
|
ili9341_set_foreground(DEFAULT_FG_COLOR);
|
||||||
ili9341_set_background(DEFAULT_BG_COLOR);
|
ili9341_set_background(DEFAULT_BG_COLOR);
|
||||||
|
|
||||||
|
|
@ -471,7 +471,7 @@ show_version(void)
|
||||||
// ili9341_drawstring(buffer, x, y + FONT_STR_HEIGHT + 2);
|
// ili9341_drawstring(buffer, x, y + FONT_STR_HEIGHT + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
touch_start_watchdog();
|
// touch_start_watchdog();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1741,7 +1741,7 @@ ui_mode_keypad(int _keypad_mode)
|
||||||
|
|
||||||
ui_mode = UI_KEYPAD;
|
ui_mode = UI_KEYPAD;
|
||||||
area_width = AREA_WIDTH_NORMAL - MENU_BUTTON_WIDTH;
|
area_width = AREA_WIDTH_NORMAL - MENU_BUTTON_WIDTH;
|
||||||
area_height = HEIGHT - 32;
|
area_height = LCD_HEIGHT-NUM_INPUT_HEIGHT;
|
||||||
draw_menu();
|
draw_menu();
|
||||||
draw_keypad();
|
draw_keypad();
|
||||||
draw_numeric_area_frame();
|
draw_numeric_area_frame();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue