csp_if_can.h
Go to the documentation of this file.
1 /*
2 Cubesat Space Protocol - A small network-layer protocol designed for Cubesats
3 Copyright (C) 2012 GomSpace ApS (http://www.gomspace.com)
4 Copyright (C) 2012 AAUSAT3 Project (http://aausat3.space.aau.dk)
5 
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10 
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15 
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
28 #ifndef _CSP_IF_CAN_H_
29 #define _CSP_IF_CAN_H_
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #include <stdint.h>
36 
37 #include <csp/csp.h>
38 #include <csp/csp_interface.h>
39 
41 #define CSP_CAN_MASKED 0
42 #define CSP_CAN_PROMISC 1
43 
44 extern csp_iface_t csp_if_can;
45 
46 /* CAN configuration struct
47  *
48  *
49  */
51  uint32_t bitrate;
52  uint32_t clock_speed;
53  char *ifc;
54 };
55 
64 int csp_can_init(uint8_t mode, struct csp_can_config *conf);
65 
66 #ifdef __cplusplus
67 } /* extern "C" */
68 #endif
69 
70 #endif /* _CSP_IF_CAN_H_ */
71 
72 /* @}
73  */
Interface struct.
Definition: csp_types.h:190
csp_iface_t csp_if_can
uint32_t bitrate
Definition: csp_if_can.h:51
uint32_t clock_speed
Definition: csp_if_can.h:52
Definition: csp_if_can.h:50
char * ifc
Definition: csp_if_can.h:53
int csp_can_init(uint8_t mode, struct csp_can_config *conf)
Init CAN interface.