Syrostan-MCU-C/Core/Src/User/user_main.c

21 lines
444 B
C
Raw Normal View History

2021-07-26 17:17:04 +08:00
#include "user_main.h"
2021-07-27 09:58:57 +08:00
void user_setup()
2021-07-26 17:17:04 +08:00
{
flash_fpga();
// ethernet_init();
2021-07-26 17:17:04 +08:00
HAL_TIM_Base_Start_IT(&htim4);
HAL_TIM_Base_Start(&htim3);
eem_power_init();
uint8_t str[10] = "start";
HAL_UART_Transmit(&huart4, str, 6, 100);
HAL_GPIO_WritePin(GND1_SW_GPIO_Port, GND1_SW_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(GND2_SW_GPIO_Port, GND2_SW_Pin, GPIO_PIN_SET);
2021-07-26 17:17:04 +08:00
}
2021-07-27 09:58:57 +08:00
void user_loop()
2021-07-26 17:17:04 +08:00
{
2022-01-22 17:50:49 +08:00
hsadc();
key_events();
2021-07-26 17:17:04 +08:00
}