Skip to content

Commit

Permalink
Merge pull request #56 from mysterywolf/master
Browse files Browse the repository at this point in the history
format code
  • Loading branch information
armink committed Apr 11, 2021
2 parents 29ae0af + 5279977 commit 39dfef0
Show file tree
Hide file tree
Showing 42 changed files with 712 additions and 712 deletions.
6 changes: 3 additions & 3 deletions APP/inc/app_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <stdlib.h>
#include <stdio.h>
#include <rthw.h>
#include <rthw.h>
#include <rtthread.h>
#include <stm32f10x_conf.h>
#include "bsp.h"
Expand All @@ -15,7 +15,7 @@
#include "user_mb_app.h"

/*******************************************************************************************************/
// DEFINES
// DEFINES
/*******************************************************************************************************/


Expand All @@ -37,7 +37,7 @@ extern uint16_t usSRegHoldBuf[] ;
extern void cpu_usage_get(rt_uint8_t *major, rt_uint8_t *minor);
extern void cpu_usage_init(void);



void rtthread_startup(void);

Expand Down
2 changes: 1 addition & 1 deletion APP/inc/cpuusage.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void cpu_usage_init(void);







Expand Down
34 changes: 17 additions & 17 deletions APP/inc/delay_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@
// Filename : delay_config.h
// Version : V1.00
// Programmer(s) : Liuqiuhu
// funcion : This file is used to configure the delay time
// funcion : This file is used to configure the delay time
/*********************************************************************************************************/
#ifndef __DELAY_CONF_H__
#define __DELAY_CONF_H__

#include"rtconfig.h"

#if RT_TICK_PER_SECOND == 1
#define DELAY_1S (RT_TICK_PER_SECOND)
#define DELAY_S(X) (X*DELAY_1S)
#define DELAY_1S (RT_TICK_PER_SECOND)
#define DELAY_S(X) (X*DELAY_1S)

#elif RT_TICK_PER_SECOND == 10
#define DELAY_100MS(X) (X)
#define DELAY_S(X) (X*10)
#elif RT_TICK_PER_SECOND == 10
#define DELAY_100MS(X) (X)
#define DELAY_S(X) (X*10)

#elif RT_TICK_PER_SECOND == 100
#define DELAY_10MS(X) (X)
#define DELAY_100MS(X) (X*10)
#define DELAY_S(X) (X*100)
#elif RT_TICK_PER_SECOND == 100
#define DELAY_10MS(X) (X)
#define DELAY_100MS(X) (X*10)
#define DELAY_S(X) (X*100)

#elif (RT_TICK_PER_SECOND == 1000)

#define DELAY_1MS (RT_TICK_PER_SECOND/1000)
#define DELAY_1MS (RT_TICK_PER_SECOND/1000)
#define DELAY_MS(X) (X*DELAY_1MS)
#define DELAY_S(X) (X*1000*DELAY_1MS)
#define DELAY_S(X) (X*1000*DELAY_1MS)

#elif (RT_TICK_PER_SECOND == 10000)
#define DELAY_100US(X) (X*RT_TICK_PER_SECOND/10000)
#define DELAY_1MS (RT_TICK_PER_SECOND/1000)
#define DELAY_1MS (RT_TICK_PER_SECOND/1000)
#define DELAY_MS(X) (X*DELAY_1MS)
#define DELAY_S(X) (X*1000*DELAY_1MS)
#define DELAY_S(X) (X*1000*DELAY_1MS)

#endif

#define DELAY_SYS_RUN_LED DELAY_MS(500)
#define DELAY_SYS_SLEEP_LED DELAY_MS(1000)
#define DELAY_SYS_RUN_LED DELAY_MS(500)
#define DELAY_SYS_SLEEP_LED DELAY_MS(1000)

#endif
#endif

16 changes: 8 additions & 8 deletions APP/inc/rtconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
#define __RTTHREAD_CFG_H__

/* RT_NAME_MAX*/
#define RT_NAME_MAX 24
#define RT_NAME_MAX 24

/* RT_ALIGN_SIZE*/
#define RT_ALIGN_SIZE 8
#define RT_ALIGN_SIZE 8

/* PRIORITY_MAX */
#define RT_THREAD_PRIORITY_MAX 32
#define RT_THREAD_PRIORITY_MAX 32

/* Tick per Second */
#define RT_TICK_PER_SECOND 10000 //0.1ms
#define RT_TICK_PER_SECOND 10000 //0.1ms

/* SECTION: RT_DEBUG */
/* Thread Debug */
Expand All @@ -26,9 +26,9 @@

/* Using Software Timer */
#define RT_USING_TIMER_SOFT
#define RT_TIMER_THREAD_PRIO 4
#define RT_TIMER_THREAD_STACK_SIZE 512
#define RT_TIMER_TICK_PER_SECOND 1000
#define RT_TIMER_THREAD_PRIO 4
#define RT_TIMER_THREAD_STACK_SIZE 512
#define RT_TIMER_TICK_PER_SECOND 1000

/* SECTION: IPC */
/* Using Semaphore*/
Expand Down Expand Up @@ -69,7 +69,7 @@

/* SECTION: Console options */
/* the buffer size of console*/
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLEBUF_SIZE 128

/* SECTION: finsh, a C-Express shell */
//#define RT_USING_FINSH
Expand Down
16 changes: 8 additions & 8 deletions APP/src/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

int main(void)
{
rt_uint32_t UNUSED level;
rt_uint32_t UNUSED level;

/* disable interrupt first */
level = rt_hw_interrupt_disable();
/* disable interrupt first */
level = rt_hw_interrupt_disable();

/* init system setting */
SystemInit();
/* init system setting */
SystemInit();

/* startup RT-Thread RTOS */
rtthread_startup();
/* startup RT-Thread RTOS */
rtthread_startup();

return 0;
return 0;
}


Loading

0 comments on commit 39dfef0

Please sign in to comment.