Skip to content

Commit 6c1fc98

Browse files
committed
RENESAS: add call to can_frequency and use hz parameter of can_init_freq
1 parent 9115dd9 commit 6c1fc98

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

targets/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,13 @@ void can_init_freq(can_t *obj, PinName rd, PinName td, int hz) {
573573
/* pin out the can pins */
574574
pinmap_pinout(rd, PinMap_CAN_RD);
575575
pinmap_pinout(td, PinMap_CAN_TD);
576+
577+
/* set can frequency */
578+
can_frequency(obj, hz);
576579
}
577580

578581
void can_init(can_t *obj, PinName rd, PinName td) {
579-
can_init_freq(obj, rd, td, 0);
582+
can_init_freq(obj, rd, td, 100000);
580583
}
581584

582585
void can_free(can_t *obj) {

targets/TARGET_RENESAS/TARGET_VK_RZ_A1H/can_api.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,10 +590,13 @@ void can_init_freq(can_t *obj, PinName rd, PinName td, int hz) {
590590
/* pin out the can pins */
591591
pinmap_pinout(rd, PinMap_CAN_RD);
592592
pinmap_pinout(td, PinMap_CAN_TD);
593+
594+
/* set can frequency */
595+
can_frequency(obj, hz);
593596
}
594597

595598
void can_init(can_t *obj, PinName rd, PinName td) {
596-
can_init_freq(obj, rd, td, 0);
599+
can_init_freq(obj, rd, td, 100000);
597600
}
598601

599602
void can_free(can_t *obj) {

0 commit comments

Comments
 (0)