56 trans->
ivy_p += sprintf(trans->
ivy_p,
"%c", (
char)(*((
char *)(b + i))));
60 trans->
ivy_p += sprintf(trans->
ivy_p,
"%u", b[i]);
101 trans->
ivy_p += sprintf(trans->
ivy_p,
"%f", (
float)(*((
float *)(b + i))));
105 trans->
ivy_p += sprintf(trans->
ivy_p,
"%f", (
double)(*((
double *)(b + i))));
136 uint8_t byte __attribute__((unused)),
const char *name __attribute__((unused)))
138 trans->
ivy_p += sprintf(trans->
ivy_p,
"%s ", name);
147 uint8_t payload_len __attribute__((unused)))
154 *(--trans->
ivy_p) =
'\0';
156 IvySendMsg(
"%s", trans->
ivy_buf);
put_byte_t put_byte
put one byte
uint32_t nb_bytes
The number of bytes send.
static void count_bytes(struct ivy_transport *trans, struct link_device *dev, uint8_t bytes)
uint8_t(* get_byte_t)(void *)
TransportDataFormat
Data format (scalar or array)
static void put_named_byte(struct ivy_transport *trans, struct link_device *dev, enum TransportDataType type, enum TransportDataFormat format, uint8_t byte, const char *name)
end_message_t end_message
transport trailer
static int null_function(struct ivy_transport *p)
check_free_space_t check_free_space
check if transmit buffer is not full
struct link_device device
uint8_t(* size_of_t)(void *, uint8_t)
Function pointers definition.
void(* end_message_t)(void *, struct link_device *)
struct ivy_transport ivy_tp
size_of_t size_of
get size of payload with transport header and trailer
void(* overrun_t)(void *, struct link_device *)
TransportDataType
Data type.
void ivy_transport_init(void)
void * periph
pointer to parent implementation
count_bytes_t count_bytes
count bytes to send
struct transport_tx trans_tx
static void send_message(struct ivy_transport *p)
uint16_t nb_msgs
The number of messages send.
unsigned long long uint64_t
static int check_available_space(struct ivy_transport *trans, struct link_device *dev, uint8_t bytes)
void(* start_message_t)(void *, struct link_device *, uint8_t)
static uint8_t size_of(struct ivy_transport *trans, uint8_t len)
get_byte_t get_byte
get a new char
void(* put_named_byte_t)(void *, struct link_device *, enum TransportDataType, enum TransportDataFormat, uint8_t, const char *)
start_message_t start_message
transport header
int(* char_available_t)(void *)
put_named_byte_t put_named_byte
send a single byte or its name
static void end_message(struct ivy_transport *trans, struct link_device *dev)
static const struct usb_device_descriptor dev
void(* put_byte_t)(void *, uint8_t)
uint8_t nb_ovrn
The number of overruns.
int(* check_available_space_t)(void *, struct link_device *, uint8_t)
void(* put_bytes_t)(void *, struct link_device *, enum TransportDataType, enum TransportDataFormat, uint8_t, const void *)
void * impl
pointer to parent implementation
static void start_message(struct ivy_transport *trans, struct link_device *dev, uint8_t payload_len)
void(* send_message_t)(void *)
Common code for AP and FBW telemetry.
static void overrun(struct ivy_transport *trans, struct link_device *dev)
check_available_space_t check_available_space
check if transmit buffer is not full
int(* check_free_space_t)(void *, uint8_t)
Function pointers definition.
char_available_t char_available
check if a new character is available
put_bytes_t put_bytes
send bytes
static void put_bytes(struct ivy_transport *trans, struct link_device *dev, enum TransportDataType type, enum TransportDataFormat format, uint8_t len, const void *bytes)
void(* count_bytes_t)(void *, struct link_device *, uint8_t)
static void transmit(struct ivy_transport *p, uint8_t byte)
send_message_t send_message
send completed buffer
Building Paparazzi frames over IVY.
static int check_free_space(struct ivy_transport *p, uint8_t len)