29 lines
707 B
C
29 lines
707 B
C
#include "user_main.h"
|
|
|
|
int8_t fsmc_buf;
|
|
|
|
void user_setup()
|
|
{
|
|
flash_fpga();
|
|
// ethernet_init();
|
|
HAL_TIM_Base_Start_IT(&htim4);
|
|
HAL_TIM_Base_Start(&htim3);
|
|
eem_power_init();
|
|
uint8_t str[10] = "test";
|
|
HAL_UART_Transmit(&huart4, str, 5, 100);
|
|
}
|
|
|
|
void user_loop()
|
|
{
|
|
read_fsmc(0, (uint8_t*)&fsmc_buf);
|
|
// for (uint16_t i = 0; i < 65536; i++)
|
|
// {
|
|
// read_fsmc(i, fsmc_buf);
|
|
// HAL_Delay(1000);
|
|
// }
|
|
// fsmc_buf[0] = HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_14);
|
|
// fsmc_buf[1] = HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_15);
|
|
// fsmc_buf[2] = HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_0);
|
|
// fsmc_buf[3] = HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_1);
|
|
key_events();
|
|
} |