-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathISCA_CAN_CFG.h
92 lines (84 loc) · 3.22 KB
/
ISCA_CAN_CFG.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* ******************************************************************************\
* /------------------------------------------------------------------------------/
* |-- Title : ISCA_CAN compile-time configuration options
* |-- Project : CAN-bus Controller
* |#----------------------------------------------------------------------------#
* |-- File : ISCA_CAN_TEST.c
* |-- Author : Othon Tomoutzoglou <[email protected]>
* |-- Company : Hellenic Mediterranean University, department of
* |-- Electrical & Computer Engineering, ISCA-lab
* |-- URL : http://isca.hmu.gr/
* |-- Created : 2018-10-22
* |-- Last update: 2018-10-22
* |-- License :
* |-- This program is free software: you can redistribute it and/or modify
* |-- it under the terms of the GNU General Public License as published by
* |-- the Free Software Foundation, either version 3 of the License, or
* |-- (at your option) any later version.
* |--
* |-- This program is distributed in the hope that it will be useful,
* |-- but WITHOUT ANY WARRANTY; without even the implied warranty of
* |-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* |-- GNU General Public License for more details.
* |--
* |-- You should have received a copy of the GNU General Public License
* |-- along with this program. If not, see <https://www.gnu.org/licenses/>.
* |--
* |-- Platform :
* |-- Standard :
* |#----------------------------------------------------------------------------#
* |-- Description:
* |#----------------------------------------------------------------------------#
* |-- Copyright (c) 2018
* |#----------------------------------------------------------------------------#
* |-- Revisions :
* |-- Date Version Author Description
* |-- 2018-10-22 1.0 Otto Created
* \#-----------------------------------------------------------------------------\
* *******************************************************************************/
/**
* @file ISCA_CAN_CFG.h
*
* @brief CAN configuration definitions
*
* @author Othon Tomoutzoglou
*
* Contact: <[email protected]>
*
* @version 1.0
*
*/
#ifndef ISCA_CAN_CFG_H
#define ISCA_CAN_CFG_H
#include <stdarg.h>
#include <stdio.h>
/******
* DEFINITIONS
******/
#define CAN_2A (0) /*!<CAN mode 2A (standard) constant*/
#define CAN_2B (1) /*!<CAN mode 2B (extended) constant*/
#define APP_POLL (0) /*!<CAN apprise in polling mode constant*/
#define APP_IRQ (1) /*!<CAN apprise in interrupt mode constant*/
/*
* Update values accordingly, or pass
* them as compiler options, e.g.,
* -DCAN_MODE=CAN_2B
*/
#ifndef CAN_MODE
#define CAN_MODE (CAN_2B) /*!<CAN operating mode; \ref CAN_2A or \ref CAN_2B*/
#endif
#ifndef APPRISE_MODE
#define APPRISE_MODE (APP_POLL) /*!<Apprise mode \ref APP_POLL or \ref APP_IRQ*/
#endif
/**
* @brief Print to standard output function wrapper
*
* If it happens your board to support some other printf like
* function, or you have implemented your own modify this
* definition
*
* @note You can change standard output function used, by modifying
* this definition
* */
#define __COUT(str, ...) (printf(str, ##__VA_ARGS__))
#endif /* ISCA_CAN_CFG_H */