File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
idf_component_register(SRCS "mcp2515.cpp"
2
- INCLUDE_DIRS "include" )
2
+ INCLUDE_DIRS "include"
3
+ REQUIRES driver)
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ MCP2515::ERROR MCP2515::reset(void)
38
38
printf (" spi_device_transmit failed\n " );
39
39
}
40
40
41
- vTaskDelay (10 / portTICK_RATE_MS );
41
+ vTaskDelay (10 / portTICK_PERIOD_MS );
42
42
43
43
uint8_t zeros[14 ];
44
44
memset (zeros, 0 , sizeof (zeros));
@@ -269,14 +269,14 @@ MCP2515::ERROR MCP2515::setOneShotMode(bool set)
269
269
if (set)
270
270
data = 1U << 3 ;
271
271
modifyRegister (MCP_CANCTRL, 1U << 3 , data);
272
- vTaskDelay (10 / portTICK_RATE_MS );
272
+ vTaskDelay (10 / portTICK_PERIOD_MS );
273
273
bool modeMatch = false ;
274
274
for (int i = 0 ; i < 10 ; i++) {
275
275
uint8_t ctrlR = readRegister (MCP_CANCTRL);
276
276
modeMatch = (ctrlR & (1U << 3 )) == data;
277
277
if (modeMatch)
278
278
break ;
279
- vTaskDelay (10 / portTICK_RATE_MS );
279
+ vTaskDelay (10 / portTICK_PERIOD_MS );
280
280
}
281
281
return modeMatch ? ERROR_OK : ERROR_FAIL;
282
282
}
@@ -302,7 +302,7 @@ MCP2515::ERROR MCP2515::setMode(const CANCTRL_REQOP_MODE mode)
302
302
break ;
303
303
}
304
304
305
- vTaskDelay (10 / portTICK_RATE_MS );
305
+ vTaskDelay (10 / portTICK_PERIOD_MS );
306
306
}
307
307
308
308
return modeMatch ? ERROR_OK : ERROR_FAIL;
You can’t perform that action at this time.
0 commit comments