58 lines
1.5 KiB
C
58 lines
1.5 KiB
C
|
#ifndef APP_CONFIG_H__
|
||
|
#define APP_CONFIG_H__
|
||
|
|
||
|
#include <clock_device.h>
|
||
|
#include <pwm_device.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
#define PRAGMA(x) _Pragma(#x)
|
||
|
#define BEGIN_PACK PRAGMA(pack(push, 1))
|
||
|
#define END_PACK PRAGMA(pack(pop))
|
||
|
|
||
|
#define LIN_STACK_TYPE_LIN2_2A (0U)
|
||
|
#define LIN_STACK_TYPE_SAEJ2602 (1U)
|
||
|
#define LIN_STACK_TYPE_PRIVATE (2U)
|
||
|
|
||
|
#define LIN_STACK_TYPE LIN_STACK_TYPE_LIN2_2A
|
||
|
|
||
|
#define Divide_2 (0U)
|
||
|
#define Divide_6 (1U)
|
||
|
|
||
|
#define control_type Divide_6
|
||
|
|
||
|
|
||
|
#define SDK_APPL_VERSION (0x0001U)
|
||
|
/* ************************hardware config ********************************/
|
||
|
#define MAIN_CPU_CLOCK 16U /*MHz*/
|
||
|
|
||
|
#if MAIN_CPU_CLOCK == 16U
|
||
|
#define SYS_MAIN_CLOCK_DIV CLOCK_DIV_1
|
||
|
#else
|
||
|
#error MAIN_CPU_CLOCK MUST BE 16MHz!*/
|
||
|
#endif
|
||
|
|
||
|
#define ROOM_TEMPERATURE (24) /*Celsius degree*/
|
||
|
|
||
|
|
||
|
/* ************************PWMs config ********************************/
|
||
|
/* pwm resolution settings*/
|
||
|
#define PWM_VALUE_MAX_POS (16U)
|
||
|
#define PWM_VALUE_MAX ((1UL << PWM_VALUE_MAX_POS) -1UL)
|
||
|
|
||
|
|
||
|
#define WATCH_DOG_EN (0U)
|
||
|
|
||
|
/* ************************debug config *******************************/
|
||
|
#define ENABLE_FUNCTION_VALIDATION (0U)
|
||
|
#define CODE_DEBUG_EN 1
|
||
|
|
||
|
#if CODE_DEBUG_EN == 1
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#define DEBUG_OUT(...) printf(__VA_ARGS__)
|
||
|
#else
|
||
|
#define DEBUG_OUT(...)
|
||
|
#endif
|
||
|
|
||
|
#endif
|