TECware/Core/PDEF_ProjectDefinitions.h
2021-10-11 15:48:02 +02:00

148 lines
5.7 KiB
C

//=================================================================================================
//
// Company: Paul Scherrer Institut
// 5232 Villigen PSI
// Switzerland
//
//-------------------------------------------------------------------------------------------------
//
// Project: High Stability Current Source
// Author: Lukas Kuenzi (lukas.kuenzi@psi.ch)
//
//-------------------------------------------------------------------------------------------------
//
// Module: Project definitions
// Filename: PDEF_ProjectDefinitions.h
// Date: Handled by Subversion (version control system)
// Revision: Handled by Subversion (version control system)
// History: Handled by Subversion (version control system)
//
//-------------------------------------------------------------------------------------------------
//
// Description: Project definitions
//
//=================================================================================================
#ifndef PDEF_PROJECT_DEFINITIONS_H
#define PDEF_PROJECT_DEFINITIONS_H
#ifdef __cplusplus
extern "C" {
#endif
//=================================================================================================
// Section: INCLUDES
// Description: List of required include files (visible by all modules).
//=================================================================================================
//=================================================================================================
// Section: DEFINITIONS
// Description: Definition of global constants (visible by all modules).
//=================================================================================================
// Firmare version:
// example: "1.1.2"
// 1. Digit: Major number for big changes = "01" and up
// 2. Digit: Minor number for small changes = "1" and up
// 3. Digit: Development version number = "1" and up
#define PDEF_FW_VERSION_HEX 0x0001 // coding: 0xUVW
// U: major number,
// V: minor number,
// W: development version
// Compiler switches
#define PDEF_FUNCTION_PARAMETER_CHECK_ENABLED FALSE
#define PDEF_USE_ASSERTION TRUE
#define PDEF_USE_STM32_FULL_ASSERT FALSE
// definie interrupt priorities
//-------------------------------------------------------------------------------------------------
// preemption priority range: 0-15
// sub priority range: no subpriority
// 0: highest priority, 15: lowest priority
// same priorities are allowed
#define PDEF_NVIC_PRIORITY_GROUPING NVIC_PRIORITYGROUP_4
#define PDEF_MSCB_IRQ_PREEMPT_PRIO 0
#define PDEF_MSCB_IRQ_SUB_PRIO 0
#define PDEF_RS485_IRQ_PREMPT_PRIO 0
#define PDEF_RS485_IRQ_SUB_PRIO 0
#define PDEF_EXTI_IRQ_PREEMPT_PRIO 1
#define PDEF_EXTI_IRQ_SUB_PRIO 0
#define PDEF_ADCS_SPI_IRQ_PREEMPT_PRIO 1
#define PDEF_ADCS_SPI_IRQ_SUB_PRIO 0
#define PDEF_DACS_SPI_IRQ_PREEMPT_PRIO 1
#define PDEF_DACS_SPI_IRQ_SUB_PRIO 0
#define PDEF_CHARGE_PUMP_DAC_SPI_IRQ_PREEMPT_PRIO 1
#define PDEF_CHARGE_PUMP_DAC_SPI_IRQ_SUB_PRIO 0
#define PDEF_CRC_DMA_IRQ_PREEMPT_PRIO 1
#define PDEF_CRC_DMA_IRQ_SUB_PRIO 0
#define PDEF_FLASH_IRQ_PREEMPT_PRIO 1
#define PDEF_FLASH_IRQ_SUB_PRIO 0
#define PDEF_SVC_IRQ_PREEMPT_PRIO 14 // must be one preempt prio higher than PendSV
#define PDEF_SVC_IRQ_SUB_PRIO 0
#define PDEF_PENDSV_IRQ_PREEMPT_PRIO 15 // lowest priority = same as systick
#define PDEF_PENDSV_IRQ_SUB_PRIO 0
//=================================================================================================
// Section: MACROS
// Description: Definition of global macros (visible by all modules).
//=================================================================================================
//=================================================================================================
// Section: ENUMERATIONS
// Description: Definition of global enumerations (visible by all modules).
//=================================================================================================
//=================================================================================================
// Section: STRUCTURES
// Description: Definition of global Structures (visible by all modules).
//=================================================================================================
//=================================================================================================
// Section: GLOBAL VARIABLES
// Description: Definition of global variables (visible by all modules).
//=================================================================================================
//=================================================================================================
// Section: GLOBAL CONSTANTS
// Description: Definition of global constants (visible by all modules).
//=================================================================================================
//=================================================================================================
// Section: GLOBAL FUNCTIONS (PROTOTYPES)
// Description: Definition of global functions (visible by all modules).
//=================================================================================================
#ifdef __cplusplus
}
#endif
#endif