資源簡介
RT-Thread入門(一)建立工程 stm32f103c8 + hal庫
Keil不需要安裝rtt插件,代碼中包含所需的庫文件。
代碼片段和文件信息
#include?“led.h“
//初始化PB1為輸出.并使能時鐘 ????
//LED?IO初始化
void?LED_Init(void)
{
????GPIO_InitTypeDef?GPIO_Initure;
????__HAL_RCC_GPIOC_CLK_ENABLE();??????????? //開啟GPIOB時鐘
__HAL_RCC_GPIOE_CLK_ENABLE();??????????? //開啟GPIOE時鐘
????GPIO_Initure.Pin=GPIO_PIN_13;? //PB5
????GPIO_Initure.Mode=GPIO_MODE_OUTPUT_PP;?? //推挽輸出
????GPIO_Initure.Pull=GPIO_PULLUP;?????????? //上拉
????GPIO_Initure.Speed=GPIO_SPEED_HIGH;???? ? //高速
????HAL_GPIO_Init(GPIOC&GPIO_Initure);
// GPIO_Initure.Pin=GPIO_PIN_5|GPIO_PIN_6;? //PE5?PE6
// HAL_GPIO_Init(GPIOE&GPIO_Initure);
????HAL_GPIO_WritePin(GPIOCGPIO_PIN_13GPIO_PIN_SET); //PB5置1,默認初始化后燈滅
//????HAL_GPIO_WritePin(GPIOEGPIO_PIN_5|GPIO_PIN_6GPIO_PIN_SET); //PE5置1,默認初始化后燈滅
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-01-20?17:58??RT-Thread_C8\
?????目錄???????????0??2019-01-21?10:49??RT-Thread_C8\applications\
?????文件?????????794??2019-01-21?10:16??RT-Thread_C8\applications\led.c
?????文件?????????160??2019-01-21?10:16??RT-Thread_C8\applications\led.h
?????文件?????????622??2019-01-21?10:49??RT-Thread_C8\applications\main.c
?????文件?????????237??2018-05-31?17:47??RT-Thread_C8\applications\SConsc
?????文件????????2553??2017-05-24?16:15??RT-Thread_C8\applications\sys.c
?????文件????????3660??2017-05-24?16:19??RT-Thread_C8\applications\sys.h
?????目錄???????????0??2019-01-20?15:49??RT-Thread_C8\components\
?????目錄???????????0??2019-01-20?15:49??RT-Thread_C8\components\CMSIS\
?????目錄???????????0??2019-01-20?15:49??RT-Thread_C8\components\CMSIS\Include\
?????文件????????4676??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\arm_common_tables.h
?????文件??????242444??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\arm_math.h
?????文件???????33042??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_cm0.h
?????文件???????40429??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_cm0plus.h
?????文件???????99832??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_cm3.h
?????文件??????109142??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_cm4.h
?????文件???????22735??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_cm4_simd.h
?????文件???????17146??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_cmFunc.h
?????文件???????20513??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_cmInstr.h
?????文件???????41744??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_sc000.h
?????文件???????98211??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Include\core_sc300.h
?????文件?????????441??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\Kconfig
?????文件????????1516??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\README.txt
?????目錄???????????0??2019-01-20?15:49??RT-Thread_C8\components\CMSIS\RTOS\
?????文件???????36836??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\RTOS\cmsis_os.h
?????文件????????8532??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\RTOS\cmsis_rtthread.c
?????文件?????????201??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\RTOS\SConsc
?????文件?????????312??2018-05-31?17:47??RT-Thread_C8\components\CMSIS\SConsc
?????目錄???????????0??2019-01-20?15:49??RT-Thread_C8\components\cplusplus\
?????文件????????1404??2018-05-31?17:47??RT-Thread_C8\components\cplusplus\crt.cpp
............此處省略2894個文件信息
評論
共有 條評論