10 changed files with 211 additions and 24 deletions
-
2app_protocols/transmit_disfection_protocol
-
80usrc/app/dmapp.cpp
-
1usrc/board_base/app_share/air_compressor_controller.hpp
-
76usrc/board_base/app_share/blower_controller.hpp
-
58usrc/board_base/baseboard/dbdm_power_ctrl_board.cpp
-
13usrc/board_base/baseboard/dbdm_power_ctrl_board.hpp
-
1usrc/board_base/board_base.hpp
-
2zsdk
-
1zstm32/halport/gins.c
-
1zstm32/halport/gins.h
@ -1 +1 @@ |
|||
Subproject commit 72a9aadd6793193e8b1c475d4774ad0fc4d05590 |
|||
Subproject commit 38ea8db7c4b148c6f21b03b1099a82258ed8cd3f |
@ -0,0 +1,58 @@ |
|||
#pragma once
|
|||
#include "dbdm_power_ctrl_board.hpp"
|
|||
using namespace iflytop; |
|||
void DBDMPowerCtrlBoard::HTIM3_INIT() { |
|||
/* USER CODE BEGIN TIM3_Init 0 */ |
|||
|
|||
/* USER CODE END TIM3_Init 0 */ |
|||
|
|||
TIM_ClockConfigTypeDef sClockSourceConfig = {0}; |
|||
TIM_MasterConfigTypeDef sMasterConfig = {0}; |
|||
TIM_OC_InitTypeDef sConfigOC = {0}; |
|||
|
|||
/* USER CODE BEGIN TIM3_Init 1 */ |
|||
|
|||
/* USER CODE END TIM3_Init 1 */ |
|||
htim3.Instance = TIM3; |
|||
htim3.Init.Prescaler = 143; |
|||
htim3.Init.CounterMode = TIM_COUNTERMODE_UP; |
|||
htim3.Init.Period = 9999; |
|||
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; |
|||
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; |
|||
if (HAL_TIM_Base_Init(&htim3) != HAL_OK) { |
|||
Error_Handler(); |
|||
} |
|||
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; |
|||
if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK) { |
|||
Error_Handler(); |
|||
} |
|||
if (HAL_TIM_PWM_Init(&htim3) != HAL_OK) { |
|||
Error_Handler(); |
|||
} |
|||
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; |
|||
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; |
|||
if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK) { |
|||
Error_Handler(); |
|||
} |
|||
sConfigOC.OCMode = TIM_OCMODE_PWM1; |
|||
sConfigOC.Pulse = 0; |
|||
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; |
|||
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; |
|||
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) { |
|||
Error_Handler(); |
|||
} |
|||
/* USER CODE BEGIN TIM3_Init 2 */ |
|||
|
|||
/* USER CODE END TIM3_Init 2 */ |
|||
__HAL_RCC_GPIOC_CLK_ENABLE(); |
|||
/**TIM3 GPIO Configuration
|
|||
PC8 ------> TIM3_CH3 |
|||
*/ |
|||
GPIO_InitTypeDef GPIO_InitStruct = {0}; |
|||
GPIO_InitStruct.Pin = GPIO_PIN_8; |
|||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; |
|||
GPIO_InitStruct.Pull = GPIO_NOPULL; |
|||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; |
|||
GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; |
|||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); |
|||
} |
@ -0,0 +1,13 @@ |
|||
#pragma once
|
|||
#include <stddef.h>
|
|||
#include <stdio.h>
|
|||
|
|||
#include "base/appdep.hpp"
|
|||
|
|||
namespace iflytop { |
|||
class DBDMPowerCtrlBoard { |
|||
public: |
|||
static void HTIM3_INIT(); |
|||
private: |
|||
}; |
|||
} // namespace iflytop
|
@ -1 +1 @@ |
|||
Subproject commit 56b0595562d44d5ed960fcada360556ab816ce76 |
|||
Subproject commit e3bb71df415b83ce7e8224dc6b55dc0880d8895a |
Write
Preview
Loading…
Cancel
Save
Reference in new issue