File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
tests/subsys/canbus/isotp/implementation/src Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1212#define NUMBER_OF_REPETITIONS 5
1313#define DATA_SIZE_SF 7
1414
15- #define CAN_DEVICE_NAME DT_LABEL(DT_CHOSEN(zephyr_canbus))
16-
1715/*
1816 * @addtogroup t_can
1917 * @{
2725 * @}
2826 */
2927
30- const struct device * can_dev ;
28+ const struct device * can_dev = DEVICE_DT_GET ( DT_CHOSEN ( zephyr_canbus )) ;
3129
3230const struct isotp_fc_opts fc_opts = {
3331 .bs = 8 ,
@@ -417,8 +415,8 @@ void test_main(void)
417415 zassert_true (sizeof (random_data ) >= sizeof (data_buf ) * 2 + 10 ,
418416 "Test data size to small" );
419417
420- can_dev = device_get_binding ( CAN_DEVICE_NAME );
421- zassert_not_null ( can_dev , "CAN device not not found" );
418+ zassert_true ( device_is_ready ( can_dev ), "CAN device not ready" );
419+
422420 ret = can_set_mode (can_dev , CAN_LOOPBACK_MODE );
423421 zassert_equal (ret , 0 , "Configuring loopback mode failed (%d)" , ret );
424422
You can’t perform that action at this time.
0 commit comments