16FXlib
can3.h
Go to the documentation of this file.
1 
2 //*****************************************************************************
3 // Author : Nicolas Weber
4 // Created : 23.04.2010
5 // Revised : 07.05.2010
6 // Version : 0.1
7 // Target MCU : Fujitsu MB96300 series
8 //
9 // This program is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 3 of the License, or
12 // (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 //
27 //*****************************************************************************
29 
30 #ifndef CAN3_H_
31 #define CAN3_H_
32 
33 #include "can.h"
34 #include "../inttypes.h"
35 #include "../interrupts.h"
36 
42 uint8_t can3_init(uint8_t address);
43 
53 uint8_t can3_send(uint8_t dest, uint16_t uid, uint8_t* data, uint8_t len, uint8_t interrupt);
54 
61 
69 
78 uint8_t can3_getData(uint8_t buffer, uint8_t* data, uint8_t* source, uint16_t* id);
79 
84 void can3_close(uint8_t buffer);
85 
90 void can3_setAddress(uint8_t address);
91 
97 
103 uint8_t can3_registerIRQHandler(IRQHandler handler);
104 
110 uint8_t can3_removeIRQHandler(IRQHandler handler);
111 
123 #define CAN3_MAX_ADDRESS 63
124 
128 #define CAN3_MAX_MESSAGELENGTH 8
129 
133 #define CAN3_MULTICAST 255
134 
136 
137 #endif /* CAN3_H_ */
138 
uint8_t can3_removeIRQHandler(IRQHandler handler)
Definition: can3.c:286
uint8_t can3_maskedOpen(uint16_t uid, uint16_t idMask)
Definition: can3.c:197
uint8_t can3_getAddress(void)
Definition: can3.c:248
uint8_t can3_getData(uint8_t buffer, uint8_t *data, uint8_t *source, uint16_t *id)
Definition: can3.c:225
unsigned int uint16_t
Definition: inttypes.h:50
unsigned char uint8_t
Definition: inttypes.h:35
uint8_t can3_registerIRQHandler(IRQHandler handler)
Definition: can3.c:273
uint8_t can3_init(uint8_t address)
Definition: can3.c:120
uint8_t can3_open(uint16_t uid)
Definition: can3.c:193
uint8_t can3_send(uint8_t dest, uint16_t uid, uint8_t *data, uint8_t len, uint8_t interrupt)
Definition: can3.c:150
void can3_close(uint8_t buffer)
Definition: can3.c:257
void can3_setAddress(uint8_t address)
Definition: can3.c:252