RENESAS: add call to can_frequency and use hz parameter of can_init_freq

pull/4165/head
adustm 2017-04-27 14:30:39 +02:00
parent 9115dd9b98
commit 6c1fc983b7
2 changed files with 8 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {