can_device.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2006-2017 ARM Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MBED_CAN_DEVICE_H
  17. #define MBED_CAN_DEVICE_H
  18. #include "cmsis.h"
  19. #include "stm32l4xx.h"
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #ifdef DEVICE_CAN
  24. #define CAN_NUM 1 // Number of CAN peripherals present in the STM32 serie
  25. #define CAN1_IRQ_RX_IRQN CAN1_RX0_IRQn
  26. #define CAN1_IRQ_RX_VECT CAN1_RX0_IRQHandler
  27. #define CAN1_IRQ_TX_IRQN CAN1_TX_IRQn
  28. #define CAN1_IRQ_TX_VECT CAN1_TX_IRQHandler
  29. #define CAN1_IRQ_ERROR_IRQN CAN1_SCE_IRQn
  30. #define CAN1_IRQ_ERROR_VECT CAN1_SCE_IRQHandler
  31. #define CAN1_IRQ_PASSIVE_IRQN CAN1_SCE_IRQn
  32. #define CAN1_IRQ_PASSIVE_VECT CAN1_SCE_IRQHandler
  33. #define CAN1_IRQ_BUS_IRQN CAN1_SCE_IRQn
  34. #define CAN1_IRQ_BUS_VECT CAN1_SCE_IRQHandler
  35. #endif // DEVICE_CAN
  36. #endif