Logo
Link Labs Interface Library
External host library for using Link Lab's modules.
top
Functions

Detailed Description

The hardware abstraction layer (HAL) for ll_ifc.

All functions in the HAL are used by the Link Lab's Interface library (ll_ifc). These functions must be defined by the program using the Link Lab's Interface Library.

Functions

int32_t gettime (struct time *tp)
 Get the current time. More...
 
int32_t sleep_ms (int32_t millis)
 Sleep for a number of milliseconds. More...
 
int32_t transport_read (uint8_t *buff, uint16_t len)
 Read data from the Link Lab's module. More...
 
int32_t transport_write (uint8_t *buff, uint16_t len)
 Write data to the Link Lab's module. More...
 

Function Documentation

int32_t gettime ( struct time tp)

Get the current time.

Parameters
[out]tpCurrent value of the clock.
Returns
0 - success, negative otherwise.
int32_t sleep_ms ( int32_t  millis)

Sleep for a number of milliseconds.

Parameters
[in]millisnumber of milliseconds.
Returns
0 - success, negative otherwise.
int32_t transport_read ( uint8_t *  buff,
uint16_t  len 
)

Read data from the Link Lab's module.

Parameters
[in,out]buffThe buffer that will be modified with the data read from the module. The size of buff must be at least len bytes.
[in]lenThe number of bytes to read.
Returns
0 - success, negative otherwise.

This function is usually a simple UART wrapper.

int32_t transport_write ( uint8_t *  buff,
uint16_t  len 
)

Write data to the Link Lab's module.

Parameters
[in]buffThe buffer containing the data to write to the module. The size of buff must be at least len bytes.
[in]lenThe number of bytes to write.
Returns
0 - success, negative otherwise.

This function is usually a simple UART wrapper.