wip
This commit is contained in:
14
workspace/AUTOM10/Core/Inc/cdc_int.h
Normal file
14
workspace/AUTOM10/Core/Inc/cdc_int.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* cdc_int.h
|
||||
*
|
||||
* Created on: Dec 6, 2025
|
||||
* Author: user
|
||||
*/
|
||||
|
||||
#ifndef INC_CDC_INT_H_
|
||||
#define INC_CDC_INT_H_
|
||||
|
||||
void manageCDC(void);
|
||||
|
||||
|
||||
#endif /* INC_CDC_INT_H_ */
|
||||
@@ -59,6 +59,68 @@ void Error_Handler(void);
|
||||
/* USER CODE END EFP */
|
||||
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define LED2_Pin GPIO_PIN_13
|
||||
#define LED2_GPIO_Port GPIOC
|
||||
#define P1_Pin GPIO_PIN_14
|
||||
#define P1_GPIO_Port GPIOC
|
||||
#define P2_Pin GPIO_PIN_15
|
||||
#define P2_GPIO_Port GPIOC
|
||||
#define IN1_Pin GPIO_PIN_0
|
||||
#define IN1_GPIO_Port GPIOA
|
||||
#define IN2_Pin GPIO_PIN_1
|
||||
#define IN2_GPIO_Port GPIOA
|
||||
#define IN3_Pin GPIO_PIN_2
|
||||
#define IN3_GPIO_Port GPIOA
|
||||
#define IN4_Pin GPIO_PIN_3
|
||||
#define IN4_GPIO_Port GPIOA
|
||||
#define AIN1_Pin GPIO_PIN_4
|
||||
#define AIN1_GPIO_Port GPIOA
|
||||
#define AIN2_Pin GPIO_PIN_5
|
||||
#define AIN2_GPIO_Port GPIOA
|
||||
#define AIN3_Pin GPIO_PIN_6
|
||||
#define AIN3_GPIO_Port GPIOA
|
||||
#define AIN4_Pin GPIO_PIN_7
|
||||
#define AIN4_GPIO_Port GPIOA
|
||||
#define ANEM_Pin GPIO_PIN_0
|
||||
#define ANEM_GPIO_Port GPIOB
|
||||
#define INH1_Pin GPIO_PIN_1
|
||||
#define INH1_GPIO_Port GPIOB
|
||||
#define INH2_Pin GPIO_PIN_2
|
||||
#define INH2_GPIO_Port GPIOB
|
||||
#define INH3_Pin GPIO_PIN_10
|
||||
#define INH3_GPIO_Port GPIOB
|
||||
#define INH4_Pin GPIO_PIN_11
|
||||
#define INH4_GPIO_Port GPIOB
|
||||
#define CH1_Pin GPIO_PIN_12
|
||||
#define CH1_GPIO_Port GPIOB
|
||||
#define CH2_Pin GPIO_PIN_13
|
||||
#define CH2_GPIO_Port GPIOB
|
||||
#define CH3_Pin GPIO_PIN_14
|
||||
#define CH3_GPIO_Port GPIOB
|
||||
#define CH4_Pin GPIO_PIN_15
|
||||
#define CH4_GPIO_Port GPIOB
|
||||
#define BUZ_Pin GPIO_PIN_8
|
||||
#define BUZ_GPIO_Port GPIOA
|
||||
#define SWIO_Pin GPIO_PIN_13
|
||||
#define SWIO_GPIO_Port GPIOA
|
||||
#define SWCLK_Pin GPIO_PIN_14
|
||||
#define SWCLK_GPIO_Port GPIOA
|
||||
#define LED1_Pin GPIO_PIN_15
|
||||
#define LED1_GPIO_Port GPIOA
|
||||
#define EXP1_Pin GPIO_PIN_3
|
||||
#define EXP1_GPIO_Port GPIOB
|
||||
#define EXP2_Pin GPIO_PIN_4
|
||||
#define EXP2_GPIO_Port GPIOB
|
||||
#define EXP3_Pin GPIO_PIN_5
|
||||
#define EXP3_GPIO_Port GPIOB
|
||||
#define IN5_Pin GPIO_PIN_6
|
||||
#define IN5_GPIO_Port GPIOB
|
||||
#define IN6_Pin GPIO_PIN_7
|
||||
#define IN6_GPIO_Port GPIOB
|
||||
#define IN7_Pin GPIO_PIN_8
|
||||
#define IN7_GPIO_Port GPIOB
|
||||
#define IN8_Pin GPIO_PIN_9
|
||||
#define IN8_GPIO_Port GPIOB
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
|
||||
36
workspace/AUTOM10/Core/Inc/pwm.h
Normal file
36
workspace/AUTOM10/Core/Inc/pwm.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* pwm.h
|
||||
*
|
||||
* Created on: Dec 6, 2025
|
||||
* Author: user
|
||||
*/
|
||||
|
||||
#ifndef INC_PWM_H_
|
||||
#define INC_PWM_H_
|
||||
#include <stdbool.h>
|
||||
bool IsPwmRunning(TIM_HandleTypeDef *htim, uint32_t Channel);;
|
||||
void StopMot(TIM_HandleTypeDef *htim,uint32_t Channel);
|
||||
void StartMot(TIM_HandleTypeDef *htim,uint32_t Channel,uint16_t pwmval);
|
||||
void SetMotPwm(TIM_HandleTypeDef *htim,uint32_t Channel,uint16_t pwmval);
|
||||
void SetMot(uint8_t mot,uint8_t dir,uint16_t pwmval);
|
||||
|
||||
#define timMot1 &htim2
|
||||
#define FWMot1 TIM_CHANNEL_1
|
||||
#define BWMot1 TIM_CHANNEL_2
|
||||
|
||||
#define timMot2 &htim2
|
||||
#define FWMot2 TIM_CHANNEL_3
|
||||
#define BWMot2 TIM_CHANNEL_4
|
||||
|
||||
#define timMot3 &htim4
|
||||
#define FWMot3 TIM_CHANNEL_1
|
||||
#define BWMot3 TIM_CHANNEL_2
|
||||
|
||||
#define timMot4 &htim4
|
||||
#define FWMot4 TIM_CHANNEL_3
|
||||
#define BWMot4 TIM_CHANNEL_4
|
||||
|
||||
#define FW 0
|
||||
#define BW 1
|
||||
|
||||
#endif /* INC_PWM_H_ */
|
||||
@@ -65,7 +65,7 @@
|
||||
/*#define HAL_SPI_MODULE_ENABLED */
|
||||
/*#define HAL_SRAM_MODULE_ENABLED */
|
||||
#define HAL_TIM_MODULE_ENABLED
|
||||
/*#define HAL_UART_MODULE_ENABLED */
|
||||
#define HAL_UART_MODULE_ENABLED
|
||||
/*#define HAL_USART_MODULE_ENABLED */
|
||||
/*#define HAL_WWDG_MODULE_ENABLED */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user