Rename UXR_CONFIG_CAN_TRANSPORT_MTU (#372)
Because CAN-FD MTU is fixed, it's not configurable. UXR_CONFIG_CAN_TRANSPORT_MTU is a bit misleading. Thus, this commit rename it to UXR_CAN_TRANSPORT_MTU. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Co-authored-by: Yasushi SHOJI <yashi@spacecubics.com>
This commit is contained in:
parent
b8dbfaa775
commit
8ffecce848
|
@ -22,7 +22,7 @@
|
|||
#include <stdlib.h> //atoi
|
||||
|
||||
#define STREAM_HISTORY 8
|
||||
#define BUFFER_SIZE UXR_CONFIG_CAN_TRANSPORT_MTU* STREAM_HISTORY
|
||||
#define BUFFER_SIZE UXR_CAN_TRANSPORT_MTU* STREAM_HISTORY
|
||||
|
||||
int main(
|
||||
int args,
|
||||
|
|
|
@ -29,11 +29,12 @@ extern "C"
|
|||
#include <uxr/client/visibility.h>
|
||||
#include <uxr/client/transport.h>
|
||||
|
||||
#define UXR_CONFIG_CAN_TRANSPORT_MTU 63
|
||||
/* For CAN-FD, MTU is fixed value */
|
||||
#define UXR_CAN_TRANSPORT_MTU 63
|
||||
|
||||
typedef struct uxrCANTransport
|
||||
{
|
||||
uint8_t buffer[UXR_CONFIG_CAN_TRANSPORT_MTU];
|
||||
uint8_t buffer[UXR_CAN_TRANSPORT_MTU];
|
||||
uxrCommunication comm;
|
||||
struct uxrCANPlatform platform;
|
||||
} uxrCANTransport;
|
||||
|
|
|
@ -103,7 +103,7 @@ bool uxr_init_can_transport(
|
|||
transport->comm.send_msg = send_can_msg;
|
||||
transport->comm.recv_msg = recv_can_msg;
|
||||
transport->comm.comm_error = get_can_error;
|
||||
transport->comm.mtu = UXR_CONFIG_CAN_TRANSPORT_MTU;
|
||||
transport->comm.mtu = UXR_CAN_TRANSPORT_MTU;
|
||||
UXR_INIT_LOCK(&transport->comm.mutex);
|
||||
rv = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue