#ifndef _APP_H #define _APP_H #include "MyLib.h" #include "serial_port.h" #include "m1820.h" #include "oled2.h" #include "ads1220.h" #include "tmc5160.h" #include "main.h" #include "i2c.h" #include "spi.h" #include "tim.h" #include "usart.h" #include "Uart1.h" #include "gpio.h" #include "key.h" #include "motor.h" #include "delay.h" #include "stdio.h" #include "stdlib.h" #include "string.h" #include "flash.h" #define ocin1 HAL_GPIO_ReadPin(OCIN1_GPIO_Port,OCIN1_Pin) #define ocin2 HAL_GPIO_ReadPin(OCIN2_GPIO_Port,OCIN2_Pin) void app_act (void); void motor_protect_ads(float threshold_neg, float threshold_pos); void motor_protect_ocin(void); extern int it_1ms_cnt ,it_1ms_flag; extern int it_200ms_cnt ,it_200ms_flag; extern int it_5ms_cnt ,it_5ms_flag; extern int it_10ms_cnt ,it_10ms_flag; extern int it_50ms_cnt ,it_50ms_flag; extern int it_100ms_cnt ,it_100ms_flag; extern int it_300ms_cnt ,it_300ms_flag; extern int it_500ms_cnt ,it_500ms_flag; extern int it_1000ms_cnt ,it_1000ms_flag; extern int it_5000ms_cnt,it_5000ms_flag; extern uint8_t rx_data2[6]; extern uint8_t magnet_tx[7]; extern unsigned int smp_intr_temp[2]; extern unsigned int smp_dpth_temp[2]; extern uint16_t flash_wrt[6]; extern uint16_t flash_rd[6]; //extern int I2C_ERROR_TIMES ,I2C_BUSY_TIMES ,I2C_TIMEOUT_TIMES ,I2C_OK_TIMES ; extern signed int first_xa_32;//记录上电时电机位置 extern float X_ads1220; extern float TEMP_M1820; extern float X_ads1220_prc; #endif