better CAN flexibility
This commit is contained in:
parent
36e3ac694a
commit
69541b37cf
|
@ -197,14 +197,6 @@
|
|||
// todo: switch to continues ADC conversion for fast ADC?
|
||||
#define EFI_INTERNAL_FAST_ADC_PWM &PWMD4
|
||||
|
||||
//#define EFI_CAN_DEVICE CAND2
|
||||
#define EFI_CAN_RX_AF 9
|
||||
#define EFI_CAN_TX_AF 9
|
||||
|
||||
//#define EFI_CAN_DEVICE CAND1
|
||||
//#define EFI_CAN_RX_AF 9
|
||||
//#define EFI_CAN_TX_AF 9
|
||||
|
||||
#define EFI_SPI1_AF 5
|
||||
|
||||
#define EFI_SPI2_AF 5
|
||||
|
|
|
@ -278,7 +278,6 @@ void stopCanPins(DECLARE_ENGINE_PARAMETER_F) {
|
|||
}
|
||||
|
||||
void startCanPins(DECLARE_ENGINE_PARAMETER_F) {
|
||||
// todo: confirm that same AF works for all pins on all devices?
|
||||
mySetPadMode2("CAN TX", boardConfiguration->canTxPin, PAL_MODE_ALTERNATE(EFI_CAN_TX_AF));
|
||||
mySetPadMode2("CAN RX", boardConfiguration->canRxPin, PAL_MODE_ALTERNATE(EFI_CAN_RX_AF));
|
||||
}
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
#ifndef MPU_UTIL_H_
|
||||
#define MPU_UTIL_H_
|
||||
|
||||
// we are lucky - all CAN pins use the same AF
|
||||
#define EFI_CAN_RX_AF 9
|
||||
#define EFI_CAN_TX_AF 9
|
||||
|
||||
#define baseHardwareInit() {}
|
||||
|
||||
|
||||
#endif /* MPU_UTIL_H_ */
|
||||
|
|
Loading…
Reference in New Issue