drivers: can: shell: add debug log for calculated timing parameters
Add debug logs for the timing parameters calculated by the shell commands. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
1c7feb3fd4
commit
37b3a11d72
|
@ -421,6 +421,10 @@ static int cmd_can_bitrate_set(const struct shell *sh, size_t argc, char **argv)
|
|||
timing.sjw);
|
||||
}
|
||||
|
||||
LOG_DBG("sjw %u, prop_seg %u, phase_seg1 %u, phase_seg2 %u, prescaler %u",
|
||||
timing.sjw, timing.prop_seg, timing.phase_seg1, timing.phase_seg2,
|
||||
timing.prescaler);
|
||||
|
||||
err = can_set_timing(dev, &timing);
|
||||
if (err != 0) {
|
||||
shell_error(sh, "failed to set timing (err %d)", err);
|
||||
|
@ -495,6 +499,10 @@ static int cmd_can_dbitrate_set(const struct shell *sh, size_t argc, char **argv
|
|||
timing.sjw);
|
||||
}
|
||||
|
||||
LOG_DBG("sjw %u, prop_seg %u, phase_seg1 %u, phase_seg2 %u, prescaler %u",
|
||||
timing.sjw, timing.prop_seg, timing.phase_seg1, timing.phase_seg2,
|
||||
timing.prescaler);
|
||||
|
||||
err = can_set_timing_data(dev, &timing);
|
||||
if (err != 0) {
|
||||
shell_error(sh, "failed to set data timing (err %d)", err);
|
||||
|
|
Loading…
Reference in a new issue