Sternum Embedded SDK
transmission_port.h File Reference
#include <stdint.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

signed long int sternum_port_transmit (const void *data, size_t count)
 Sternum's port to write to the communication channel. More...
 

Function Documentation

◆ sternum_port_transmit()

signed long int sternum_port_transmit ( const void *  data,
size_t  count 
)

Sternum's port to write to the communication channel.

Parameters
dataThe data to be transmitted.
countThe size of the data to be transmitted.
Note
It is expected from this function to send all of the data in a single call.
If it's necessary to divide data into smaller chunks for reliable transmission, it should be implemented internally in this port.
If the returned value of sent bytes is different than count, then the transmission will be considered as a failure.
Returns
The amount of bytes sent on success and -1 on failure.