add set samplepoint value to set_bitrate
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>pull/106/head^2
parent
5acb73848a
commit
6f73bd10bc
|
|
@ -28,7 +28,7 @@ int scan_do_restart(const char *name);
|
|||
int scan_set_restart_ms(const char *name, __u32 restart_ms);
|
||||
int scan_set_bittiming(const char *name, struct can_bittiming *bt);
|
||||
int scan_set_ctrlmode(const char *name, struct can_ctrlmode *cm);
|
||||
int scan_set_bitrate(const char *name, __u32 bitrate);
|
||||
int scan_set_bitrate(const char *name, __u32 bitrate, __u32 sample_point);
|
||||
|
||||
int scan_get_restart_ms(const char *name, __u32 *restart_ms);
|
||||
int scan_get_bittiming(const char *name, struct can_bittiming *bt);
|
||||
|
|
|
|||
|
|
@ -573,12 +573,13 @@ int scan_set_bittiming(const char *name, struct can_bittiming *bt)
|
|||
return set_link(name, &req_info);
|
||||
}
|
||||
|
||||
int scan_set_bitrate(const char *name, __u32 bitrate)
|
||||
int scan_set_bitrate(const char *name, __u32 bitrate, __u32 sample_point)
|
||||
{
|
||||
struct can_bittiming bt;
|
||||
|
||||
memset(&bt, 0, sizeof(bt));
|
||||
bt.bitrate = bitrate;
|
||||
bt.sample_point = sample_point;
|
||||
|
||||
return scan_set_bittiming(name, &bt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue