问题1.4.1.0的内核版本,使用官方最新更新的CAN驱动,出现报错。报错内容如下:
../drivers/drv_can.c: In function '_can_config':
../drivers/drv_can.c:152:10: error: 'RT_CAN_MODE_LISTEN' undeclared (first use in this function)
case RT_CAN_MODE_LISTEN:
^
../drivers/drv_can.c:152:10: note: each undeclared identifier is reported only once for each function it appears in
../drivers/drv_can.c:158:10: error: 'RT_CAN_MODE_LOOPBACKANLISTEN' undeclared (first use in this function)
case RT_CAN_MODE_LOOPBACKANLISTEN:
^
../drivers/drv_can.c: In function '_can_control':
../drivers/drv_can.c:336:41: error: 'struct rt_can_filter_item' has no member named 'hdr_bank'
if (filter_cfg->items[i].hdr_bank == -1)
^
../drivers/drv_can.c:353:76: error: 'struct rt_can_filter_item' has no member named 'hdr_bank'
drv_can->FilterConfig.FilterBank = filter_cfg->items[i].hdr_bank;
^
../drivers/drv_can.c:404:82: error: 'struct rt_can_filter_item' has no member named 'rxfifo'
drv_can->FilterConfig.FilterFIFOAssignment = filter_cfg->items[i].rxfifo;/rxfifo = CAN_RX_FIFO0/CAN_RX_FIFO1/
^
../drivers/drv_can.c:414:27: error: 'RT_CAN_MODE_LISTEN' undeclared (first use in this function)
argval != RT_CAN_MODE_LISTEN &&
^
../drivers/drv_can.c:416:27: error: 'RT_CAN_MODE_LOOPBACKANLISTEN' undeclared (first use in this function)
argval != RT_CAN_MODE_LOOPBACKANLISTEN)
^
../drivers/drv_can.c: In function '_can_recvmsg':
../drivers/drv_can.c:615:9: error: 'struct rt_can_msg' has no member named 'rxfifo'
pmsg->rxfifo = fifo;
^
../drivers/drv_can.c:622:13: error: 'struct rt_can_msg' has no member named 'hdr_index'
pmsg->hdr_index = rxheader.FilterMatchIndex;
^
../drivers/drv_can.c:627:12: error: 'struct rt_can_msg' has no member named 'hdr_index'
pmsg->hdr_index = rxheader.FilterMatchIndex;
^
make: *** [drivers/subdir.mk:72: drivers/drv_can.o] Error 1
make: *** Waiting for unfinished jobs....
../drivers/drv_common.c:16:13: warning: 'reboot' defined but not used [-Wunused-function]
更多回帖