Go to the documentation of this file.
38 #define CAN_ISOTP_BS (10)
41 #ifndef CAN_ISOTP_STMIN
45 #define CAN_ISOTP_STMIN (5)
48 #ifndef CAN_ISOTP_WFTMAX
52 #define CAN_ISOTP_WFTMAX (1)
125 #define CAN_ISOTP_RX_FLAGS_MASK 0x0000FFFF
126 #define CAN_ISOTP_LISTEN_MODE 0x0001
127 #define CAN_ISOTP_EXTEND_ADDR 0x0002
128 #define CAN_ISOTP_TX_PADDING 0x0004
129 #define CAN_ISOTP_HALF_DUPLEX 0x0040
130 #define CAN_ISOTP_RX_EXT_ADDR 0x0200
132 #define CAN_ISOTP_TX_FLAGS_MASK 0xFFFF0000
133 #define CAN_ISOTP_TX_DONT_WAIT 0x00010000
140 #define CAN_ISOTP_DEFAULT_FLAGS 0
141 #define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
142 #define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC
143 #define CAN_ISOTP_DEFAULT_FRAME_TXTIME 0
144 #define CAN_ISOTP_DEFAULT_RECV_BS 0
145 #define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00
146 #define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0
uint8_t sn
current sequence number
int16_t kernel_pid_t
Unique process identifier.
unsigned idx
current index in buf
int tx_handle
handle of the last sent frame
int isotp_send(struct isotp *isotp, const void *buf, int len, int flags)
Send data through an isotp channel.
struct isotp * next
next bound channel
void * arg
upper layer private arg
uint8_t ext_address
set address for extended addressing
struct isotp_fc_options txfc
tx flow control options (defined remotely)
kernel_pid_t isotp_init(char *stack, int stacksize, char priority, const char *name)
Initialize the isotp layer.
xtimer_t tx_timer
timer for tx operations
The isotp_options struct.
uint32_t tx_gap
transmit gap from fc (in us)
Definitions high-level CAN interface.
struct isotp_options opt
channel options
struct tpcon rx
receive state
uint8_t stmin
separation time provided in FC frame 0x00 - 0x7F : 0 - 127 ms 0x80 - 0xF0 : reserved 0xF1 - 0xF9 : 10...
uint8_t state
the protocol state
void isotp_free_rx(can_rx_data_t *rx)
Free a received buffer.
Definitions of high-level CAN interface.
canid_t rx_id
Receive CAN ID.
uint8_t txpad_content
set content of padding byte (tx)
gnrc_pktsnip_t * snip
allocated snip containing data buffer
can_reg_entry_t entry
entry containing ifnum and upper layer msg system
struct tpcon tx
transmit state
The isotp_fc_options struct.
int isotp_bind(struct isotp *isotp, can_reg_entry_t *entry, void *arg, struct isotp_fc_options *fc_options)
Bind an isotp channel.
uint8_t tx_wft
transmit wait counter
Interface definition for the global network buffer. Network devices and layers can allocate space for...
canid_t tx_id
transmit CAN ID
xtimer_t rx_timer
timer for rx operations
int isotp_release(struct isotp *isotp)
Release a bound isotp channel.
struct isotp_fc_options rxfc
rx flow control options (defined locally)
uint8_t rx_ext_address
set address for extended addressing
uint8_t bs
blocksize provided in FC frame, 0 = off
uint16_t flags
set flags for isotp behaviour.
xtimer interface definitions
Type to represent parts (either headers or payload) of a packet, called snips.
uint32_t canid_t
Controller Area Network Identifier structure.