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-07-27 09:58:57 +08:00
|
|
|
ethernet_init();
|
2021-07-26 17:17:04 +08:00
|
|
|
HAL_TIM_Base_Start_IT(&htim4);
|
2021-07-27 09:58:57 +08:00
|
|
|
// HAL_TIM_Base_Start(&htim3);
|
|
|
|
// eem_power_init();
|
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
|
|
|
{
|
2021-07-27 09:58:57 +08:00
|
|
|
if (HAL_GPIO_ReadPin(KEY_GPIO_Port, KEY_Pin) == GPIO_PIN_RESET)
|
|
|
|
{
|
|
|
|
HAL_Delay(50);
|
|
|
|
if (HAL_GPIO_ReadPin(KEY_GPIO_Port, KEY_Pin) == GPIO_PIN_RESET)
|
|
|
|
{
|
|
|
|
// ethernet_reset();
|
|
|
|
// HAL_GPIO_TogglePin(EEM_POWER_SW_GPIO_Port, EEM_POWER_SW_Pin);
|
|
|
|
while (HAL_GPIO_ReadPin(KEY_GPIO_Port, KEY_Pin) == GPIO_PIN_RESET);
|
|
|
|
}
|
|
|
|
}
|
2021-07-26 17:17:04 +08:00
|
|
|
}
|