14#ifndef ZEPHYR_INCLUDE_ISOTP_H_ 
   15#define ZEPHYR_INCLUDE_ISOTP_H_ 
   52#define ISOTP_N_TIMEOUT_A      -1 
   55#define ISOTP_N_TIMEOUT_BS     -2 
   58#define ISOTP_N_TIMEOUT_CR     -3 
   61#define ISOTP_N_WRONG_SN       -4 
   64#define ISOTP_N_INVALID_FS     -5 
   67#define ISOTP_N_UNEXP_PDU      -6 
   70#define ISOTP_N_WFT_OVRN       -7 
   73#define ISOTP_N_BUFFER_OVERFLW -8 
   76#define ISOTP_N_ERROR          -9 
   81#define ISOTP_NO_FREE_FILTER    -10 
   84#define ISOTP_NO_NET_BUF_LEFT   -11 
   87#define ISOTP_NO_BUF_DATA_LEFT  -12 
   90#define ISOTP_NO_CTX_LEFT       -13 
   93#define ISOTP_RECV_TIMEOUT      -14 
  107#define ISOTP_FIXED_ADDR_SA_POS         (CONFIG_ISOTP_FIXED_ADDR_SA_POS) 
  110#define ISOTP_FIXED_ADDR_SA_MASK        (CONFIG_ISOTP_FIXED_ADDR_SA_MASK) 
  113#define ISOTP_FIXED_ADDR_TA_POS         (CONFIG_ISOTP_FIXED_ADDR_TA_POS) 
  116#define ISOTP_FIXED_ADDR_TA_MASK        (CONFIG_ISOTP_FIXED_ADDR_TA_MASK) 
  119#define ISOTP_FIXED_ADDR_PRIO_POS       (CONFIG_ISOTP_FIXED_ADDR_PRIO_POS) 
  122#define ISOTP_FIXED_ADDR_PRIO_MASK      (CONFIG_ISOTP_FIXED_ADDR_PRIO_MASK) 
  125#define ISOTP_FIXED_ADDR_RX_MASK        (CONFIG_ISOTP_FIXED_ADDR_RX_MASK) 
  177struct isotp_send_ctx;
 
  178struct isotp_recv_ctx;
 
  285#ifdef CONFIG_ISOTP_ENABLE_CONTEXT_BUFFERS 
  304int isotp_send_ctx_buf(
const struct device *can_dev,
 
  329int isotp_send_net_ctx_buf(
const struct device *can_dev,
 
  338#if defined(CONFIG_ISOTP_USE_TX_BUF) && \ 
  339        defined(CONFIG_ISOTP_ENABLE_CONTEXT_BUFFERS) 
  359int isotp_send_buf(
const struct device *can_dev,
 
  369struct isotp_callback {
 
  374struct isotp_send_ctx {
 
  377        const struct device *can_dev;
 
  388                struct isotp_callback fin_cb;
 
  389                struct k_sem fin_sem;
 
  405struct isotp_recv_ctx {
 
  407        const struct device *can_dev;
 
ZTEST_BMEM int timeout
Definition: main.c:31
 
struct k_fifo fifo
Definition: errno.c:44
 
int isotp_recv(struct isotp_recv_ctx *ctx, uint8_t *data, size_t len, k_timeout_t timeout)
Read out received data from fifo.
 
int isotp_bind(struct isotp_recv_ctx *ctx, const struct device *can_dev, const struct isotp_msg_id *rx_addr, const struct isotp_msg_id *tx_addr, const struct isotp_fc_opts *opts, k_timeout_t timeout)
Bind an address to a receiving context.
 
void isotp_unbind(struct isotp_recv_ctx *ctx)
Unbind a context from the interface.
 
int isotp_send(struct isotp_send_ctx *ctx, const struct device *can_dev, const uint8_t *data, size_t len, const struct isotp_msg_id *tx_addr, const struct isotp_msg_id *rx_addr, isotp_tx_callback_t complete_cb, void *cb_arg)
Send data.
 
int isotp_recv_net(struct isotp_recv_ctx *ctx, struct net_buf **buffer, k_timeout_t timeout)
Get the net buffer on data reception.
 
void(* isotp_tx_callback_t)(int error_nr, void *arg)
Definition: isotp.h:175
 
state
Definition: parser_state.h:29
 
static struct k_work work[2]
Definition: main.c:16
 
struct _snode sys_snode_t
Definition: slist.h:33
 
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
 
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
 
Runtime device structure (in ROM) per driver instance.
Definition: device.h:380
 
ISO-TP frame control options struct.
Definition: isotp.h:170
 
uint8_t stmin
Definition: isotp.h:172
 
uint8_t bs
Definition: isotp.h:171
 
ISO-TP message id struct.
Definition: isotp.h:136
 
uint32_t ext_id
Definition: isotp.h:145
 
uint8_t ide
Definition: isotp.h:150
 
uint8_t ext_addr
Definition: isotp.h:148
 
uint8_t use_fixed_addr
Definition: isotp.h:154
 
uint8_t use_ext_addr
Definition: isotp.h:152
 
uint32_t std_id
Definition: isotp.h:144
 
Definition: kernel.h:2310
 
Kernel timeout type.
Definition: sys_clock.h:65
 
A structure used to submit work.
Definition: kernel.h:3765
 
Network buffer representation.
Definition: buf.h:906
 
static fdata_t data[2]
Definition: test_fifo_contexts.c:15
 
static ZTEST_BMEM char buffer[8]
Definition: test_mbox_api.c:551