Vincent Dupont ae95137f95 can stm32: add a driver for STM32 bxCAN peripheral
This driver is compliant with the candev interface. It has been tested
with STM32F0 and STM32F2 and STM32F413 ONLY at this time but should be
compliant with other STM32Fx devices
2019-03-29 12:03:43 +01:00

58 lines
1.3 KiB
C

/*
* Copyright (C) 2018 OTA keys S.A.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @defgroup drivers_periph_can CAN
* @ingroup drivers_periph
* @brief Low-level CAN peripheral driver interface
*
* This is a basic abstract peripheral to be used with candev.
*
* The @p can_t type should be compatible with @p candev_t to be used by the
* candev interface.
*
* See auto init for more details how the can_t is used.
*
* @{
*
* @file
* @brief Low-level CAN peripheral driver interface definitions
*
* @author Vincent Dupont <vincent@otakeys.com>
*/
#ifndef PERIPH_CAN_H
#define PERIPH_CAN_H
#include "periph_cpu.h"
#include "can/candev.h"
#ifndef HAVE_CAN_T
/**
* @brief CAN device descriptor identifier
*/
typedef candev_t can_t;
#endif
#ifndef HAVE_CAN_CONF_T
/**
* @brief CAN configuration identifier
*/
typedef void can_conf_t;
#endif
/**
* @brief Initialize a periph CAN device with the given configuration
*
* @param[in,out] dev device descriptor
* @param[in] conf device vonfiguration
*/
void can_init(can_t *dev, const can_conf_t *conf);
#endif /* PERIPH_CAN_H */