Working fork to test F0 application

Dependents:   ppCANOpen_Example

Fork of CANnucleo by Zoltan Hudak

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers stm32f3xx_hal_msp.h Source File

stm32f3xx_hal_msp.h

00001  /**
00002  ******************************************************************************
00003   * @attention
00004   *
00005   * <h2><center>&copy; 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@inbox.com>
00032   *
00033   ******************************************************************************
00034   */
00035 
00036 #ifndef stm32f3xx_hal_H
00037 #define stm32f3xx_hal_H
00038 
00039 #define CAN_IRQ  CAN_RX0_IRQn
00040 
00041 #include "pinmap.h"
00042 
00043 typedef struct can_s    can_t;
00044 
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049 
00050 /**
00051   * @brief  CAN initialization.
00052   * @param  obj: can_t object
00053   * @param  rxPin: RX pin name
00054   * @param  txPin: TX pin name
00055   * @param  abom: Automatic recovery from bus-off state
00056   * @retval None
00057   */
00058 void initCAN(can_t* obj, PinName rxPin, PinName txPin, FunctionalState abom);
00059 
00060 /**
00061   * @brief  CAN MSP Initialization
00062   * @param  hcan: CAN handle pointer
00063   * @retval None
00064   */
00065 void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan);
00066 
00067 /**
00068   * @brief CAN MSP De-Initialization
00069   *        This function frees the hardware resources used:
00070   *          - Disable the Peripheral's clock
00071   *          - Revert GPIO to their default state
00072   * @param hcan: CAN handle pointer
00073   * @retval None
00074   */
00075 void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan);
00076 
00077 /**
00078 * @brief  Handles CAN1 RX0 interrupt request.
00079 * @param  None
00080 * @retval None
00081 */
00082 void USB_LP_CAN_RX0_IRQHandler(void);
00083 
00084 /**
00085   * @brief  Transmission  complete callback in non blocking mode
00086   * @param  _canHandle: pointer to a CAN_HandleTypeDef structure that contains
00087   *         the configuration information for the specified CAN.
00088   * @retval None
00089   */
00090 void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* _canHandle);
00091 
00092 #ifdef __cplusplus
00093 }
00094 
00095 #endif
00096 
00097 #endif