blob: f5ab2c2879c9d09d704e4012c73a8e4109148ec9 [file] [log] [blame]
Nick Kralevicha67e4de2013-01-14 11:28:26 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070019#ifndef _UAPI_CAN_BCM_H
20#define _UAPI_CAN_BCM_H
Ben Cheng655a7c02013-10-16 16:09:24 -070021#include <linux/types.h>
22#include <linux/can.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080023struct bcm_timeval {
24 long tv_sec;
25 long tv_usec;
26};
Ben Cheng655a7c02013-10-16 16:09:24 -070027struct bcm_msg_head {
Tao Baod7db5942015-01-28 10:07:51 -080028 __u32 opcode;
29 __u32 flags;
30 __u32 count;
Christopher Ferris05d08e92016-02-04 13:16:38 -080031 struct bcm_timeval ival1, ival2;
Tao Baod7db5942015-01-28 10:07:51 -080032 canid_t can_id;
33 __u32 nframes;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070034 struct can_frame frames[];
Ben Cheng655a7c02013-10-16 16:09:24 -070035};
36enum {
Tao Baod7db5942015-01-28 10:07:51 -080037 TX_SETUP = 1,
38 TX_DELETE,
Tao Baod7db5942015-01-28 10:07:51 -080039 TX_READ,
40 TX_SEND,
41 RX_SETUP,
42 RX_DELETE,
Tao Baod7db5942015-01-28 10:07:51 -080043 RX_READ,
44 TX_STATUS,
45 TX_EXPIRED,
46 RX_STATUS,
Tao Baod7db5942015-01-28 10:07:51 -080047 RX_TIMEOUT,
48 RX_CHANGED
Ben Cheng655a7c02013-10-16 16:09:24 -070049};
50#define SETTIMER 0x0001
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define STARTTIMER 0x0002
52#define TX_COUNTEVT 0x0004
53#define TX_ANNOUNCE 0x0008
54#define TX_CP_CAN_ID 0x0010
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define RX_FILTER_ID 0x0020
56#define RX_CHECK_DLC 0x0040
57#define RX_NO_AUTOTIMER 0x0080
58#define RX_ANNOUNCE_RESUME 0x0100
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define TX_RESET_MULTI_IDX 0x0200
60#define RX_RTR_FRAME 0x0400
Christopher Ferris49f525c2016-12-12 14:55:36 -080061#define CAN_FD_FRAME 0x0800
Nick Kralevicha67e4de2013-01-14 11:28:26 -080062#endif