/* * @Author: wujunchao 24472040@qq.com * @Date: 2024-05-21 13:47:11 * @LastEditors: wujunchao 24472040@qq.com * @LastEditTime: 2024-10-14 15:22:14 * @FilePath: \mfps\App\Inc\app.h * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ #ifndef _APP_H #define _APP_H #include "MyLib.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) #define GREEN_ON HAL_GPIO_WritePin(LED_NOR_GPIO_Port, LED_NOR_Pin, GPIO_PIN_RESET) #define GREEN_OFF HAL_GPIO_WritePin(LED_NOR_GPIO_Port, LED_NOR_Pin, GPIO_PIN_SET) #define BLUE_ON HAL_GPIO_WritePin(LED_ERR_GPIO_Port, LED_ERR_Pin, GPIO_PIN_RESET) #define BLUE_OFF HAL_GPIO_WritePin(LED_ERR_GPIO_Port, LED_ERR_Pin, GPIO_PIN_SET) 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 int tick_500ms; 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