canbus: Rename canbus_send() to canhw_send()
Rename canbus_send() to canhw_send() and rename canbus_set_filter() to canhw_set_filter(). This makes it more clear where the code should reside. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
// This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
#include "autoconf.h" // CONFIG_CANBUS_FREQUENCY
|
||||
#include "canbus.h" // canbus_send
|
||||
#include "canbus.h" // canhw_send
|
||||
#include "canserial.h" // canserial_send
|
||||
#include "command.h" // DECL_CONSTANT
|
||||
|
||||
@@ -14,13 +14,13 @@ DECL_CONSTANT("CANBUS_FREQUENCY", CONFIG_CANBUS_FREQUENCY);
|
||||
int
|
||||
canserial_send(struct canbus_msg *msg)
|
||||
{
|
||||
return canbus_send(msg);
|
||||
return canhw_send(msg);
|
||||
}
|
||||
|
||||
void
|
||||
canserial_set_filter(uint32_t id)
|
||||
{
|
||||
canbus_set_filter(id);
|
||||
canhw_set_filter(id);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -18,8 +18,8 @@ struct canbus_msg {
|
||||
#define CANMSG_DATA_LEN(msg) ((msg)->dlc > 8 ? 8 : (msg)->dlc)
|
||||
|
||||
// callbacks provided by board specific code
|
||||
int canbus_send(struct canbus_msg *msg);
|
||||
void canbus_set_filter(uint32_t id);
|
||||
int canhw_send(struct canbus_msg *msg);
|
||||
void canhw_set_filter(uint32_t id);
|
||||
|
||||
// canbus.c
|
||||
void canbus_notify_tx(void);
|
||||
|
||||
@@ -205,7 +205,7 @@ usbcan_task(void)
|
||||
msg.data32[0] = gs->data32[0];
|
||||
msg.data32[1] = gs->data32[1];
|
||||
if (host_status & HS_TX_HW) {
|
||||
ret = canbus_send(&msg);
|
||||
ret = canhw_send(&msg);
|
||||
if (ret < 0)
|
||||
return;
|
||||
UsbCan.host_status = host_status = host_status & ~HS_TX_HW;
|
||||
|
||||
Reference in New Issue
Block a user