/*
- * Copyright (C) 2012-2014 Czech Technical University in Prague
+ * Copyright (C) 2012-2014, 2016 Czech Technical University in Prague
*
* Created on: 28.2.2013
*
.type = RPP_CAN_MIXED,
.controller = 1,
.msg_obj = 1,
- .id = 1,
- .mask = 0x7fffff,
+ .id = 0,
+ .mask = 0,
},
{
.type = RPP_CAN_MIXED,
.controller = 2,
.msg_obj = 1,
- .id = 1,
- .mask = 0x7fffff,
+ .id = 0,
+ .mask = 0,
},
{
.type = RPP_CAN_MIXED,
.controller = 3,
.msg_obj = 1,
- .id = 1,
- .mask = 0x7fffff,
+ .id = 0,
+ .mask = 0,
}
};
return 1;
}
+ if (controller_id < 1 || controller_id > 3) {
+ rpp_sci_printf("Invalid controller ID\n");
+ return -CMDERR_NODEV;
+ }
+
rpp_can_init(&can_config);
while (cmd_io->getc(cmd_io) < 0) {
"\n"
"At the end the CAN bus is reset and left with the configuration from\n"
"test 1.\n"
- "The command can be called even after the CAN bus has been already configured by\n"
- "previous calling of the `can_init` command. The previous configuration is kept, while\n"
- "the test command reconfigures the bus for the test purposes and can be restored again\n"
- "by another calling of the `can_init` command.\n"
"\n"
- "For error codes description refer please the API documentation for the rpp-test-sw.\n"
+ "The command can be called even after the CAN bus has been already\n"
+ "configured by previous invocation of the `caninit` command. The\n"
+ "previous timing configuration set by `cantiming#` command not\n"
+ "modified. Therefore, calling `caninit` after this command finishes\n"
+ "restores the previous timing settings.\n"
+ "\n"
+ "For error codes description please refer to the API documentation for\n"
+ "the rpp-test-sw.\n"
"\n"
"### Example ###\n"
"\n"