From 5284e1c741f9d26b6f7946a2a5898e65ab320b1a Mon Sep 17 00:00:00 2001 From: murmur Date: Fri, 28 Apr 2023 08:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BD=8E=E5=8A=9F=E8=80=97?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20--ok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/comp.c | 2 +- applications/main.c | 19 ++++++++++++++----- drivers/board.h | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/applications/comp.c b/applications/comp.c index 3cba541..57bac8e 100644 --- a/applications/comp.c +++ b/applications/comp.c @@ -317,6 +317,6 @@ void comp_file_test(int argc, char **argv) #include -MSH_CMD_EXPORT(comp_file_test, fastlz compress and decompress test); +MSH_CMD_EXPORT(comp_file_test, 使用fastlz压缩文件。); #endif #endif diff --git a/applications/main.c b/applications/main.c index 863290a..36070bb 100644 --- a/applications/main.c +++ b/applications/main.c @@ -15,6 +15,12 @@ #include #include +#define LED_HEART GET_PIN(E,3) +#define ETH_RESET_PIN GET_PIN(E, 7)//71 +//#define RESET_LB GET_PIN(E, 1) +//#define RESET_UB GET_PIN(E, 0) +//#define RESET_CE GET_PIN(G, 10) + int main(void) { @@ -23,15 +29,20 @@ int main(void) LOG_D("PCLK1_Frequency = %d", HAL_RCC_GetPCLK1Freq()); LOG_D("PCLK2_Frequency = %d", HAL_RCC_GetPCLK2Freq()); - #define LED_HEART GET_PIN(E,3) +// #define LED_HEART GET_PIN(E,3) /* 设置PIN脚模式为输出 */ rt_pin_mode(LED_HEART, PIN_MODE_OUTPUT); - while(1) + rt_pin_mode(ETH_RESET_PIN, PIN_MODE_OUTPUT); + + rt_pin_write(ETH_RESET_PIN, PIN_LOW);//关闭ETH + + + while (1) { /* 拉低PIN脚 */ rt_pin_write(LED_HEART, PIN_LOW); /* 延时1ms,省电 */ - rt_thread_mdelay(1);//去掉延时,共用print替换 + rt_thread_mdelay(1); //去掉延时,共用print替换 // rt_kprintf("Heartbeat.\n"); /* 拉高PIN脚 */ @@ -43,5 +54,3 @@ int main(void) } //fastlz_test -c demo.bin f.bin - - diff --git a/drivers/board.h b/drivers/board.h index f005701..89cf59d 100644 --- a/drivers/board.h +++ b/drivers/board.h @@ -44,7 +44,7 @@ extern "C" #define BSP_CLOCK_SOURCE ("HSI") #define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0) -#define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)168) +#define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)50) /*-------------------------- CLOCK CONFIG END --------------------------*/