Broadcom LBS API to OS. More...
#include "gllbs_types.h"
Classes | |
struct | GlLbsOsCallbacks |
Structure for OS HAL callbacks. More... | |
Typedefs | |
typedef enum GLLBS_OS_LOG_SEVERITY | GLLBS_OS_LOG_SEVERITY |
Generic HAL types. | |
typedef enum GLLBS_MODULE_MASK | GLLBS_MODULE_MASK |
Module mask will enable debug information for specified module. | |
typedef void(* | GlLbsOsLogVCb )(GLLBS_OS_LOG_SEVERITY sev, OSUINT32 mod_mask, const char *fmt, OSVALIST argptr) |
Log message. | |
typedef void(* | GlLbsOsExceptionAssertCb )(const char *msg) |
Exception Assert. | |
typedef enum GLLBS_CONN_TYPE | GLLBS_CONN_TYPE |
Connection type. | |
typedef void(* | GlLbsOsConnectionRequestCb )(GLLBS_CONN_TYPE type, LBS_CONN_ID conn_id) |
Request connection. | |
typedef void(* | GlLbsOsConnectionWriteCb )(OSCONN_HANDLE handle, const OSOCTET *data, OSUINT32 size) |
Send data buffer. | |
typedef void(* | GlLbsOsConnectionCloseCb )(OSCONN_HANDLE handle) |
Close connection. | |
typedef enum GLLBS_FILE_ID | GLLBS_FILE_ID |
Non-volatile storage. | |
typedef OSBOOL(* | GlLbsOsNvsFileOpenCb )(GLLBS_FILE_ID file_id, OSUINT32 index, OSUINT8 open_mod) |
Open NV File and set current position to the beginning. | |
typedef void(* | GlLbsOsNvsFileCloseCb )(GLLBS_FILE_ID file_id, OSUINT32 index) |
Close NV File. | |
typedef OSUINT32(* | GlLbsOsNvsFileReadCb )(GLLBS_FILE_ID file_id, OSUINT32 index, OSOCTET *buf, OSUINT32 max_size) |
NV File read from current position and move the current position. | |
typedef OSUINT32(* | GlLbsOsNvsFileWriteCb )(GLLBS_FILE_ID file_id, OSUINT32 index, const OSOCTET *buf, OSUINT32 size) |
NV File write to current position and move the current position. | |
typedef OSINT32(* | GlLbsOsNvsFileSeekCb )(GLLBS_FILE_ID file_id, OSUINT32 index, OSINT32 offset, GLLBS_SEEK_WHENCE whence) |
NV File move current position to new position specified by offset and whence. | |
typedef OSUINT32(* | GlLbsOsGetMsTimeCb )(void) |
Get Time. | |
typedef void *(* | GlLbsOsMemAllocCb )(OSUINT32 size) |
Allocate memory. | |
typedef void(* | GlLbsOsMemDeAllocCb )(void *ptr) |
Deallocate memory which was previously allocated by GlLbsOsMemAllocCb. | |
typedef OSTIMER_HANDLE(* | GlLbsOsTimerCreateCb )(void) |
Create Timer. | |
typedef void(* | GlLbsOsTimerDestroyCb )(OSTIMER_HANDLE handle) |
Destroy Timer. | |
typedef OSBOOL(* | GlLbsOsTimerArmCb )(OSTIMER_HANDLE handle, OSUINT32 ms) |
Arm Timer. | |
typedef OSBOOL(* | GlLbsOsTimerDisarmCb )(OSTIMER_HANDLE handle) |
Disarm Timer. | |
typedef void(* | GlLbsOsHttpRequestCb )(const unsigned char *url, OSUINT32 maxSize, const OSOCTET *data, OSUINT32 size, GlLbsOsHttpResponseCb cb) |
Issue HTTP request. | |
typedef struct GlLbsOsCallbacks | GlLbsOsCallbacks |
Structure for OS HAL callbacks. | |
Enumerations | |
enum | GLLBS_OS_LOG_SEVERITY { GLLBS_LOG_ERR, GLLBS_LOG_WARNING, GLLBS_LOG_INFO, GLLBS_LOG_DEBUG } |
Generic HAL types. More... | |
enum | GLLBS_MODULE_MASK |
Module mask will enable debug information for specified module. | |
enum | GLLBS_CONN_TYPE { GLLBS_CONN_LBS } |
Connection type. More... | |
enum | GLLBS_FILE_ID { , GLLBS_FILE_LBS, GLLBS_FILE_NVS, GLLBS_FILE_NMR, GLLBS_FILE_WLAN, GLLBS_FILE_WNMR, GLLBS_FILE_IPS, GLLBS_FILE_COUNT } |
Non-volatile storage. More... | |
Functions | |
void | GlLbsOsConnected (LBS_CONN_ID conn_id, GLLBS_ERRORS result, OSCONN_HANDLE handle) |
Connection handling. | |
void | GlLbsOsDisconnected (LBS_CONN_ID conn_id) |
Inform the LBS library after connection lost. | |
void | GlLbsOsData (LBS_CONN_ID conn_id, OSOCTET *data, OSUINT32 size) |
Provide data received from connection to the LBS library. | |
void | GlLbsOsTimeout (OSTIMER_HANDLE handle) |
Timer. |
Broadcom LBS API to OS.
Copyright (c) 2009 by Broadcom Corp. All Rights Reserved.
The information contained herein is confidential property of Broadcom. The use, copying, transfer or disclosure of such information is prohibited except by express written agreement with Broadcom.
typedef enum GLLBS_OS_LOG_SEVERITY GLLBS_OS_LOG_SEVERITY |
Generic HAL types.
Logging HAL Log severity
typedef void(* GlLbsOsConnectionCloseCb)(OSCONN_HANDLE handle) |
Close connection.
handle | - value provided in GlLbsOsConnected as "handle" This value can be used by HAL identify connection |
typedef void(* GlLbsOsConnectionRequestCb)(GLLBS_CONN_TYPE type, LBS_CONN_ID conn_id) |
Request connection.
type | - Connection type |
conn_id | - This value used by the LBS library to identify connection request |
typedef void(* GlLbsOsConnectionWriteCb)(OSCONN_HANDLE handle, const OSOCTET *data, OSUINT32 size) |
Send data buffer.
handle | - value provided in GlLbsOsConnected as "handle" This value can be used by HAL identify connection |
data | - address of buffer to send |
size | - length of the buffer |
typedef void(* GlLbsOsExceptionAssertCb)(const char *msg) |
Exception Assert.
file | - file name like __FILE__ |
line | - line number like __LINE__ |
msg | - message. |
typedef OSUINT32(* GlLbsOsGetMsTimeCb)(void) |
Get Time.
typedef void(* GlLbsOsHttpRequestCb)(const unsigned char *url, OSUINT32 maxSize, const OSOCTET *data, OSUINT32 size, GlLbsOsHttpResponseCb cb) |
Issue HTTP request.
url | - request URL |
data | - address of buffer to send |
size | - length of the buffer |
typedef void(* GlLbsOsLogVCb)(GLLBS_OS_LOG_SEVERITY sev, OSUINT32 mod_mask, const char *fmt, OSVALIST argptr) |
Log message.
sev | - Log level. |
mod_mask | - specifies module(s) from GLLBS_MODULE_MASK |
fmt | - format and message (printf format) |
argptr | - format argument list (vprintf format) |
typedef void*(* GlLbsOsMemAllocCb)(OSUINT32 size) |
Allocate memory.
size | - size of the requested memory to allocate. |
typedef void(* GlLbsOsMemDeAllocCb)(void *ptr) |
Deallocate memory which was previously allocated by GlLbsOsMemAllocCb.
ptr | - pointer to the memory which should be deallocated. |
typedef void(* GlLbsOsNvsFileCloseCb)(GLLBS_FILE_ID file_id, OSUINT32 index) |
Close NV File.
file_id | - file type |
typedef OSBOOL(* GlLbsOsNvsFileOpenCb)(GLLBS_FILE_ID file_id, OSUINT32 index, OSUINT8 open_mod) |
Open NV File and set current position to the beginning.
file_id | - file type |
open_mod | - open mode (see GLLBS_FILE_MODE) |
typedef OSUINT32(* GlLbsOsNvsFileReadCb)(GLLBS_FILE_ID file_id, OSUINT32 index, OSOCTET *buf, OSUINT32 max_size) |
NV File read from current position and move the current position.
file_id | - file type |
buf | - address of buffer to fill. |
size | - maximal size of the buffer. |
typedef OSINT32(* GlLbsOsNvsFileSeekCb)(GLLBS_FILE_ID file_id, OSUINT32 index, OSINT32 offset, GLLBS_SEEK_WHENCE whence) |
NV File move current position to new position specified by offset and whence.
file_id | - file type |
index | - file index for this file type |
offset | - offset into file related to whence definition |
whence | - SEEK_CUR, SEEK_SET, SEEK_END |
typedef OSUINT32(* GlLbsOsNvsFileWriteCb)(GLLBS_FILE_ID file_id, OSUINT32 index, const OSOCTET *buf, OSUINT32 size) |
NV File write to current position and move the current position.
file_id | - file type |
buf | - address of buffer to save. |
size | - length of the buffer. |
typedef OSBOOL(* GlLbsOsTimerArmCb)(OSTIMER_HANDLE handle, OSUINT32 ms) |
Arm Timer.
handle | - value returned by GlLbsOsTimerCreateCb as "handle" |
ms | - interval in milliseconds |
typedef OSTIMER_HANDLE(* GlLbsOsTimerCreateCb)(void) |
Create Timer.
typedef void(* GlLbsOsTimerDestroyCb)(OSTIMER_HANDLE handle) |
Destroy Timer.
handle | - value returned by GlLbsOsTimerCreateCb as "handle" This value can be used by HAL to identify timer |
typedef OSBOOL(* GlLbsOsTimerDisarmCb)(OSTIMER_HANDLE handle) |
Disarm Timer.
handle | - value returned by GlLbsOsTimerCreateCb as "handle" |
enum GLLBS_CONN_TYPE |
enum GLLBS_FILE_ID |
Non-volatile storage.
void GlLbsOsConnected | ( | LBS_CONN_ID | conn_id, |
GLLBS_ERRORS | result, | ||
OSCONN_HANDLE | handle | ||
) |
Connection handling.
Report status of connection request initiated by GlLbsOsConnectionRequestCb
conn_id | - value provided by GlLbsOsConnectionRequestCb as "conn_id" argument This value used by the LBS library to identify connection request |
result | - error code |
handle | - This value will be provided by the LBS library as "handle" parameter in GlLbsOsConnectionWriteCb and GlLbsOsConnectionCloseCb functions |
void GlLbsOsData | ( | LBS_CONN_ID | conn_id, |
OSOCTET * | data, | ||
OSUINT32 | size | ||
) |
Provide data received from connection to the LBS library.
conn_id | - value provided by GlLbsOsConnectionRequestCb as "conn_id" argument This value used by the LBS library to identify connection request |
data | - address of buffer |
size | - length of the buffer |
void GlLbsOsDisconnected | ( | LBS_CONN_ID | conn_id | ) |
Inform the LBS library after connection lost.
conn_id | - value provided by GlLbsOsConnectionRequestCb as "conn_id" argument This value used by the LBS library to identify connection request |
void GlLbsOsTimeout | ( | OSTIMER_HANDLE | handle | ) |
Timer.
Inform the LBS library when timeout occurred
handle | - value provided by GlLbsOsTimerArmCb as "handle" argument |