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
|
|
|
{
|
2021-08-31 17:38:28 +08:00
|
|
|
flash_fpga();
|
|
|
|
// ethernet_init();
|
2021-07-26 17:17:04 +08:00
|
|
|
HAL_TIM_Base_Start_IT(&htim4);
|
2021-08-31 17:38:28 +08:00
|
|
|
HAL_TIM_Base_Start(&htim3);
|
|
|
|
eem_power_init();
|
2022-01-15 19:38:30 +08:00
|
|
|
uint8_t str[10] = "start";
|
|
|
|
HAL_UART_Transmit(&huart4, str, 6, 100);
|
2022-01-15 20:52:15 +08:00
|
|
|
|
|
|
|
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
|
|
|
}
|