Skip to content

Commit

Permalink
Fixes broken build of DCC driver instantiation. (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz authored Feb 23, 2021
1 parent fc05734 commit 01081b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boards/st-stm32f103rb-cmsis/Stm32Can.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
extern "C" {
void USB_HP_CAN1_TX_IRQHandler(void);
void USB_LP_CAN1_RX0_IRQHandler(void);

static inline void SetInterruptPriority(uint32_t irq, uint8_t priority)
{
NVIC_SetPriority((IRQn_Type)irq, priority >> (8U - __NVIC_PRIO_BITS));
}

}

class Stm32CanDriver : public Can
Expand Down
4 changes: 4 additions & 0 deletions boards/ti-ek-tm4c123gxl-launchpad/HwInit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ const uint32_t RailcomDefs::UART_PERIPH[] = {SYSCTL_PERIPH_UART1};

static TivaRailcomDriver<RailcomDefs> railcom_driver("/dev/railcom");

// If 1, enabled spread spectrum randomization of the DCC timings.
uint8_t spreadSpectrum = 0;

struct DccHwDefs {
/// base address of a capture compare pwm timer pair
static const unsigned long CCP_BASE = TIMER0_BASE;
Expand All @@ -218,6 +221,7 @@ struct DccHwDefs {
static const int RAILCOM_CUTOUT_START_DELTA_USEC = -20;
static const int RAILCOM_CUTOUT_MID_DELTA_USEC = 0;
static const int RAILCOM_CUTOUT_END_DELTA_USEC = -10;
static const int RAILCOM_CUTOUT_POST_DELTA_USEC = -10;

/** These timer blocks will be synchronized once per packet, when the
* deadband delay is set up. */
Expand Down

0 comments on commit 01081b4

Please sign in to comment.