comm_can.h
Go to the documentation of this file.
1 /*
2  Copyright 2012-2014 Benjamin Vedder benjamin@vedder.se
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 /*
19  * comm_can.h
20  *
21  * Created on: 7 dec 2014
22  * Author: benjamin
23  */
24 
25 #ifndef COMM_CAN_H_
26 #define COMM_CAN_H_
27 
28 #include "conf_general.h"
29 
30 // Settings
31 #define CAN_STATUS_MSG_INT_MS 1
32 #define CAN_STATUS_MSGS_TO_STORE 10
33 
34 // Functions
35 void comm_can_init(void);
36 void comm_can_transmit(uint32_t id, uint8_t *data, uint8_t len);
37 void comm_can_send_buffer(uint8_t controller_id, uint8_t *data, unsigned int len, bool send);
38 void comm_can_set_duty(uint8_t controller_id, float duty);
39 void comm_can_set_current(uint8_t controller_id, float current);
40 void comm_can_set_current_brake(uint8_t controller_id, float current);
41 void comm_can_set_rpm(uint8_t controller_id, float rpm);
42 void comm_can_set_pos(uint8_t controller_id, float pos);
45 
46 #endif /* COMM_CAN_H_ */
can_status_msg * comm_can_get_status_msg_id(int id)
Definition: comm_can.c:464
can_status_msg * comm_can_get_status_msg_index(int index)
Definition: comm_can.c:447
Definition: datatypes.h:356
void comm_can_set_current(uint8_t controller_id, float current)
Definition: comm_can.c:410
void comm_can_send_buffer(uint8_t controller_id, uint8_t *data, unsigned int len, bool send)
Definition: comm_can.c:343
void comm_can_init(void)
Definition: comm_can.c:75
void comm_can_set_pos(uint8_t controller_id, float pos)
Definition: comm_can.c:431
void comm_can_set_rpm(uint8_t controller_id, float rpm)
Definition: comm_can.c:424
void comm_can_transmit(uint32_t id, uint8_t *data, uint8_t len)
Definition: comm_can.c:305
void comm_can_set_current_brake(uint8_t controller_id, float current)
Definition: comm_can.c:417
void comm_can_set_duty(uint8_t controller_id, float duty)
Definition: comm_can.c:403