07b64425cd
添加 getinfo.c 添加依赖包 cJSON-latest webclient-v2.2.0 322.54 KB/32.36 KB/67636
59 lines
1.4 KiB
C
59 lines
1.4 KiB
C
/*
|
||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||
*
|
||
* SPDX-License-Identifier: Apache-2.0
|
||
*
|
||
* Change Logs:
|
||
* Date Author Notes
|
||
* 2023-04-27 RT-Thread first version
|
||
*/
|
||
|
||
#include <rtthread.h>
|
||
|
||
#define LOG_TAG "main"
|
||
#define LOG_LVL LOG_LVL_DBG
|
||
#include <ulog.h>
|
||
#include <board.h>
|
||
|
||
//#define LED_HEART GET_PIN(E,3)
|
||
//#ifndef ETH_RESET_PIN
|
||
//#define ETH_RESET_PIN GET_PIN(E, 7)//71
|
||
//#endif
|
||
////#define RESET_LB GET_PIN(E, 1)
|
||
////#define RESET_UB GET_PIN(E, 0)
|
||
////#define RESET_CE GET_PIN(G, 10)
|
||
|
||
int main(void)
|
||
{
|
||
|
||
LOG_D("SYSCLK_Frequency = %d", HAL_RCC_GetSysClockFreq());
|
||
LOG_D("HCLK_Frequency = %d", HAL_RCC_GetHCLKFreq());
|
||
LOG_D("PCLK1_Frequency = %d", HAL_RCC_GetPCLK1Freq());
|
||
LOG_D("PCLK2_Frequency = %d", HAL_RCC_GetPCLK2Freq());
|
||
|
||
// #define LED_HEART GET_PIN(E,3)
|
||
/* 设置PIN脚模式为输出 */
|
||
rt_pin_mode(LED_HEART, PIN_MODE_OUTPUT);
|
||
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_kprintf("Heartbeat.\n");
|
||
|
||
/* 拉高PIN脚 */
|
||
rt_pin_write(LED_HEART, PIN_HIGH);
|
||
rt_thread_mdelay(1000);
|
||
}
|
||
|
||
return RT_EOK;
|
||
}
|
||
//fastlz_test -c demo.bin f.bin
|
||
|