CIU32_L051_M307R/RTOS/rtconfig.h

224 lines
5.7 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* RT-Thread config file */
#ifndef __RTTHREAD_CFG_H__
#define __RTTHREAD_CFG_H__
#include <rtthread.h>
#if defined(__CC_ARM) || defined(__CLANG_ARM)
#include "RTE_Components.h"
#if defined(RTE_USING_FINSH)
#define RT_USING_FINSH
#endif //RTE_USING_FINSH
#endif //(__CC_ARM) || (__CLANG_ARM)
/* Utilities */
#define RT_USING_ULOG
#define ULOG_OUTPUT_LVL_D
#define ULOG_OUTPUT_LVL 7
#define ULOG_ASSERT_ENABLE
#define ULOG_LINE_BUF_SIZE 128
/* log format */
#define ULOG_USING_COLOR
#define ULOG_OUTPUT_TIME
#define ULOG_OUTPUT_LEVEL
#define ULOG_OUTPUT_TAG
/* end of log format */
#define ULOG_BACKEND_USING_CONSOLE
// 在中断 ISR 中输出日志
#define ULOG_USING_ISR_LOG
/* end of Utilities */
// <<< Use Configuration Wizard in Context Menu >>>
// <h>Basic Configuration
// <o>Maximal level of thread priority <8-256>
// <i>Default: 32
#define RT_THREAD_PRIORITY_MAX 32
// <o>OS tick per second
// <i>Default: 1000 (1ms)
#define RT_TICK_PER_SECOND 1000
// <o>Alignment size for CPU architecture data access
// <i>Default: 4
#define RT_ALIGN_SIZE 4
// <o>the max length of object name<2-16>
// <i>Default: 8
#define RT_NAME_MAX 16
// <c1>Using RT-Thread components initialization
// <i>Using RT-Thread components initialization
#define RT_USING_COMPONENTS_INIT
// </c>
// <c1>Using rt_using_heap
// <i>Using rt_using_heap
#define RT_USING_HEAP
// #define RT_USING_MEMHEAP
// </c>
// <c1>Using rt_using_user_main
// <i>Using rt_using_user_main
#define RT_USING_USER_MAIN
// </c>
// <o>the stack size of main thread<1-4086>
// <i>Default: 512
#define RT_MAIN_THREAD_STACK_SIZE 1024
// </h>
// <h>Debug Configuration
// <c1>enable kernel debug configuration
// <i>Default: enable kernel debug configuration
#define RT_DEBUG
// </c>
// <o>enable components initialization debug configuration<0-1>
// <i>Default: 0
#define RT_DEBUG_INIT 0
// <c1>thread stack over flow detect
// <i> Diable Thread stack over flow detect
//#define RT_USING_OVERFLOW_CHECK
// </c>
// </h>
//DEVICE 框架配置
//当系统中加入 device 框架源码时,则需要在 rtconfig.h 中开启以下项
#define RT_USING_DEVICE
#define RT_USING_DEVICE_IPC
#define RT_USING_PIN
// #define RT_USING_DEVICE_OPS
// #define RT_USING_POSIX_DEVIO
// #define RT_USING_MODULE
// <h>Hook Configuration
// <c1>using hook
// <i>using hook
#define RT_USING_HOOK
// </c>
// <c1>using idle hook
// <i>using idle hook
#define RT_USING_IDLE_HOOK
// </c>
// </h>
// <e>Software timers Configuration
// <i> Enables user timers
#define RT_USING_TIMER_SOFT 0
#if RT_USING_TIMER_SOFT == 0
#undef RT_USING_TIMER_SOFT
#endif
// <o>The priority level of timer thread <0-31>
// <i>Default: 4
#define RT_TIMER_THREAD_PRIO 4
// <o>The stack size of timer thread <0-8192>
// <i>Default: 512
#define RT_TIMER_THREAD_STACK_SIZE 512
// </e>
// <h>IPC(Inter-process communication) Configuration
// <c1>Using Semaphore
// <i>Using Semaphore
#define RT_USING_SEMAPHORE
// </c>
// <c1>Using Mutex
// <i>Using Mutex
#define RT_USING_MUTEX
// </c>
// <c1>Using Event
// <i>Using Event
#define RT_USING_EVENT
// </c>
// <c1>Using MailBox
// <i>Using MailBox
#define RT_USING_MAILBOX
// </c>
// <c1>Using Message Queue
// <i>Using Message Queue
#define RT_USING_MESSAGEQUEUE
// </c>
// </h>
// <h>Memory Management Configuration
// <c1>Dynamic Heap Management
// <i>Dynamic Heap Management
#define RT_USING_HEAP
// </c>
// <c1>using small memory
// <i>using small memory
#define RT_USING_SMALL_MEM
// </c>
// <c1>using tiny size of memory
// <i>using tiny size of memory
#define RT_USING_TINY_SIZE
// </c>
// </h>
// <h>Console Configuration
// <c1>Using console
// <i>Using console
#define RT_USING_CONSOLE
// </c>
// <o>the buffer size of console <1-1024>
// <i>the buffer size of console
// <i>Default: 128 (128Byte)
#define RT_CONSOLEBUF_SIZE 128
// </h>
#include "finsh_config.h"
#if defined(RT_USING_FINSH)
#define FINSH_USING_MSH
#define FINSH_USING_MSH_ONLY
// <h>Finsh Configuration
// <o>the priority of finsh thread <1-7>
// <i>the priority of finsh thread
// <i>Default: 6
#define __FINSH_THREAD_PRIORITY 5
#define FINSH_THREAD_PRIORITY (RT_THREAD_PRIORITY_MAX / 8 * __FINSH_THREAD_PRIORITY + 1)
// <o>the stack of finsh thread <1-4096>
// <i>the stack of finsh thread
// <i>Default: 4096 (4096Byte)
#define FINSH_THREAD_STACK_SIZE 1024
// <o>the history lines of finsh thread <1-32>
// <i>the history lines of finsh thread
// <i>Default: 5
#define FINSH_HISTORY_LINES 5
#define FINSH_USING_SYMTAB
// <c1>finsh using history
// <i> finsh using history
#define FINSH_USING_HISTORY
// </c>
// </h>
#endif
#define PKG_USING_PERF_COUNTER
#define PKG_USING_PERF_COUNTER_V2241
#define PKG_AGILE_LED_USING_THREAD_AUTO_INIT //开启LED线程
#define DEBUG_OUTPUT_SELECT //使能则使用串口输出SHELL不使能则使用RTT打印
#define RT_USING_AT //用于开启或关闭 AT 组件
#define AT_USING_CLIENT //用于开启 AT Client 功能
#define AT_CLIENT_NUM_MAX 1 //最大同时支持的 AT 客户端数量
#define AT_USING_CLI //用于开启或关闭客户端命令行交互模式
#define AT_PRINT_RAW_CMD //用于开启 AT 命令通信数据的实时显示模式
#define AT_SW_VERSION_NUM 0x10301
#define AT_CMD_MAX_LEN 256
#define AT_DEVICE_NAME "uart3" //这个宏必须打开,因为在串口函数中要对接读和写函数 已经支持的串口为uart2 和 lpuart2
#define PKG_USING_AT_DEVICE
#define AT_DEVICE_USING_ML307
#define AT_DEVICE_ML307_INIT_ASYN
//#define AT_DEVICE_ML307_SOCKET
#define ML307_CLIENT_NAME "uart3"
#define ML307_RECV_BUFF_LEN 1024
#define PKG_USING_AT_DEVICE_LATEST_VERSION
#define PKG_AT_DEVICE_VER_NUM 0x99999
// <<< end of configuration section >>>
#endif