File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
tests/subsys/canbus/isotp/conformance/src Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 4949#define BS_TIMEOUT_UPPER_MS 1100
5050#define BS_TIMEOUT_LOWER_MS 1000
5151
52- #define CAN_DEVICE_NAME DT_LABEL(DT_CHOSEN(zephyr_canbus))
53-
5452/*
5553 * @addtogroup t_can
5654 * @{
@@ -120,7 +118,7 @@ const struct isotp_msg_id tx_addr_fixed = {
120118 .use_fixed_addr = 1
121119};
122120
123- const struct device * can_dev ;
121+ const struct device * can_dev = DEVICE_DT_GET ( DT_CHOSEN ( zephyr_canbus )) ;
124122struct isotp_recv_ctx recv_ctx ;
125123struct isotp_send_ctx send_ctx ;
126124uint8_t data_buf [128 ];
@@ -969,8 +967,7 @@ void test_main(void)
969967 zassert_true (sizeof (random_data ) >= sizeof (data_buf ) * 2 + 10 ,
970968 "Test data size to small" );
971969
972- can_dev = device_get_binding (CAN_DEVICE_NAME );
973- zassert_not_null (can_dev , "CAN device not not found" );
970+ zassert_true (device_is_ready (can_dev ), "CAN device not ready" );
974971
975972 ret = can_set_mode (can_dev , CAN_LOOPBACK_MODE );
976973 zassert_equal (ret , 0 , "Failed to set loopback mode [%d]" , ret );
You can’t perform that action at this time.
0 commit comments