optical/SEW-EXA1/Users/Config/config.h

156 lines
3.6 KiB
C
Raw Permalink Normal View History

2025-09-04 01:45:08 +00:00
//-------------------------------------------------------------------------------
// File Name: config.h
// Brief:
// Version: 1.1.0
// Create Date: 2021/07/20
// Create by: Marshal Lee
// Copyright:
// Copyright (c) 2021, Richpeace Co., LTD.
// All rights reserved.
//
// Modify by: Marshal Lee
// Modify Date: 2021/07/20
//-------------------------------------------------------------------------------
#ifndef __CONFIG_H__
#define __CONFIG_H__
#include "afxdef.h"
//---------------------------------------------------------------
//
// <20><EFBFBD><E5BFA8><EFBFBD><EFBFBD>
//---------------------------------------------------------------
#define CORE_BOARD_APP 1 // Ӧ<>ô<EFBFBD><C3B4><EFBFBD>
#define CUR_CORE_BOARD CORE_BOARD_APP
//---------------------------------------------------------------
#define VERSION_DEBUG 0 // <20><><EFBFBD>԰汾
#define VERSION_RELEASE 1 // <20><><EFBFBD><EFBFBD><EFBFBD>
#define CUR_VERSION VERSION_DEBUG
//---------------------------------------------------------------
//---------------------------------------------------------------
#define VER_CODE_M '2','4'
#define VER_CODE_S '1','0'
#define VER_CODE_D '1','7'
//---------------------------------------------------------------
// <20><EFBFBD><E5BFA8>;
#define TEST_BOARD 0 // <20><><EFBFBD>Լ<EFBFBD>
#define SEW_HEAD 1 // <20><><EFBFBD>һ<EFBFBD>ͷ<EFBFBD><CDB7>
#if (CUR_CORE_BOARD == CORE_BOARD_APP)
#define BOARD_USE_FOR SEW_HEAD
#else
#define BOARD_USE_FOR TEST_BOARD
#endif
//---------------------------------------------------------------
#define USE_IWDOG 0 // ʹ<>ÿ<EFBFBD><C3BF>Ź<EFBFBD>
//---------------------------------------------------------------
#if (BOARD_USE_FOR == SEW_HEAD)
#define RS485_CMD_NUM 21
#endif
//---------------------------------------------------------------
#ifndef SYSCLK
#define SYSCLK 72000000L
#endif
//---------------------------------------------------------------
// bootloader <20><>С
#define STM32_BOOT_SIZE (0*1024)
#define VERSION_LEN 32
//---------------------------------------------------------------
// ͨѶ<CDA8>˿<EFBFBD>ѡ<EFBFBD><D1A1>
#if (1) // ͨѶ<CDA8>˿<EFBFBD>ѡ<EFBFBD><D1A1>
#define COMM_NONE 0 // <20><>ʹ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD>Ч
#define COMM_USART1 1 // <20><><EFBFBD><EFBFBD>1,
#define COMM_USART2 2 // <20><><EFBFBD><EFBFBD>2, 485
#define COMM_USART3 3 // <20><><EFBFBD><EFBFBD>3, 485
#define CONSOLE_PORT COMM_USART1 // <20><><EFBFBD><EFBFBD>̨ͨѶ<CDA8><D1B6>
#define USART2_485OutEn SetEn485OutOff
#define USART2_485OutDis SetEn485OutOn
#define USART3_485OutEn SetEn485_2_OutOff
#define USART3_485OutDis SetEn485_2_OutOn
#define COMM_485 1
#define COMM_CAN 2
#define CONTROL_BUS COMM_CAN
#endif
//---------------------------------------------------------------
#if (CONTROL_BUS == COMM_485)
#define MODBUS_S_PORT
#elif (CONTROL_BUS == COMM_CAN)
#define CUR_EXA1_NODE_ID 0x21
#define BN_DEVICE_EXA1 0xA1
#endif
//---------------------------------------------------------------
#if (BOARD_USE_FOR == SEW_HEAD)
#define MODBUS_M
#endif
//---------------------------------------------------------------
//---------------------------------------------------------------
#define STM32_SOFT_PWM 1
#define STM32_MOTOS_NUM 1
#define MOTO1_TIM TIM1
#define SPEED_PSC 48
#define MOOT_TIM_PSC 80
//---------------------------------------------------------------
#if (BOARD_USE_FOR == SEW_HEAD)
#define PWM_TIMER_CTRL 1
#endif
//---------------------------------------------------------------
#if (BOARD_USE_FOR == SEW_HEAD)
#define VER_TYPE 'S','E','W'
#define VER_PROD 'H','E','A','D',' '
#else
#define VER_TYPE 'Y','R','A'
#define VER_PROD 'D','3','2',' ',' '
#endif
//---------------------------------------------------------------
void GetVersionStr(char * str);
void GetBuildStr(char * str);
//---------------------------------------------------------------
//---------------------------------------------------------------
#include "main.h"
#endif