From 83ac2024431e6bf3208f78031c4743ffc137b8f7 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Mon, 11 Mar 2024 16:26:57 +0800 Subject: [PATCH] update --- usrc/base_service/light_ctrl_service.c | 6 +++--- usrc/main.cpp | 7 +++---- usrc/project_configs.h | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/usrc/base_service/light_ctrl_service.c b/usrc/base_service/light_ctrl_service.c index 9832a4b..ece2605 100644 --- a/usrc/base_service/light_ctrl_service.c +++ b/usrc/base_service/light_ctrl_service.c @@ -4,9 +4,9 @@ zaf_gpio_t glight; zaf_gpio_t blight; void LightCtrlService_init() { - zaf_gpio_init_as_output(&rlight, LED_R_PIN, kxs_gpio_nopull, false, false); - zaf_gpio_init_as_output(&glight, LED_G_PIN, kxs_gpio_nopull, false, false); - zaf_gpio_init_as_output(&blight, LED_B_PIN, kxs_gpio_nopull, false, false); + zaf_gpio_init_as_output(&rlight, LED_R_PIN, kxs_gpio_nopull, true, false); + zaf_gpio_init_as_output(&glight, LED_G_PIN, kxs_gpio_nopull, true, false); + zaf_gpio_init_as_output(&blight, LED_B_PIN, kxs_gpio_nopull, true, false); } void LightCtrlService_RedLight_setState(bool state) { zaf_gpio_write(&rlight, state); } diff --git a/usrc/main.cpp b/usrc/main.cpp index 4ec13b3..6db01fc 100644 --- a/usrc/main.cpp +++ b/usrc/main.cpp @@ -111,7 +111,7 @@ void umain() { ZLOGI(TAG, "sn: %x:%x:%x", sn.sn0, sn.sn1, sn.sn2); LightCtrlService_init(); - LightCtrlService_GreenLight_setState(true); + LightCtrlService_BlueLight_setState(true); /** * @brief @@ -160,8 +160,8 @@ void umain() { extern_if_service_init(); - zaf_gpio_init_as_output(&m_fan0_power, PD0, kxs_gpio_pullup, false, true); - zaf_gpio_init_as_output(&m_fan1_power, PD1, kxs_gpio_pullup, false, true); + zaf_gpio_init_as_output(&m_fan0_power, PD0, kxs_gpio_pullup, true, false); + zaf_gpio_init_as_output(&m_fan1_power, PD1, kxs_gpio_pullup, true, false); zaf_gpio_init_as_input(&m_fan0_state, PD5, kxs_gpio_pullup, kxs_gpio_rising_irq, false); zaf_gpio_init_as_input(&m_fan1_state, PD6, kxs_gpio_pullup, kxs_gpio_rising_irq, false); @@ -170,7 +170,6 @@ void umain() { int32_t count = 0; - while (true) { osDelay(10); count++; diff --git a/usrc/project_configs.h b/usrc/project_configs.h index 75bf41b..d95348b 100644 --- a/usrc/project_configs.h +++ b/usrc/project_configs.h @@ -9,7 +9,7 @@ #define PC_MANUFACTURER1 ('t' | 'o' << 8 | 'p' << 16 | '\0' << 24) #define PC_PROJECT_NAME "zaf_lstc" #define PC_IFLYTOP_ENABLE_OS 1 -#define PC_DEVICE_TYPE ('c' | 'l' << 8 | 's' << 16 | 't' << 24) +#define PC_DEVICE_TYPE ('c' | 'l' << 8 | 's' << 16 | 't' << 24) #define PC_DEBUG_UART huart1 #define PC_DEBUG_UART_DMA_HANDLER hdma_usart1_rx @@ -33,9 +33,9 @@ /** * @brief ״ָ̬ʾµÆ */ -#define LED_R_PIN PD9 +#define LED_R_PIN PD11 #define LED_G_PIN PD10 -#define LED_B_PIN PD11 +#define LED_B_PIN PD9 #define SPI_CS PA4