Skip to content

Commit a912d05

Browse files
committed
Add can_init_frequency to RENESAS targets
hz is not used in can_init functions
1 parent f740d2f commit a912d05

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

targets/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ static void can4_bus_err_irq(void) {
539539
can_err_irq(CAN_4, IRQ_BUS);
540540
}
541541

542-
void can_init(can_t *obj, PinName rd, PinName td) {
542+
void can_init_freq(can_t *obj, PinName rd, PinName td, int hz) {
543543
__IO uint32_t *dmy_ctr;
544544

545545
/* determine the CAN to use */
@@ -575,6 +575,10 @@ void can_init(can_t *obj, PinName rd, PinName td) {
575575
pinmap_pinout(td, PinMap_CAN_TD);
576576
}
577577

578+
void can_init(can_t *obj, PinName rd, PinName td) {
579+
can_init_freq(obj, rd, td, 0);
580+
}
581+
578582
void can_free(can_t *obj) {
579583
/* disable CAN clock */
580584
CPGSTBCR3 |= CPG_STBCR3_BIT_MSTP32;

targets/TARGET_RENESAS/TARGET_VK_RZ_A1H/can_api.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ static void can4_bus_err_irq(void) {
556556
can_err_irq(CAN_4, IRQ_BUS);
557557
}
558558

559-
void can_init(can_t *obj, PinName rd, PinName td) {
559+
void can_init_freq(can_t *obj, PinName rd, PinName td, int hz) {
560560
__IO uint32_t *dmy_ctr;
561561

562562
/* determine the CAN to use */
@@ -592,6 +592,10 @@ void can_init(can_t *obj, PinName rd, PinName td) {
592592
pinmap_pinout(td, PinMap_CAN_TD);
593593
}
594594

595+
void can_init(can_t *obj, PinName rd, PinName td) {
596+
can_init_freq(obj, rd, td, 0);
597+
}
598+
595599
void can_free(can_t *obj) {
596600
/* disable CAN clock */
597601
CPGSTBCR3 |= CPG_STBCR3_BIT_MSTP32;

0 commit comments

Comments
 (0)