加入了max30102模块

This commit is contained in:
2021-08-21 13:53:13 +08:00
parent 2eb96d763e
commit c19c78ac1a
14 changed files with 6382 additions and 6250 deletions
+89
View File
@@ -0,0 +1,89 @@
SW_APPs/APP_blood.o: ../SW_APPs/APP_blood.c ../SW_APPs/APP_blood.h \
../Core/Inc/main.h ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
../Core/Inc/stm32f1xx_hal_conf.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h \
../Drivers/CMSIS/Include/core_cm3.h \
../Drivers/CMSIS/Include/cmsis_version.h \
../Drivers/CMSIS/Include/cmsis_compiler.h \
../Drivers/CMSIS/Include/cmsis_gcc.h \
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
../SW_APPs/windows.h \
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/lcd.h \
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/LCD.h
../SW_APPs/APP_blood.h:
../Core/Inc/main.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
../Core/Inc/stm32f1xx_hal_conf.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h:
../Drivers/CMSIS/Include/core_cm3.h:
../Drivers/CMSIS/Include/cmsis_version.h:
../Drivers/CMSIS/Include/cmsis_compiler.h:
../Drivers/CMSIS/Include/cmsis_gcc.h:
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h:
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
../SW_APPs/windows.h:
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/lcd.h:
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/LCD.h:
+2
View File
@@ -0,0 +1,2 @@
APP_blood.c:12:6:APP_blood_init 16 static
APP_blood.c:17:6:APP_blood_loop 4 static
+4 -1
View File
@@ -28,7 +28,8 @@ SW_APPs/Main_APP.o: ../SW_APPs/Main_APP.c ../SW_APPs/Main_APP.h \
../SW_APPs/windows.h \
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/lcd.h \
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/touch.h \
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/eeprom.h
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/eeprom.h \
../SW_APPs/APP_blood.h
../SW_APPs/Main_APP.h:
@@ -93,3 +94,5 @@ SW_APPs/Main_APP.o: ../SW_APPs/Main_APP.c ../SW_APPs/Main_APP.h \
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/touch.h:
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/eeprom.h:
../SW_APPs/APP_blood.h:
+1 -1
View File
@@ -1 +1 @@
Main_APP.c:17:6:main_app 96 static
Main_APP.c:20:6:main_app 96 static
+3
View File
@@ -5,14 +5,17 @@
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../SW_APPs/APP_blood.c \
../SW_APPs/Main_APP.c \
../SW_APPs/windows.c
OBJS += \
./SW_APPs/APP_blood.o \
./SW_APPs/Main_APP.o \
./SW_APPs/windows.o
C_DEPS += \
./SW_APPs/APP_blood.d \
./SW_APPs/Main_APP.d \
./SW_APPs/windows.d
+4 -4
View File
@@ -5,7 +5,7 @@ windows.c:67:9:New_Window 40 static
windows.c:114:6:Close_Windows_Stack 16 static
windows.c:154:6:Set_Windows_Title 24 static
windows.c:162:6:Set_Windows_XY_BY_ACC 24 static
windows.c:169:6:Refresh_Window 32 static
windows.c:212:6:Refresh_UI 32 static
windows.c:288:9:Chack 32 static
windows.c:308:6:UI_Server 40 static
windows.c:169:6:Refresh_Window 40 static
windows.c:241:6:Refresh_UI 32 static
windows.c:317:9:Chack 32 static
windows.c:337:6:UI_Server 40 static
BIN
View File
Binary file not shown.
+5637 -5779
View File
File diff suppressed because it is too large Load Diff
+547 -444
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -24,5 +24,6 @@
"./HW_Devices/LCD.o"
"./HW_Devices/eeprom.o"
"./HW_Devices/touch.o"
"./SW_APPs/APP_blood.o"
"./SW_APPs/Main_APP.o"
"./SW_APPs/windows.o"
+20
View File
@@ -0,0 +1,20 @@
/*
* APP_blood.c
*
* Created on: 2021年8月21日
* Author: wuwenfeng
*/
#include "APP_blood.h"
window *blood_win;
void APP_blood_init(window *a_window)
{
blood_win=a_window;
}
void APP_blood_loop()
{
}
+17
View File
@@ -0,0 +1,17 @@
/*
* APP_blood.h
*
* Created on: 2021Äê8ÔÂ21ÈÕ
* Author: wuwenfeng
*/
#ifndef APP_BLOOD_H_
#define APP_BLOOD_H_
#include "main.h"
#include "windows.h"
#include "LCD.h"
void APP_blood_init(window *a_window);
void APP_blood_loop();
#endif /* APP_BLOOD_H_ */
+14 -7
View File
@@ -10,6 +10,9 @@
#include "touch.h"
#include "eeprom.h"
#include "APP_blood.h"
extern touch_device t0;
task run_loop;//Ö÷Ñ­»·×´Ì¬»ú
@@ -25,25 +28,29 @@ void main_app()
UI *ui=UI_Init(BLACK);
New_Window(ui,10,10,100,100,WHITE,"WHITE");
New_Window(ui,25,30,150,100,GREEN,"GREEN");
New_Window(ui,80,80,60,90,YELLOW,"YELLOW");
New_Window(ui,120,90,70,60,MAGENTA,"MAGENTA");
APP_blood_init(New_Window(ui,10,10,128,128,WHITE,"MAX30102"));
//New_Window(ui,25,30,150,100,GREEN,"GREEN");
//New_Window(ui,80,80,60,90,YELLOW,"YELLOW");
//New_Window(ui,120,90,70,60,MAGENTA,"MAGENTA");
ui->refresh_ui_flag=1;
while(1)
{
LCD_set_dot(t0.pix_x, t0.pix_y, RED);
sprintf(str,"%04d\n%04d\n%04d",t0.pix_x,t0.pix_y,t0.c);
LCD_ShowString(0, 0, &str, 16, RED, BLUE);
//LCD_set_dot(t0.pix_x, t0.pix_y, RED);
//sprintf(str,"%04d\n%04d\n%04d",t0.pix_x,t0.pix_y,t0.c);
//LCD_ShowString(0, 0, &str, 16, RED, BLUE);
/*
switch(run_loop.sw)
{
}
*/
APP_blood_loop();
UI_Server(ui);
TP_Server();
EEPROM_SLOWWRITE_SERVER();
+33 -4
View File
@@ -166,13 +166,35 @@ void Set_Windows_XY_BY_ACC(window *temp_window,int acc_x,int acc_y)
}
//显示一个窗口
void Refresh_Window(window *temp_window)
void Refresh_Window(UI *ui,window *temp_window)
{
//开始绘制窗口//填充窗口背景
int x,y;
char z;
for(uint16_t temp_y=0;temp_y<temp_window->high;temp_y++)
{
Inteface_SetCursor(temp_window->x,temp_window->y+temp_y);
z=1;
for(uint16_t temp_i=0;temp_i<temp_window->width;temp_i++)
{
x=temp_window->x+temp_i;
y=temp_window->y+temp_y;
if(y>=ui->y&&z==1)
{
Inteface_SetCursor(x,y);
z=0;
}
if(x>=ui->x)
{
if(temp_y<16)
{
if(temp_i>temp_window->width-16)
{
Inteface_SetColor(RED);
}else
{
Inteface_SetColor(BLUE);
}
}else
{
if(temp_i==0||temp_y==0||temp_i==temp_window->width-1||temp_y==temp_window->high-1)
{
@@ -181,10 +203,16 @@ void Refresh_Window(window *temp_window)
{
Inteface_SetColor(temp_window->background);
}
}
}
}
}
//绘制bar
/*
for(uint16_t temp_y=0;temp_y<16;temp_y++)
{
Inteface_SetCursor(temp_window->x,temp_window->y+temp_y);
@@ -200,6 +228,7 @@ void Refresh_Window(window *temp_window)
}
}
*/
//显示title
LCD_ShowString(temp_window->x,temp_window->y,&temp_window->title,16,WHITE,WHITE);
@@ -230,7 +259,7 @@ void Refresh_UI(UI *ui)
if(temp_windows_stack!=NULL)
{
flag=1;
Refresh_Window(temp_windows_stack->window);
Refresh_Window(ui,temp_windows_stack->window);
//绘制下一个窗口
temp_windows_stack=temp_windows_stack->next;
}else
@@ -363,7 +392,7 @@ void UI_Server(UI *ui)
switch(hit_flag)
{
case CLOSE:
Close_Windows_Stack(ui,temp_windows_stack);
//Close_Windows_Stack(ui,temp_windows_stack);
ui->refresh_ui_flag=1; //发生了变化 刷新ui的显示
break;
case BAR: