Lines Matching refs:can_dev
28 const struct device *const can_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_canbus)); variable
55 static void send_sf(const struct device *can_dev) in send_sf() argument
59 ret = isotp_send(&send_ctx, can_dev, random_data, DATA_SIZE_SF, in send_sf()
104 static void send_test_data(const struct device *can_dev, const uint8_t *data, in send_test_data() argument
109 ret = isotp_send(&send_ctx, can_dev, data, len, &rx_addr, &tx_addr, in send_test_data()
207 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, &fc_opts, in ZTEST()
212 send_sf(can_dev); in ZTEST()
223 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, &fc_opts, in ZTEST()
228 send_sf(can_dev); in ZTEST()
239 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, &fc_opts, in ZTEST()
244 send_test_data(can_dev, random_data, sizeof(random_data)); in ZTEST()
256 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, &fc_opts, in ZTEST()
261 send_test_data(can_dev, random_data, data_size); in ZTEST()
277 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, in ZTEST()
282 send_test_data(can_dev, random_data, send_len); in ZTEST()
308 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, in ZTEST()
313 send_test_data(can_dev, random_data, send_len); in ZTEST()
332 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, in ZTEST()
339 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, in ZTEST()
342 send_sf(can_dev); in ZTEST()
349 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, in ZTEST()
352 send_sf(can_dev); in ZTEST()
359 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, in ZTEST()
362 send_test_data(can_dev, random_data, 60); in ZTEST()
369 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, in ZTEST()
372 send_test_data(can_dev, random_data, 60); in ZTEST()
385 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, &fc_opts, in ZTEST()
389 send_test_data(can_dev, random_data, send_data_length); in ZTEST()
401 ret = isotp_bind(&recv_ctx, can_dev, &rx_addr, &tx_addr, &fc_opts, in ZTEST()
405 send_test_data(can_dev, random_data, send_data_length); in ZTEST()
418 zassert_true(device_is_ready(can_dev), "CAN device not ready"); in isotp_implementation_setup()
420 ret = can_set_mode(can_dev, CAN_MODE_LOOPBACK); in isotp_implementation_setup()
423 ret = can_start(can_dev); in isotp_implementation_setup()