mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
targets/TARGET_STM/TARGET_STM32F4/can_device.h@180:d79f997829d6, 2017-12-18 (annotated)
- Committer:
- Anythingconnected
- Date:
- Mon Dec 18 10:14:27 2017 +0000
- Revision:
- 180:d79f997829d6
- Parent:
- 178:79309dc6340a
Getting byte by byte read to work
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 160:d5399cc887bb | 1 | /* mbed Microcontroller Library |
<> | 160:d5399cc887bb | 2 | * Copyright (c) 2006-2017 ARM Limited |
<> | 160:d5399cc887bb | 3 | * |
<> | 160:d5399cc887bb | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
<> | 160:d5399cc887bb | 5 | * you may not use this file except in compliance with the License. |
<> | 160:d5399cc887bb | 6 | * You may obtain a copy of the License at |
<> | 160:d5399cc887bb | 7 | * |
<> | 160:d5399cc887bb | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
<> | 160:d5399cc887bb | 9 | * |
<> | 160:d5399cc887bb | 10 | * Unless required by applicable law or agreed to in writing, software |
<> | 160:d5399cc887bb | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
<> | 160:d5399cc887bb | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<> | 160:d5399cc887bb | 13 | * See the License for the specific language governing permissions and |
<> | 160:d5399cc887bb | 14 | * limitations under the License. |
<> | 160:d5399cc887bb | 15 | */ |
<> | 160:d5399cc887bb | 16 | #ifndef MBED_CAN_DEVICE_H |
<> | 160:d5399cc887bb | 17 | #define MBED_CAN_DEVICE_H |
<> | 160:d5399cc887bb | 18 | |
<> | 160:d5399cc887bb | 19 | #include "cmsis.h" |
AnnaBridge | 178:79309dc6340a | 20 | #include "stm32f4xx.h" |
<> | 160:d5399cc887bb | 21 | |
<> | 160:d5399cc887bb | 22 | #ifdef __cplusplus |
<> | 160:d5399cc887bb | 23 | extern "C" { |
<> | 160:d5399cc887bb | 24 | #endif |
<> | 160:d5399cc887bb | 25 | |
<> | 160:d5399cc887bb | 26 | #ifdef DEVICE_CAN |
<> | 160:d5399cc887bb | 27 | |
AnnaBridge | 178:79309dc6340a | 28 | #if defined(CAN3_BASE) && defined(CAN_3) |
AnnaBridge | 178:79309dc6340a | 29 | |
AnnaBridge | 178:79309dc6340a | 30 | #define CAN_NUM 3 // Number of CAN peripherals present in the STM32 serie |
AnnaBridge | 178:79309dc6340a | 31 | |
AnnaBridge | 178:79309dc6340a | 32 | #define CAN3_IRQ_RX_IRQN CAN3_RX0_IRQn |
AnnaBridge | 178:79309dc6340a | 33 | #define CAN3_IRQ_RX_VECT CAN3_RX0_IRQHandler |
AnnaBridge | 178:79309dc6340a | 34 | #define CAN3_IRQ_TX_IRQN CAN3_TX_IRQn |
AnnaBridge | 178:79309dc6340a | 35 | #define CAN3_IRQ_TX_VECT CAN3_TX_IRQHandler |
AnnaBridge | 178:79309dc6340a | 36 | #define CAN3_IRQ_ERROR_IRQN CAN3_SCE_IRQn |
AnnaBridge | 178:79309dc6340a | 37 | #define CAN3_IRQ_ERROR_VECT CAN3_SCE_IRQHandler |
AnnaBridge | 178:79309dc6340a | 38 | #define CAN3_IRQ_PASSIVE_IRQN CAN3_SCE_IRQn |
AnnaBridge | 178:79309dc6340a | 39 | #define CAN3_IRQ_PASSIVE_VECT CAN3_SCE_IRQHandler |
AnnaBridge | 178:79309dc6340a | 40 | #define CAN3_IRQ_BUS_IRQN CAN3_SCE_IRQn |
AnnaBridge | 178:79309dc6340a | 41 | #define CAN3_IRQ_BUS_VECT CAN3_SCE_IRQHandler |
AnnaBridge | 178:79309dc6340a | 42 | |
AnnaBridge | 178:79309dc6340a | 43 | #else |
AnnaBridge | 178:79309dc6340a | 44 | |
AnnaBridge | 178:79309dc6340a | 45 | #define CAN_NUM 2 // Number of CAN peripherals present in the STM32 serie |
AnnaBridge | 178:79309dc6340a | 46 | |
AnnaBridge | 178:79309dc6340a | 47 | #endif |
<> | 160:d5399cc887bb | 48 | |
<> | 160:d5399cc887bb | 49 | #define CAN1_IRQ_RX_IRQN CAN1_RX0_IRQn |
<> | 160:d5399cc887bb | 50 | #define CAN1_IRQ_RX_VECT CAN1_RX0_IRQHandler |
<> | 160:d5399cc887bb | 51 | #define CAN1_IRQ_TX_IRQN CAN1_TX_IRQn |
<> | 160:d5399cc887bb | 52 | #define CAN1_IRQ_TX_VECT CAN1_TX_IRQHandler |
<> | 160:d5399cc887bb | 53 | #define CAN1_IRQ_ERROR_IRQN CAN1_SCE_IRQn |
<> | 160:d5399cc887bb | 54 | #define CAN1_IRQ_ERROR_VECT CAN1_SCE_IRQHandler |
<> | 160:d5399cc887bb | 55 | #define CAN1_IRQ_PASSIVE_IRQN CAN1_SCE_IRQn |
<> | 160:d5399cc887bb | 56 | #define CAN1_IRQ_PASSIVE_VECT CAN1_SCE_IRQHandler |
<> | 160:d5399cc887bb | 57 | #define CAN1_IRQ_BUS_IRQN CAN1_SCE_IRQn |
<> | 160:d5399cc887bb | 58 | #define CAN1_IRQ_BUS_VECT CAN1_SCE_IRQHandler |
<> | 160:d5399cc887bb | 59 | |
<> | 160:d5399cc887bb | 60 | #define CAN2_IRQ_RX_IRQN CAN2_RX0_IRQn |
<> | 160:d5399cc887bb | 61 | #define CAN2_IRQ_RX_VECT CAN2_RX0_IRQHandler |
<> | 160:d5399cc887bb | 62 | #define CAN2_IRQ_TX_IRQN CAN2_TX_IRQn |
<> | 160:d5399cc887bb | 63 | #define CAN2_IRQ_TX_VECT CAN2_TX_IRQHandler |
<> | 160:d5399cc887bb | 64 | #define CAN2_IRQ_ERROR_IRQN CAN2_SCE_IRQn |
<> | 160:d5399cc887bb | 65 | #define CAN2_IRQ_ERROR_VECT CAN2_SCE_IRQHandler |
<> | 160:d5399cc887bb | 66 | #define CAN2_IRQ_PASSIVE_IRQN CAN2_SCE_IRQn |
<> | 160:d5399cc887bb | 67 | #define CAN2_IRQ_PASSIVE_VECT CAN2_SCE_IRQHandler |
<> | 160:d5399cc887bb | 68 | #define CAN2_IRQ_BUS_IRQN CAN2_SCE_IRQn |
<> | 160:d5399cc887bb | 69 | #define CAN2_IRQ_BUS_VECT CAN2_SCE_IRQHandler |
<> | 160:d5399cc887bb | 70 | |
<> | 160:d5399cc887bb | 71 | #endif // DEVICE_CAN |
<> | 160:d5399cc887bb | 72 | |
<> | 160:d5399cc887bb | 73 | #endif |