Functions
uartinterface.h File Reference

This file contains the linux-uart interface prototypes. More...

#include "toposens/sensor_lib.h"
Include dependency graph for uartinterface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int DeinitUARTPort ()
 Called from the can-library, this function will close the socket and take care of ReceiverThread termination. More...
 
void RegisterUARTReadCallback (void(*Callback)(uint8_t *UARTMsg_pu8, uint16_t UARTMsgSize_u16, uint8_t InterfaceId_u8))
 This function is called by the library to set a callback function for incoming can-traffic. More...
 
int SetupUARTPort (char *InterfaceName_cp, uint32_t InterfaceBitrate_u32, uint8_t InterfaceId_u8)
 Called from the library, this function will take care of all linux-related uart-setup, socket configuration and starting of the receiver thread. More...
 
int WriteUARTPayload (uint8_t *Payload_pu8, uint8_t Length_u8, uint8_t InterfaceId_u8)
 Called to send messages to can socket. More...
 

Detailed Description

This file contains the linux-uart interface prototypes.


Definition in file uartinterface.h.

Function Documentation

◆ DeinitUARTPort()

int DeinitUARTPort ( )

Called from the can-library, this function will close the socket and take care of ReceiverThread termination.


Returns
int 0 if deinit was successful int 1 in case of an error

Definition at line 204 of file uartinterface.c.

◆ RegisterUARTReadCallback()

void RegisterUARTReadCallback ( void(*)(uint8_t *UARTMsg_pu8, uint16_t UARTMsgSize_u16, uint8_t InterfaceId_u8)  Callback)

This function is called by the library to set a callback function for incoming can-traffic.


Parameters
[in](*Callback)Function Pointer to function that shall be called-back if a can-frame was revived

Definition at line 126 of file uartinterface.c.

◆ SetupUARTPort()

int SetupUARTPort ( char *  InterfaceName_cp,
uint32_t  InterfaceBitrate_u32,
uint8_t  InterfaceId_u8 
)

Called from the library, this function will take care of all linux-related uart-setup, socket configuration and starting of the receiver thread.


Parameters
[in]*InterfaceName_cpinterface-name that shall be configured
[in]InterfaceBitrate_u32Bitrate the interface should be working with
[in]InterfaceId_u8
Returns
int 0 if setup was successful int 1 in case of an error

Definition at line 189 of file uartinterface.c.

◆ WriteUARTPayload()

int WriteUARTPayload ( uint8_t *  Payload_pu8,
uint8_t  Length_u8,
uint8_t  InterfaceId_u8 
)

Called to send messages to can socket.


Parameters
[in]*Payload_pu8pointer to payload that should be send
[in]Length_u8
[in]InterfaceId_u8
Returns
int 0 if the writing was successful int 1 in case of an error

Definition at line 140 of file uartinterface.c.



toposens_echo_driver
Author(s): Tobias Roth , Dennis Maier , Baris Yazici
autogenerated on Wed Mar 2 2022 01:12:32