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
20#ifndef CAN_PARAMS_H
21#define CAN_PARAMS_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include "can_esp.h"
28#include "can/device.h"
29#include "periph/can.h"
30
31#ifndef CAN_TX
33#define CAN_TX GPIO5
34#endif
35
36#ifndef CAN_RX
38#define CAN_RX GPIO35
39#endif
40
41#ifndef CAN_BITRATE
43#define CAN_BITRATE (500000)
44#endif
45
48 {
49 .name = "esp-can",
50 },
51};
52
54static const can_conf_t candev_conf[] = {
55 {
56 .bitrate = CAN_BITRATE,
57 .tx_pin = CAN_TX,
58 .rx_pin = CAN_RX,
59#ifdef CAN_CLK_OUT
60 .clk_out_pin = CAN_CLK_OUT,
61#endif
62#ifdef CAN_BUS_ON_OFF
63 .bus_on_off_pin = CAN_BUS_ON_OFF,
64#endif
65 },
66};
67
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* CAN_PARAMS_H */
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:33
#define CAN_RX
Default CAN transceiver RX pin if not defined in board configuration.
Definition can_params.h:38
#define CAN_BITRATE
Default CAN Bitrate.
Definition can_params.h:43
ESP CAN device configuration.
Definition can_esp.h:88
Linux candev configuration.
Parameters to initialize a candev.
Definition device.h:55
const char * name
candev name to set
Definition device.h:56
Definitions of CAN device interface.