You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
991 B
46 lines
991 B
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "lwip/opt.h"
|
|
#include "lwip/sys.h"
|
|
#include "lwip/api.h"
|
|
#include "main.h"
|
|
#include "zport.h"
|
|
#include "zboard.h"
|
|
#include "encoder.h"
|
|
#include "udpclient.h"
|
|
#include "zflash.h"
|
|
|
|
HAL_StatusTypeDef flash_status;
|
|
|
|
void user_main()
|
|
{
|
|
encoder_start();
|
|
udp_client_init();
|
|
printf("==============ethernet_sound_acquisition_card=============\r\n");
|
|
printf("version %d.%d", VERSION_MAIN_ID, VERSION_SUB_ID);
|
|
|
|
flash_status = FlashErase();
|
|
if (flash_status != HAL_OK)
|
|
{
|
|
printf("flash erase error, flash_status:%d\r\n", flash_status);
|
|
}
|
|
|
|
flash_status = FlashWrite(FLASH_START_ADDRESS, 123456);
|
|
if (flash_status != HAL_OK)
|
|
{
|
|
printf("flash write error, flash_status:%d\r\n", flash_status);
|
|
}
|
|
|
|
printf("flash read data:%d\r\n", FlashRead(FLASH_START_ADDRESS));
|
|
|
|
while (1)
|
|
{
|
|
udp_client_recv();
|
|
encoder_read_printf();
|
|
port_do_debug_light_state();
|
|
osDelay(1);
|
|
}
|
|
}
|