test
Fork of CANnucleo by
stm32f1xx_hal_msp.h@0:e29bc8e0dddd, 2015-07-19 (annotated)
- Committer:
- hudakz
- Date:
- Sun Jul 19 09:06:26 2015 +0000
- Revision:
- 0:e29bc8e0dddd
- Child:
- 1:eb04f7f0478d
rev 00
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 0:e29bc8e0dddd | 1 | /** |
hudakz | 0:e29bc8e0dddd | 2 | ****************************************************************************** |
hudakz | 0:e29bc8e0dddd | 3 | * @attention |
hudakz | 0:e29bc8e0dddd | 4 | * |
hudakz | 0:e29bc8e0dddd | 5 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
hudakz | 0:e29bc8e0dddd | 6 | * |
hudakz | 0:e29bc8e0dddd | 7 | * Redistribution and use in source and binary forms, with or without modification, |
hudakz | 0:e29bc8e0dddd | 8 | * are permitted provided that the following conditions are met: |
hudakz | 0:e29bc8e0dddd | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
hudakz | 0:e29bc8e0dddd | 10 | * this list of conditions and the following disclaimer. |
hudakz | 0:e29bc8e0dddd | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
hudakz | 0:e29bc8e0dddd | 12 | * this list of conditions and the following disclaimer in the documentation |
hudakz | 0:e29bc8e0dddd | 13 | * and/or other materials provided with the distribution. |
hudakz | 0:e29bc8e0dddd | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
hudakz | 0:e29bc8e0dddd | 15 | * may be used to endorse or promote products derived from this software |
hudakz | 0:e29bc8e0dddd | 16 | * without specific prior written permission. |
hudakz | 0:e29bc8e0dddd | 17 | * |
hudakz | 0:e29bc8e0dddd | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
hudakz | 0:e29bc8e0dddd | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
hudakz | 0:e29bc8e0dddd | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
hudakz | 0:e29bc8e0dddd | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
hudakz | 0:e29bc8e0dddd | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
hudakz | 0:e29bc8e0dddd | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
hudakz | 0:e29bc8e0dddd | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
hudakz | 0:e29bc8e0dddd | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
hudakz | 0:e29bc8e0dddd | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
hudakz | 0:e29bc8e0dddd | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
hudakz | 0:e29bc8e0dddd | 28 | * |
hudakz | 0:e29bc8e0dddd | 29 | ****************************************************************************** |
hudakz | 0:e29bc8e0dddd | 30 | * |
hudakz | 0:e29bc8e0dddd | 31 | * Modified by Zoltan Hudak <hudakz@inbox.com> |
hudakz | 0:e29bc8e0dddd | 32 | * |
hudakz | 0:e29bc8e0dddd | 33 | ****************************************************************************** |
hudakz | 0:e29bc8e0dddd | 34 | */ |
hudakz | 0:e29bc8e0dddd | 35 | |
hudakz | 0:e29bc8e0dddd | 36 | #ifndef stm32f1xx_hal_H |
hudakz | 0:e29bc8e0dddd | 37 | #define stm32f1xx_hal_H |
hudakz | 0:e29bc8e0dddd | 38 | |
hudakz | 0:e29bc8e0dddd | 39 | //#include "stm32f1xx_hal.h" |
hudakz | 0:e29bc8e0dddd | 40 | //#include "can_api.h" |
hudakz | 0:e29bc8e0dddd | 41 | //#include "can_helper.h" |
hudakz | 0:e29bc8e0dddd | 42 | #include "pinmap.h" |
hudakz | 0:e29bc8e0dddd | 43 | |
hudakz | 0:e29bc8e0dddd | 44 | typedef struct can_s can_t; |
hudakz | 0:e29bc8e0dddd | 45 | |
hudakz | 0:e29bc8e0dddd | 46 | #ifdef __cplusplus |
hudakz | 0:e29bc8e0dddd | 47 | extern "C" |
hudakz | 0:e29bc8e0dddd | 48 | { |
hudakz | 0:e29bc8e0dddd | 49 | #endif |
hudakz | 0:e29bc8e0dddd | 50 | |
hudakz | 0:e29bc8e0dddd | 51 | /** |
hudakz | 0:e29bc8e0dddd | 52 | * @brief CAN initialization. |
hudakz | 0:e29bc8e0dddd | 53 | * @param obj: can_t object |
hudakz | 0:e29bc8e0dddd | 54 | * @param rxPin: RX pin name |
hudakz | 0:e29bc8e0dddd | 55 | * @param txPin: TX pin name |
hudakz | 0:e29bc8e0dddd | 56 | * @retval None |
hudakz | 0:e29bc8e0dddd | 57 | */ |
hudakz | 0:e29bc8e0dddd | 58 | void initCAN(can_t* obj, PinName rxPin, PinName txPin); |
hudakz | 0:e29bc8e0dddd | 59 | |
hudakz | 0:e29bc8e0dddd | 60 | /** |
hudakz | 0:e29bc8e0dddd | 61 | * @brief CAN MSP Initialization |
hudakz | 0:e29bc8e0dddd | 62 | * @param hcan: CAN handle pointer |
hudakz | 0:e29bc8e0dddd | 63 | * @retval None |
hudakz | 0:e29bc8e0dddd | 64 | */ |
hudakz | 0:e29bc8e0dddd | 65 | void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan); |
hudakz | 0:e29bc8e0dddd | 66 | |
hudakz | 0:e29bc8e0dddd | 67 | /** |
hudakz | 0:e29bc8e0dddd | 68 | * @brief CAN MSP De-Initialization |
hudakz | 0:e29bc8e0dddd | 69 | * This function frees the hardware resources used: |
hudakz | 0:e29bc8e0dddd | 70 | * - Disable the Peripheral's clock |
hudakz | 0:e29bc8e0dddd | 71 | * - Revert GPIO to their default state |
hudakz | 0:e29bc8e0dddd | 72 | * @param hcan: CAN handle pointer |
hudakz | 0:e29bc8e0dddd | 73 | * @retval None |
hudakz | 0:e29bc8e0dddd | 74 | */ |
hudakz | 0:e29bc8e0dddd | 75 | void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan); |
hudakz | 0:e29bc8e0dddd | 76 | |
hudakz | 0:e29bc8e0dddd | 77 | /** |
hudakz | 0:e29bc8e0dddd | 78 | * @brief Handles CAN1 RX0 interrupt request. |
hudakz | 0:e29bc8e0dddd | 79 | * @param None |
hudakz | 0:e29bc8e0dddd | 80 | * @retval None |
hudakz | 0:e29bc8e0dddd | 81 | */ |
hudakz | 0:e29bc8e0dddd | 82 | void USB_LP_CAN1_RX0_IRQHandler(void); |
hudakz | 0:e29bc8e0dddd | 83 | |
hudakz | 0:e29bc8e0dddd | 84 | /** |
hudakz | 0:e29bc8e0dddd | 85 | * @brief Transmission complete callback in non blocking mode |
hudakz | 0:e29bc8e0dddd | 86 | * @param _canHandle: pointer to a CAN_HandleTypeDef structure that contains |
hudakz | 0:e29bc8e0dddd | 87 | * the configuration information for the specified CAN. |
hudakz | 0:e29bc8e0dddd | 88 | * @retval None |
hudakz | 0:e29bc8e0dddd | 89 | */ |
hudakz | 0:e29bc8e0dddd | 90 | void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* _canHandle); |
hudakz | 0:e29bc8e0dddd | 91 | |
hudakz | 0:e29bc8e0dddd | 92 | #ifdef __cplusplus |
hudakz | 0:e29bc8e0dddd | 93 | } |
hudakz | 0:e29bc8e0dddd | 94 | |
hudakz | 0:e29bc8e0dddd | 95 | #endif |
hudakz | 0:e29bc8e0dddd | 96 | |
hudakz | 0:e29bc8e0dddd | 97 | #endif |