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.
 
 
 

33 lines
893 B

#include "device.hpp"
#include "iflytop_xsync/iflytop_xsync.h"
#include "project_configs.h"
using namespace iflytop;
// extern DMA_HandleTypeDef PC_DEBUG_UART_DMA_HANDLER;
#define TAG "Device"
void Device::init() {
xs_gpio_init_as_output(&m_debug_led, PC_DEBUG_LIGHT_GPIO, kxs_gpio_nopull, false, false);
XS_LOGI(TAG, "%s:%s", PC_PROJECT_NAME, PC_VERSION);
// chip_cfg_t chipcfg = {};
// chipcfg.us_dleay_tim = &PC_SYS_DELAY_US_TIMER;
// chipcfg.tim_irq_scheduler_tim = &PC_SYS_TIM_IRQ_SCHEDULER_TIMER;
// chipcfg.huart = &PC_DEBUG_UART;
// chipcfg.debuglight = PC_DEBUG_LIGHT_GPIO;
// chip_init(&chipcfg);
// zos_cfg_t zoscfg;
// zos_init(&zoscfg);
}
void Device::loop() {
while (1) {
xs_gpio_write(&m_debug_led, true);
xs_delay_ms(1000);
xs_gpio_write(&m_debug_led, false);
xs_delay_ms(1000);
}
}