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.
 
 
 

45 lines
1.0 KiB

#include <stddef.h>
#include <stdio.h>
//
#include "base_service/base_service.h"
#include "service/network_service.h"
//
#define TAG "main"
using namespace std;
extern void umain();
extern "C" {
extern void MX_LWIP_Init(void);
void StartDefaultTask(void const* argument) {
umain();
}
}
/*******************************************************************************
* MAIN *
*******************************************************************************/
xs_gpio_t m_debug_led;
void umain() {
XS_LOGI(TAG, "%s:%s", PC_PROJECT_NAME, PC_VERSION);
/**
* @brief 调试指示灯初始化
*/
xs_gpio_init_as_output(&m_debug_led, PC_DEBUG_LIGHT_GPIO, kxs_gpio_nopull, false, false);
/**
* @brief 配置初始化
*/
config_init();
/**
* @brief 初始化网络服务
*/
network_service_init();
while (true) {
xs_gpio_write(&m_debug_led, true);
xs_delay_ms(100);
xs_gpio_write(&m_debug_led, false);
xs_delay_ms(100);
}
}