Loading...
Searching...
No Matches
can_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Gunar Schorcht
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include "can_esp.h"
24#include "can/device.h"
25#include "periph/can.h"
26
27#ifndef CAN_TX
29#define CAN_TX GPIO5
30#endif
31
32#ifndef CAN_RX
34#define CAN_RX GPIO35
35#endif
36
37#ifndef CAN_BITRATE
39#define CAN_BITRATE (500000)
40#endif
41
44 {
45 .name = "esp-can",
46 },
47};
48
50static const can_conf_t candev_conf[] = {
51 {
52 .bitrate = CAN_BITRATE,
53 .tx_pin = CAN_TX,
54 .rx_pin = CAN_RX,
55#ifdef CAN_CLK_OUT
56 .clk_out_pin = CAN_CLK_OUT,
57#endif
58#ifdef CAN_BUS_ON_OFF
59 .bus_on_off_pin = CAN_BUS_ON_OFF,
60#endif
61 },
62};
63
64#ifdef __cplusplus
65}
66#endif
67
Low-level CAN peripheral driver interface definitions.
#define CAN_TX
Default CAN tranveiver TX pin if not defined in board configuration.
Definition can_params.h:29
#define CAN_RX
Default CAN transceiver RX pin if not defined in board configuration.
Definition can_params.h:34
#define CAN_BITRATE
Default CAN Bitrate.
Definition can_params.h:39
ESP CAN device configuration.
Definition can_esp.h:84
Linux candev configuration.
Parameters to initialize a candev.
Definition device.h:54
Definitions of CAN device interface.
struct candev_params candev_params_t
Parameters to initialize a candev.