compiling the use of bitbang_gmlan only for panda
parent
4fe2dcd332
commit
7927cabcc5
|
@ -158,7 +158,7 @@ void can_set_speed(uint8_t can_number) {
|
|||
// initialization mode
|
||||
CAN->MCR = CAN_MCR_TTCM | CAN_MCR_INRQ;
|
||||
while((CAN->MSR & CAN_MSR_INAK) != CAN_MSR_INAK);
|
||||
|
||||
|
||||
// set time quanta from defines
|
||||
CAN->BTR = (CAN_BTR_TS1_0 * (CAN_SEQ1-1)) |
|
||||
(CAN_BTR_TS2_0 * (CAN_SEQ2-1)) |
|
||||
|
@ -468,8 +468,10 @@ void can_send(CAN_FIFOMailBox_TypeDef *to_push, uint8_t bus_number) {
|
|||
// bus number isn't passed through
|
||||
to_push->RDTR &= 0xF;
|
||||
if (bus_number == 3 && can_num_lookup[3] == 0xFF) {
|
||||
#ifdef PANDA
|
||||
// TODO: why uint8 bro? only int8?
|
||||
bitbang_gmlan(to_push);
|
||||
#endif
|
||||
} else {
|
||||
can_push(can_queues[bus_number], to_push);
|
||||
process_can(CAN_NUM_FROM_BUS_NUM(bus_number));
|
||||
|
|
Loading…
Reference in New Issue