Logicrom Library APIs¶
Header File¶
Source: include/lib.h
#include <lib.h>
Functions¶
-
void logicrom_init(const char *stdio, urc_callback_f handler)¶
Initialize Logicrom SDK library
- Parameters
stdio – [in] STDIO port (e.g. /dev/ttyUSB0), can be NULL if STDIO is not required
handler – [in] Function pointer for handling unsolicited responses urc_callback_f
-
const char *system_getserial(void)¶
Get device serial number
- Returns
Serial number of device. Buffer is statically allocated, do not free
-
const char *get_logicrom_version(void)¶
Get SDK library version
- Returns
Library version string.
-
void system_settz(const char *tz)¶
Set system time-zone in +/-HH:MM format (e.g. +5:30)
- Parameters
tz – [in] Timezone value
-
void system_gettz(char *tz, int size)¶
Get current time-zone
- Parameters
tz – [out] Buffer to store timezone
size – [in] Size of buffer
-
int debug(int level, const char *fmt, ...)¶
Debug printf with debug level.
Can be used to print messages at specific loglevel
e.g.
debug(DBG_INFO, "Hello\n");
Message will print if loglevel is set to 1
- Parameters
level – [in] Debug level
fmt – [in] String format
- Returns
Number of bytes printed
-
int formatfs(const char *path)¶
Format Filesystem
- Parameters
path – [in] Mount point of filesystem
- Returns
0 on success, -ve for error
Type Definitions¶
Enumerations¶
-
enum [anonymous]¶
Library URC events
Values:
-
enumerator URC_FILE_DOWNLOAD_STATUS¶
File download status event
See also
-
enumerator URC_FOTA_STARTED¶
FOTA start event
-
enumerator URC_FOTA_FINISHED¶
FOTA file download finished
-
enumerator URC_FOTA_FAILED¶
FOTA failed
-
enumerator URC_DEV_REBOOT_REQUEST¶
System reboot requested (generated if reboot command is executed)
-
enumerator URC_FILE_DOWNLOAD_STATUS¶
