⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bms_cfg._h

📁 mega16 ucos操作系统
💻 _H
字号:
/*
********************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*
*                                         ATmega16  Sample code
*                                    Application Configuration File
*
* File : APP_CFG.H
* By   : Jean J. Labrosse
********************************************************************************
*/

#ifndef  _BMS_CONFIG
#define  _BMS_CONFIG

#define NTC_CNT                  4   //NTC温度传感器个数 <=4
#define TEMP_ROAD                1   //定义DS18B20温度传感器接口数目
#define TEMP_CNT                 1   //每路DS18B20支持的最大温度个数>=2
#define BATTERY_CNT              12  //检测的最大电池数目
      
#define BEEP_EN                  1
  
/*
********************************************************************************
*                                                uC/OS-BMS
********************************************************************************
*/
#define CPU_CLK_FREQ    4000000


#define BeepPort    PORTB
#define BeepDdr     DDRB
#define BeepBit     6

                          
/*
********************************************************************************
*                                              usart config
********************************************************************************
*/
#define 		UART_TX_BUF_SIZE    				   48	
#define 		UART_RX_FRAME      				        1   
#define 		UART_RX_FRAME_SIZE  			        8 		
#define 		UART_BEGIN_STX 					     0x68
#define 		UART_END_STX 					      0x16 
	



 
/*
********************************************************************************
*                                             TASK PRIORITIES
********************************************************************************
*/
#define  OS_TASK_START_PRIO                    1
#define  BATTERY_SCAN_PRIO                     3
#define  ADC7923_READ_PRIO                     6
#define  TEMP_READ_PRIO                        2
#define  BALANCE_TASK_PRIO                     4
#define  NTC_TEMPERA_TASK_PRIO                 5




/*
********************************************************************************
**                                  TASK STACK
********************************************************************************
*/
                 
#define OS_TASK_START_STK_SIZE                170
#define OS_TASK_START_STK_SIZE_HARD           32

#define BATTERY_SCAN_STK_SIZE                 170
#define BATTERY_SCAN_STK_SIZE_HARD            32

#define ADC7923_READ_STK_SIZE                 170
#define ADC7923_READ_STK_SIZE_HARD            32

#define BALANCE_STK_SIZE                      170
#define BALANCE_STK_SIZE_HARD                 32

#define TEMP_READ_STK_SIZE                    170
#define TEMP_READ_STK_SIZE_HARD               32

#define NTC_TEMPERA_STK_SIZE                  170
#define NTC_TEMPERA_STK_SIZE_HARD             32

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -