• 大小: 32.78MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-17
  • 语言: 其他
  • 标签: stm32  RT-Thread  

资源简介

通过创建多个进程感受RT-Thread和裸跑程序的不同。这次我们将将上次工程中控制LED和串口的两部分分离,独立成两个不同的线程。

资源截图

代码片段和文件信息

#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-25 13:40  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
     文件        2339  2019-01-25 13:40  RT-Thread_C8\applications\main.c
     文件         237  2018-05-31 17:47  RT-Thread_C8\applications\SConscript
     文件          30  2019-01-24 16:23  RT-Thread_C8\applications\SIM800C.c
     文件          56  2019-01-24 16:23  RT-Thread_C8\applications\SIM800C.h
     文件        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\SConscript
     文件         312  2018-05-31 17:47  RT-Thread_C8\components\CMSIS\SConscript
............此处省略2897个文件信息

评论

共有 条评论