1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/include/periph/can.h
Vincent Dupont 74ddf56171 tests/conn_can: build stm32 CAN drivers
Build can_stm32 module on boards which have a stm32 CAN controller.
2019-04-03 11:12:46 +02:00

67 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"
#ifdef __cplusplus
extern "C" {
#endif
#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 int 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);
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CAN_H */
/** @} */