blob: 2464f0e34be0f95c91619c9844b54f485d5e9347 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* File : ledapp.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2017-09-19 Quintin.Z the first version
*/
#include <stdio.h>
#include <rthw.h>
#include <rtdevice.h>
#include "board.h"
#include <rtthread.h>
#include "gpio.h"
void led_thread_entry(void* parameter)
{
GPIO_Init (GPIOA, GPIO_PTB5_MASK, GPIO_PinOutput);
while(1)
{
GPIO_Toggle (GPIOA, GPIO_PTB5_MASK);
rt_thread_delay(RT_TICK_PER_SECOND / 10);
}
}
|