#ifndef BIWAK_CAN_STM32_HPP
#define BIWAK_CAN_STM32_HPP
//----------------------------------------------------------------------------
//
//
//
//----------------------------------------------------------------------------


//---Includes-----------------------------------------------------------------

//#include <stm/stm32_can.h>
//#include <lepto/can_message.h>
#include <biwak/rcc.h>    // EGpioPeripheral
#include <biwak/can.hpp>


//---Forward declarations-----------------------------------------------------


struct SCanConfig
{
   CAN_TypeDef    *instance;
   //IRQn_Type  *irqn; //Tx, irqnRx, irqnMisc;
   IRQn_Type  irqnTx;
   //IRQn_Type  irqnRx;
   IRQn_Type  irqnRx0;
   IRQn_Type  irqnRx1;
   IRQn_Type  irqnMisc;

   #if defined(BIWAK_AUTO_GPIO_INIT)
   int altFunc;
   EGpioPeripheral eGpioPeripheralRx;
   EGpioPin eGpioPinRx;
   EGpioPeripheral eGpioPeripheralTx;
   EGpioPin eGpioPinTx;
   //ECan eCan;
   #endif // ? BIWAK_AUTO_GPIO_INIT
};


//---fin-----------------------------------------------------------------------
#endif // ? ! BIWAK_CAN_STM32_HPP
