Controller Area Network library for NUCLEO boards equipped with CAN peripheral.
Dependents: Nucleo-Courtois CANBLE CANnucleo_Hello3 Nucleo_Serialprintf ... more
stm32f4xx_hal_msp.h
00001 /** 00002 ****************************************************************************** 00003 * @attention 00004 * 00005 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> 00006 * 00007 * Redistribution and use in source and binary forms, with or without modification, 00008 * are permitted provided that the following conditions are met: 00009 * 1. Redistributions of source code must retain the above copyright notice, 00010 * this list of conditions and the following disclaimer. 00011 * 2. Redistributions in binary form must reproduce the above copyright notice, 00012 * this list of conditions and the following disclaimer in the documentation 00013 * and/or other materials provided with the distribution. 00014 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00015 * may be used to endorse or promote products derived from this software 00016 * without specific prior written permission. 00017 * 00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00021 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00022 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00023 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00024 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00025 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00026 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00027 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00028 * 00029 ****************************************************************************** 00030 * 00031 * Modified by Zoltan Hudak <hudakz@outlook.com> 00032 * 00033 ****************************************************************************** 00034 */ 00035 00036 #ifndef stm32f4xx_hal_H 00037 #define stm32f4xx_hal_H 00038 00039 #define CAN_IRQ CAN1_RX0_IRQn 00040 00041 #include "pinmap.h" 00042 00043 #ifdef __cplusplus 00044 extern "C" 00045 { 00046 #endif 00047 00048 /** 00049 * @brief CAN initialization. 00050 * @param obj: can_t object 00051 * @param rxPin: RX pin name 00052 * @param txPin: TX pin name 00053 * @param abom: Automatic recovery from bus-off state 00054 * @retval None 00055 */ 00056 void initCAN(PinName rxPin, PinName txPin, FunctionalState abom); 00057 00058 /** 00059 * @brief CAN MSP Initialization 00060 * @param hcan: CAN handle pointer 00061 * @retval None 00062 */ 00063 void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan); 00064 00065 /** 00066 * @brief CAN MSP De-Initialization 00067 * This function frees the hardware resources used: 00068 * - Disable the Peripheral's clock 00069 * - Revert GPIO to their default state 00070 * @param hcan: CAN handle pointer 00071 * @retval None 00072 */ 00073 void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan); 00074 00075 /** 00076 * @brief Handles CAN1 RX0 interrupt request. 00077 * @param None 00078 * @retval None 00079 */ 00080 void CAN1_RX0_IRQHandler(void); 00081 00082 /** 00083 * @brief Transmission complete callback in non blocking mode 00084 * @param _canHandle: pointer to a CAN_HandleTypeDef structure that contains 00085 * the configuration information for the specified CAN. 00086 * @retval None 00087 */ 00088 void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* _canHandle); 00089 00090 #ifdef __cplusplus 00091 } 00092 00093 #endif 00094 00095 #endif
Generated on Wed Jul 13 2022 09:11:29 by 1.7.2