Loading...
Searching...
No Matches
can_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Gunar Schorcht
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include "can_esp.h"
27#include "can/device.h"
28#include "periph/can.h"
29
30#ifndef CAN_TX
32#define CAN_TX GPIO5
33#endif
34
35#ifndef CAN_RX
37#define CAN_RX GPIO35
38#endif
39
40#ifndef CAN_BITRATE
42#define CAN_BITRATE (500000)
43#endif
44
47 {
48 .name = "esp-can",
49 },
50};
51
53static const can_conf_t candev_conf[] = {
54 {
55 .bitrate = CAN_BITRATE,
56 .tx_pin = CAN_TX,
57 .rx_pin = CAN_RX,
58#ifdef CAN_CLK_OUT
59 .clk_out_pin = CAN_CLK_OUT,
60#endif
61#ifdef CAN_BUS_ON_OFF
62 .bus_on_off_pin = CAN_BUS_ON_OFF,
63#endif
64 },
65};
66
67#ifdef __cplusplus
68}
69#endif
70
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:32
#define CAN_RX
Default CAN transceiver RX pin if not defined in board configuration.
Definition can_params.h:37
#define CAN_BITRATE
Default CAN Bitrate.
Definition can_params.h:42
ESP CAN device configuration.
Definition can_esp.h:87
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.