@@ -28,6 +28,7 @@ SW_APPs/APP_IDcard.o: ../SW_APPs/APP_IDcard.c ../SW_APPs/APP_IDcard.h \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||||
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/rs522.h
|
C:/Users/wuwen/m3s_stm32/HW_Devices/rs522.h
|
||||||
../SW_APPs/APP_IDcard.h:
|
../SW_APPs/APP_IDcard.h:
|
||||||
../Core/Inc/main.h:
|
../Core/Inc/main.h:
|
||||||
@@ -61,4 +62,5 @@ SW_APPs/APP_IDcard.o: ../SW_APPs/APP_IDcard.c ../SW_APPs/APP_IDcard.h \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||||
../SW_APPs/windows.h:
|
../SW_APPs/windows.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/rs522.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/rs522.h:
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
../SW_APPs/APP_KEYBOARD.c:12:6:APP_KEYBOARD_init 1
|
../SW_APPs/APP_KEYBOARD.c:12:6:APP_KEYBOARD_init 1
|
||||||
../SW_APPs/APP_KEYBOARD.c:21:6:APP_KEYBOARD_loop 2
|
../SW_APPs/APP_KEYBOARD.c:20:6:down_one_key 1
|
||||||
|
../SW_APPs/APP_KEYBOARD.c:26:6:getkeyboardv 73
|
||||||
|
../SW_APPs/APP_KEYBOARD.c:136:6:APP_KEYBOARD_loop 6
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ SW_APPs/APP_KEYBOARD.o: ../SW_APPs/APP_KEYBOARD.c \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||||
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h
|
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h
|
||||||
../SW_APPs/APP_keyboard.h:
|
../SW_APPs/APP_keyboard.h:
|
||||||
../Core/Inc/main.h:
|
../Core/Inc/main.h:
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
||||||
@@ -61,3 +62,4 @@ SW_APPs/APP_KEYBOARD.o: ../SW_APPs/APP_KEYBOARD.c \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||||
../SW_APPs/windows.h:
|
../SW_APPs/windows.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
../SW_APPs/APP_KEYBOARD.c:12:6:APP_KEYBOARD_init 16 static
|
../SW_APPs/APP_KEYBOARD.c:12:6:APP_KEYBOARD_init 16 static
|
||||||
../SW_APPs/APP_KEYBOARD.c:21:6:APP_KEYBOARD_loop 16 static
|
../SW_APPs/APP_KEYBOARD.c:20:6:down_one_key 40 static
|
||||||
|
../SW_APPs/APP_KEYBOARD.c:26:6:getkeyboardv 16 static
|
||||||
|
../SW_APPs/APP_KEYBOARD.c:136:6:APP_KEYBOARD_loop 24 static
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SW_APPs/APP_blood.o: ../SW_APPs/APP_blood.c ../SW_APPs/APP_blood.h \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||||
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/LCD.h \
|
C:/Users/wuwen/m3s_stm32/HW_Devices/LCD.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/iic.h ../SW_APPs/FFT.h
|
C:/Users/wuwen/m3s_stm32/HW_Devices/iic.h ../SW_APPs/FFT.h
|
||||||
../SW_APPs/APP_blood.h:
|
../SW_APPs/APP_blood.h:
|
||||||
@@ -62,6 +63,7 @@ SW_APPs/APP_blood.o: ../SW_APPs/APP_blood.c ../SW_APPs/APP_blood.h \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||||
../SW_APPs/windows.h:
|
../SW_APPs/windows.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/LCD.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/LCD.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/iic.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/iic.h:
|
||||||
../SW_APPs/FFT.h:
|
../SW_APPs/FFT.h:
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ SW_APPs/APP_colorcontrol.o: ../SW_APPs/APP_colorcontrol.c \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||||
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h
|
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h
|
||||||
../SW_APPs/APP_colorcontrol.h:
|
../SW_APPs/APP_colorcontrol.h:
|
||||||
../Core/Inc/main.h:
|
../Core/Inc/main.h:
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
||||||
@@ -61,3 +62,4 @@ SW_APPs/APP_colorcontrol.o: ../SW_APPs/APP_colorcontrol.c \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||||
../SW_APPs/windows.h:
|
../SW_APPs/windows.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ SW_APPs/Main_APP.o: ../SW_APPs/Main_APP.c ../SW_APPs/Main_APP.h \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||||
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h \
|
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/eeprom.h \
|
C:/Users/wuwen/m3s_stm32/HW_Devices/eeprom.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h \
|
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/buzzer.h \
|
C:/Users/wuwen/m3s_stm32/HW_Devices/buzzer.h \
|
||||||
../SW_APPs/APP_colorcontrol.h ../SW_APPs/APP_keyboard.h
|
../SW_APPs/APP_colorcontrol.h ../SW_APPs/APP_keyboard.h
|
||||||
../SW_APPs/Main_APP.h:
|
../SW_APPs/Main_APP.h:
|
||||||
@@ -67,9 +67,9 @@ C:/Users/wuwen/m3s_stm32/HW_Devices/LCD.h:
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||||
../SW_APPs/windows.h:
|
../SW_APPs/windows.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/eeprom.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/eeprom.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
|
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/buzzer.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/buzzer.h:
|
||||||
../SW_APPs/APP_colorcontrol.h:
|
../SW_APPs/APP_colorcontrol.h:
|
||||||
../SW_APPs/APP_keyboard.h:
|
../SW_APPs/APP_keyboard.h:
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
../SW_APPs/windows.c:19:6:Inteface_SetColor 1
|
../SW_APPs/windows.c:19:6:Inteface_SetColor 1
|
||||||
../SW_APPs/windows.c:25:5:UI_Init 2
|
../SW_APPs/windows.c:25:5:UI_Init 2
|
||||||
../SW_APPs/windows.c:67:9:New_Window 4
|
../SW_APPs/windows.c:67:9:New_Window 4
|
||||||
../SW_APPs/windows.c:115:6:Close_Windows_Stack 5
|
../SW_APPs/windows.c:116:6:Close_Windows_Stack 5
|
||||||
../SW_APPs/windows.c:155:6:Set_Windows_Title 2
|
../SW_APPs/windows.c:156:6:Set_Windows_Title 2
|
||||||
../SW_APPs/windows.c:163:6:Set_Windows_XY_BY_ACC 1
|
../SW_APPs/windows.c:164:6:Set_Windows_XY_BY_ACC 1
|
||||||
../SW_APPs/windows.c:170:6:Refresh_Window 12
|
../SW_APPs/windows.c:171:6:Refresh_Window 12
|
||||||
../SW_APPs/windows.c:242:6:Refresh_UI 5
|
../SW_APPs/windows.c:243:6:Refresh_UI 5
|
||||||
../SW_APPs/windows.c:318:9:Chack 13
|
../SW_APPs/windows.c:319:9:Chack 13
|
||||||
../SW_APPs/windows.c:338:6:UI_Server 21
|
../SW_APPs/windows.c:339:6:UI_Server 21
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SW_APPs/windows.o: ../SW_APPs/windows.c ../SW_APPs/windows.h \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h \
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h \
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h
|
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h
|
||||||
../SW_APPs/windows.h:
|
../SW_APPs/windows.h:
|
||||||
../Core/Inc/main.h:
|
../Core/Inc/main.h:
|
||||||
@@ -60,4 +61,5 @@ SW_APPs/windows.o: ../SW_APPs/windows.c ../SW_APPs/windows.h \
|
|||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
|
||||||
|
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
|
||||||
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h:
|
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h:
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
../SW_APPs/windows.c:19:6:Inteface_SetColor 16 static
|
../SW_APPs/windows.c:19:6:Inteface_SetColor 16 static
|
||||||
../SW_APPs/windows.c:25:5:UI_Init 24 static
|
../SW_APPs/windows.c:25:5:UI_Init 24 static
|
||||||
../SW_APPs/windows.c:67:9:New_Window 40 static
|
../SW_APPs/windows.c:67:9:New_Window 40 static
|
||||||
../SW_APPs/windows.c:115:6:Close_Windows_Stack 16 static
|
../SW_APPs/windows.c:116:6:Close_Windows_Stack 16 static
|
||||||
../SW_APPs/windows.c:155:6:Set_Windows_Title 24 static
|
../SW_APPs/windows.c:156:6:Set_Windows_Title 24 static
|
||||||
../SW_APPs/windows.c:163:6:Set_Windows_XY_BY_ACC 24 static
|
../SW_APPs/windows.c:164:6:Set_Windows_XY_BY_ACC 24 static
|
||||||
../SW_APPs/windows.c:170:6:Refresh_Window 40 static
|
../SW_APPs/windows.c:171:6:Refresh_Window 40 static
|
||||||
../SW_APPs/windows.c:242:6:Refresh_UI 32 static
|
../SW_APPs/windows.c:243:6:Refresh_UI 32 static
|
||||||
../SW_APPs/windows.c:318:9:Chack 32 static
|
../SW_APPs/windows.c:319:9:Chack 32 static
|
||||||
../SW_APPs/windows.c:338:6:UI_Server 40 static
|
../SW_APPs/windows.c:339:6:UI_Server 40 static
|
||||||
|
|||||||
+9088
-7873
File diff suppressed because it is too large
Load Diff
+505
-482
File diff suppressed because it is too large
Load Diff
+156
-1
@@ -12,21 +12,176 @@ window *keyboard_window;
|
|||||||
void APP_KEYBOARD_init(window *a_window)
|
void APP_KEYBOARD_init(window *a_window)
|
||||||
{
|
{
|
||||||
keyboard_window=a_window;
|
keyboard_window=a_window;
|
||||||
|
keyboard_window->high=146;
|
||||||
|
keyboard_window->width=180;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void down_one_key(int x,int y,char v)
|
||||||
|
{
|
||||||
|
LCD_Fill(x,y,x+30,y+30,GRAY);
|
||||||
|
LCD_ShowChar(x+8,y+8,v,16,GRAY,WHITE);
|
||||||
|
}
|
||||||
|
|
||||||
|
char getkeyboardv(int x,int y)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+2&&x<keyboard_window->x+2+32&&y>keyboard_window->y+17&&y<keyboard_window->y+17+32)
|
||||||
|
{
|
||||||
|
return '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+34&&x<keyboard_window->x+34+32&&y>keyboard_window->y+17&&y<keyboard_window->y+17+32)
|
||||||
|
{
|
||||||
|
return '1';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+66&&x<keyboard_window->x+66+32&&y>keyboard_window->y+17&&y<keyboard_window->y+17+32)
|
||||||
|
{
|
||||||
|
return '2';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+98&&x<keyboard_window->x+98+32&&y>keyboard_window->y+17&&y<keyboard_window->y+17+32)
|
||||||
|
{
|
||||||
|
return '3';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+2&&x<keyboard_window->x+2+32&&y>keyboard_window->y+49&&y<keyboard_window->y+49+32)
|
||||||
|
{
|
||||||
|
return '4';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+34&&x<keyboard_window->x+34+32&&y>keyboard_window->y+49&&y<keyboard_window->y+49+32)
|
||||||
|
{
|
||||||
|
return '5';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+66&&x<keyboard_window->x+66+32&&y>keyboard_window->y+49&&y<keyboard_window->y+49+32)
|
||||||
|
{
|
||||||
|
return '6';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+98&&x<keyboard_window->x+98+32&&y>keyboard_window->y+49&&y<keyboard_window->y+49+32)
|
||||||
|
{
|
||||||
|
return '7';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+2&&x<keyboard_window->x+2+32&&y>keyboard_window->y+81&&y<keyboard_window->y+81+32)
|
||||||
|
{
|
||||||
|
return '8';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+34&&x<keyboard_window->x+34+32&&y>keyboard_window->y+81&&y<keyboard_window->y+81+32)
|
||||||
|
{
|
||||||
|
return '9';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+66&&x<keyboard_window->x+66+32&&y>keyboard_window->y+81&&y<keyboard_window->y+81+32)
|
||||||
|
{
|
||||||
|
return 'A';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+98&&x<keyboard_window->x+98+32&&y>keyboard_window->y+81&&y<keyboard_window->y+81+32)
|
||||||
|
{
|
||||||
|
return 'B';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+2&&x<keyboard_window->x+2+32&&y>keyboard_window->y+113&&y<keyboard_window->y+113+32)
|
||||||
|
{
|
||||||
|
return 'C';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+34&&x<keyboard_window->x+34+32&&y>keyboard_window->y+113&&y<keyboard_window->y+113+32)
|
||||||
|
{
|
||||||
|
return 'D';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+66&&x<keyboard_window->x+66+32&&y>keyboard_window->y+113&&y<keyboard_window->y+113+32)
|
||||||
|
{
|
||||||
|
return 'E';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+98&&x<keyboard_window->x+98+32&&y>keyboard_window->y+113&&y<keyboard_window->y+113+32)
|
||||||
|
{
|
||||||
|
return 'F';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(x>keyboard_window->x+140&&x<keyboard_window->x+140+32&&y>keyboard_window->y+81&&y<keyboard_window->y+81+32)
|
||||||
|
{
|
||||||
|
return '<';
|
||||||
|
}
|
||||||
|
if(x>keyboard_window->x+140&&x<keyboard_window->x+140+32&&y>keyboard_window->y+113&&y<keyboard_window->y+113+32)
|
||||||
|
{
|
||||||
|
return 'X';
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char keyboard_char[16]={0};
|
||||||
|
char keyboard_char_int=0;
|
||||||
void APP_KEYBOARD_loop()
|
void APP_KEYBOARD_loop()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
//sprintf(keyboard_char,"%d",keyboard_window->touch_flag);
|
||||||
|
LCD_ShowString(keyboard_window->x+130,keyboard_window->y+17,keyboard_char,16,GRAY,WHITE);
|
||||||
|
if(keyboard_window->touch_flag==1)
|
||||||
|
{
|
||||||
|
keyboard_window->touch_flag=0;
|
||||||
|
char tempv=getkeyboardv(keyboard_window->touch_x,keyboard_window->touch_y);
|
||||||
|
|
||||||
|
switch(tempv)
|
||||||
|
{
|
||||||
|
case '<':
|
||||||
|
if(keyboard_char_int>0)
|
||||||
|
{
|
||||||
|
keyboard_char[keyboard_char_int]='\0';
|
||||||
|
keyboard_char_int-=1;
|
||||||
|
keyboard_char[keyboard_char_int]='\0';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'X':
|
||||||
|
keyboard_char_int=0;
|
||||||
|
keyboard_char[keyboard_char_int]='\0';
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
keyboard_char[keyboard_char_int]=tempv;
|
||||||
|
keyboard_char_int+=1;
|
||||||
|
keyboard_char[keyboard_char_int]='\0';
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
if(keyboard_window->refresh_windows_flag)
|
if(keyboard_window->refresh_windows_flag)
|
||||||
{
|
{
|
||||||
keyboard_window->refresh_windows_flag--;
|
keyboard_window->refresh_windows_flag--;
|
||||||
//refresh_windows
|
//refresh_windows
|
||||||
LCD_ShowString(keyboard_window->x,keyboard_window->y+16,"test",16,CYAN,RED);
|
//LCD_ShowString(keyboard_window->x,keyboard_window->y+16,"test",16,CYAN,RED);
|
||||||
|
down_one_key(keyboard_window->x+2,keyboard_window->y+17,'0'); down_one_key(keyboard_window->x+34,keyboard_window->y+17,'1'); down_one_key(keyboard_window->x+66,keyboard_window->y+17,'2'); down_one_key(keyboard_window->x+98,keyboard_window->y+17,'3');
|
||||||
|
down_one_key(keyboard_window->x+2,keyboard_window->y+49,'4'); down_one_key(keyboard_window->x+34,keyboard_window->y+49,'5'); down_one_key(keyboard_window->x+66,keyboard_window->y+49,'6'); down_one_key(keyboard_window->x+98,keyboard_window->y+49,'7');
|
||||||
|
down_one_key(keyboard_window->x+2,keyboard_window->y+81,'8'); down_one_key(keyboard_window->x+34,keyboard_window->y+81,'9'); down_one_key(keyboard_window->x+66,keyboard_window->y+81,'A'); down_one_key(keyboard_window->x+98,keyboard_window->y+81,'B');
|
||||||
|
down_one_key(keyboard_window->x+2,keyboard_window->y+113,'C'); down_one_key(keyboard_window->x+34,keyboard_window->y+113,'D'); down_one_key(keyboard_window->x+66,keyboard_window->y+113,'E'); down_one_key(keyboard_window->x+98,keyboard_window->y+113,'F');
|
||||||
|
|
||||||
|
down_one_key(keyboard_window->x+140,keyboard_window->y+81,'<');
|
||||||
|
down_one_key(keyboard_window->x+140,keyboard_window->y+113,'X');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ window *New_Window(UI *ui,uint16_t x,uint16_t y,uint16_t width,uint16_t high,COL
|
|||||||
temp_window->x=x;
|
temp_window->x=x;
|
||||||
temp_window->y=y;
|
temp_window->y=y;
|
||||||
temp_window->refresh_windows_flag=2;
|
temp_window->refresh_windows_flag=2;
|
||||||
|
temp_window->touch_flag=0;
|
||||||
for(int a=0;a<16;a++)
|
for(int a=0;a<16;a++)
|
||||||
{
|
{
|
||||||
temp_window->title[a]=title[a];
|
temp_window->title[a]=title[a];
|
||||||
@@ -371,6 +372,10 @@ void UI_Server(UI *ui)
|
|||||||
hit_flag=Chack(temp_window,t_x,t_y); //检查触摸是否命中 直接返回命中窗口的位置
|
hit_flag=Chack(temp_window,t_x,t_y); //检查触摸是否命中 直接返回命中窗口的位置
|
||||||
if(hit_flag) // 命中继续
|
if(hit_flag) // 命中继续
|
||||||
{
|
{
|
||||||
|
|
||||||
|
temp_window->touch_flag=1;
|
||||||
|
temp_window->touch_x=t_x;
|
||||||
|
temp_window->touch_y=t_y;
|
||||||
if(temp_windows_stack!=ui->last_windows) //检查是否最前端的窗口 如果不是就放最前面
|
if(temp_windows_stack!=ui->last_windows) //检查是否最前端的窗口 如果不是就放最前面
|
||||||
{
|
{
|
||||||
if(temp_windows_stack!=ui->windows) //检查是否最后端的窗口 因为显示是从最后端往前显示的 所以ui有最后端窗口的入口
|
if(temp_windows_stack!=ui->windows) //检查是否最后端的窗口 因为显示是从最后端往前显示的 所以ui有最后端窗口的入口
|
||||||
@@ -387,6 +392,7 @@ void UI_Server(UI *ui)
|
|||||||
ui->last_windows->next=temp_windows_stack; //原来的最后一个指向现在的最后一个
|
ui->last_windows->next=temp_windows_stack; //原来的最后一个指向现在的最后一个
|
||||||
ui->last_windows=temp_windows_stack; //更新ui中的最后一个的入口
|
ui->last_windows=temp_windows_stack; //更新ui中的最后一个的入口
|
||||||
ui->refresh_ui_flag=1; //发生了变化 刷新ui的显示
|
ui->refresh_ui_flag=1; //发生了变化 刷新ui的显示
|
||||||
|
temp_window->refresh_windows_flag=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//检查标中窗口的什么位置
|
//检查标中窗口的什么位置
|
||||||
@@ -410,6 +416,10 @@ void UI_Server(UI *ui)
|
|||||||
|
|
||||||
|
|
||||||
flag=0; //结束扫描 防止穿透当前窗口
|
flag=0; //结束扫描 防止穿透当前窗口
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
temp_windows_stack=temp_windows_stack->up; //往前扫描
|
temp_windows_stack=temp_windows_stack->up; //往前扫描
|
||||||
}else
|
}else
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#define WINDOWS_H_
|
#define WINDOWS_H_
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
|
#include "key.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -19,6 +20,9 @@ typedef struct
|
|||||||
COLOR_16 background;
|
COLOR_16 background;
|
||||||
char title[16];
|
char title[16];
|
||||||
uint8_t refresh_windows_flag;
|
uint8_t refresh_windows_flag;
|
||||||
|
char touch_flag;
|
||||||
|
int touch_x;
|
||||||
|
int touch_y;
|
||||||
|
|
||||||
|
|
||||||
}window;
|
}window;
|
||||||
|
|||||||
Reference in New Issue
Block a user