mirror of https://github.com/ARMmbed/mbed-os.git
RENESAS: add call to can_frequency and use hz parameter of can_init_freq
parent
9115dd9b98
commit
6c1fc983b7
|
@ -573,10 +573,13 @@ void can_init_freq(can_t *obj, PinName rd, PinName td, int hz) {
|
|||
/* pin out the can pins */
|
||||
pinmap_pinout(rd, PinMap_CAN_RD);
|
||||
pinmap_pinout(td, PinMap_CAN_TD);
|
||||
|
||||
/* set can frequency */
|
||||
can_frequency(obj, hz);
|
||||
}
|
||||
|
||||
void can_init(can_t *obj, PinName rd, PinName td) {
|
||||
can_init_freq(obj, rd, td, 0);
|
||||
can_init_freq(obj, rd, td, 100000);
|
||||
}
|
||||
|
||||
void can_free(can_t *obj) {
|
||||
|
|
|
@ -590,10 +590,13 @@ void can_init_freq(can_t *obj, PinName rd, PinName td, int hz) {
|
|||
/* pin out the can pins */
|
||||
pinmap_pinout(rd, PinMap_CAN_RD);
|
||||
pinmap_pinout(td, PinMap_CAN_TD);
|
||||
|
||||
/* set can frequency */
|
||||
can_frequency(obj, hz);
|
||||
}
|
||||
|
||||
void can_init(can_t *obj, PinName rd, PinName td) {
|
||||
can_init_freq(obj, rd, td, 0);
|
||||
can_init_freq(obj, rd, td, 100000);
|
||||
}
|
||||
|
||||
void can_free(can_t *obj) {
|
||||
|
|
Loading…
Reference in New Issue