Logo
Link Labs LTE Interface Library
External host library for using Link Labs LTE modules.
top
Data Structures | Functions
lte_ifc_hal

Detailed Description

Data Structures

struct  lte_ifc_time
 

Functions

int32_t lte_ifc_hal_get_irq_flags_gpio (bool *p_level)
 Get IRQ Flags GPIO state. More...
 
int32_t lte_ifc_hal_get_wake_status (bool *p_wake)
 Get wake status. More...
 
int32_t lte_ifc_hal_gettime (struct lte_ifc_time *tp)
 Get the current time. This time need not be a UTC or localtime. It is used only for checking timeouts, and only relative to repeated calls of this function. Thus, an uptime counter is usually sufficient to implement this function on systems which do not have access to UTC or localtime. More...
 
int32_t lte_ifc_hal_read_byte (uint8_t *buff)
 Read the next byte (if available) from the Link Labs module. This is expected to be a non-blocking function. If a new byte is available, it should be stored in *buff and the return argument set to zero. If there is no byte available, the function should return immediately with a return argument of any negative number. More...
 
int32_t lte_ifc_hal_set_wake_request (bool wake)
 Set wake request. More...
 
int32_t lte_ifc_hal_write (uint8_t *buff, uint16_t len)
 Write data to the Link Labs module. This function can either be a blocking call (does not return until all bytes are transmitted) or a non-blocking call (returns immediately after queuing bytes). Note that in the non-blocking case the bytes in *buff must be copied out, as they are not held constant after the function returns. More...
 

Function Documentation

◆ lte_ifc_hal_get_irq_flags_gpio()

int32_t lte_ifc_hal_get_irq_flags_gpio ( bool *  p_level)

Get IRQ Flags GPIO state.

Parameters
[out]p_levelSet true if line is high, false otherwise.
Returns
0 - success, negative otherwise.

◆ lte_ifc_hal_get_wake_status()

int32_t lte_ifc_hal_get_wake_status ( bool *  p_wake)

Get wake status.

Parameters
[out]p_wakeSet true if module is awake, false otherwise.
Returns
0 - success, negative otherwise.

◆ lte_ifc_hal_gettime()

int32_t lte_ifc_hal_gettime ( struct lte_ifc_time tp)

Get the current time. This time need not be a UTC or localtime. It is used only for checking timeouts, and only relative to repeated calls of this function. Thus, an uptime counter is usually sufficient to implement this function on systems which do not have access to UTC or localtime.

Parameters
[out]tpThis address will be updated with the current value of the time fields.
Returns
0 - success, negative otherwise.

◆ lte_ifc_hal_read_byte()

int32_t lte_ifc_hal_read_byte ( uint8_t *  buff)

Read the next byte (if available) from the Link Labs module. This is expected to be a non-blocking function. If a new byte is available, it should be stored in *buff and the return argument set to zero. If there is no byte available, the function should return immediately with a return argument of any negative number.

Parameters
[out]buffThe byte read (if available).
Returns
0 - success, negative otherwise.

◆ lte_ifc_hal_set_wake_request()

int32_t lte_ifc_hal_set_wake_request ( bool  wake)

Set wake request.

Parameters
[in]wakeTrue if request module to wake, false to allow module to sleep.
Returns
0 - success, negative otherwise.

◆ lte_ifc_hal_write()

int32_t lte_ifc_hal_write ( uint8_t *  buff,
uint16_t  len 
)

Write data to the Link Labs module. This function can either be a blocking call (does not return until all bytes are transmitted) or a non-blocking call (returns immediately after queuing bytes). Note that in the non-blocking case the bytes in *buff must be copied out, as they are not held constant after the function returns.

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.