BoooomFOC_STSPIN32G4_EVB/APP/APP_Main.h

48 lines
945 B
C
Raw Permalink Normal View History

2024-05-08 03:04:20 +08:00
//
// Created by ZK on 2023/3/10.
//
#ifndef BOOOOMFOC_STSPIN32G4_EVB_APP_MAIN_H
#define BOOOOMFOC_STSPIN32G4_EVB_APP_MAIN_H
#include "main.h"
#include "adc.h"
#include "dma.h"
2024-12-02 02:45:48 +08:00
#include "gpio.h"
2024-05-08 03:04:20 +08:00
#include "opamp.h"
#include "spi.h"
#include "tim.h"
2024-12-02 02:45:48 +08:00
//#include "arm_math.h"
//#include "Communication.h"
#include "InteriorADC.h"
#include "Angle.h"
2024-05-08 03:04:20 +08:00
2024-05-10 02:39:53 +08:00
2024-12-02 02:45:48 +08:00
extern DMA_HandleTypeDef hdma_usart1_rx;
extern DMA_HandleTypeDef hdma_usart1_tx;
2024-05-08 03:04:20 +08:00
2024-12-02 02:45:48 +08:00
extern uint8_t RxBuffer[2];//接收数据
extern uint8_t USART1_IRQHandler_Status;
extern volatile uint32_t SystickCount;
// LED ACT
#define LED_ACT_SET()
#define LED_ACT_RESET()
#define LED_ACT_GET()
2024-05-08 03:04:20 +08:00
2024-12-02 02:45:48 +08:00
static inline void watch_dog_feed(void)
{
// FWDGT_CTL = FWDGT_KEY_RELOAD;
}
static inline uint32_t get_ms_since(uint32_t tick)
{
return (uint32_t) ((SystickCount - tick) / 2U);
}
2024-05-17 00:43:58 +08:00
2024-05-08 03:04:20 +08:00
static __IO uint16_t adc1_RegularBuf[10];
void APP_Init();
void APP_Main();
2024-12-02 02:45:48 +08:00
#endif//BOOOOMFOC_STSPIN32G4_EVB_APP_MAIN_H