diff --git a/LE910Cx_L/80000NT11840A_AppZone_m2mb_Sample_Apps_r1.pdf b/LE910Cx_L/80000NT11840A_AppZone_m2mb_Sample_Apps_r1.pdf index d763956c..518d371e 100644 Binary files a/LE910Cx_L/80000NT11840A_AppZone_m2mb_Sample_Apps_r1.pdf and b/LE910Cx_L/80000NT11840A_AppZone_m2mb_Sample_Apps_r1.pdf differ diff --git a/LE910Cx_L/AZX_Docs/html/annotated.html b/LE910Cx_L/AZX_Docs/html/annotated.html index 5f995c6a..5f396c0c 100644 --- a/LE910Cx_L/AZX_Docs/html/annotated.html +++ b/LE910Cx_L/AZX_Docs/html/annotated.html @@ -34,7 +34,7 @@
CAZX_CJSON_TAG | A structure to allow you walk through array/object json chains |
CAZX_EASY_AT_ATCOMMAND_TAG | Single custom command utility struct |
CAZX_EASY_AT_HANDLES_TAG | |
CAZX_EASY_AT_MODULE_TAG | |
CAZX_EEPROM_T | EEPROM handle structure This structure holds the parameters of the EEPROM handle, used by all communication functions |
CAZX_FTP_BUFFER | Generic buffer information structure |
CAZX_FTP_BUFFER_TAG | |
CAZX_FTP_CALLBACK_OPTIONS_TAG | |
CAZX_FTP_FILE_INFO | Generic file information structure |
CAZX_FTP_FILE_INFO_TAG | |
CAZX_FTP_NET_BUF_TAG | Ftp Client parameters structure |
CAZX_FTP_OPTIONS_TAG | FTP initialization options structure |
CAZX_FTP_XFER_TAG | Generic transfer information structure |
CAZX_HTTP_HEADER | HTTP header structure |
CAZX_HTTP_INFO | The HTTP operation structure |
CAZX_HTTP_OPTIONS | |
CAZX_HTTP_SSL | HTTP SSL structure |
CAZX_HTTP_URL | HTTP URL structure |
Cazx_httpCallbackOptions | The HTTP callback options structure |
CAZX_HTTPS_OPTIONS | The HTTP configuration options |
CAZX_LFS_CONTEXT | |
CAZX_LFS_INFO_FILE | |
CAZX_LFS_STATUS_UTILS | |
CAZX_LOG_CFG_T | Logging configuration structure |
CAZX_RAM_DISK_S | |
CAZX_SPI_FLASH_DESCRIPTOR | |
CAZX_SPI_FLASH_ECCLAYOUT | |
CAZX_SPI_FLASH_EVENT_CALLBACK | |
CAZX_SPI_FLASH_JSC_EVENT_RES_T | |
CAZX_SPI_FLASH_MICRO_SPI_PARAMS | |
CAZX_SPI_FLASH_MTD_OOB_OPS | |
CAZX_SPI_FLASH_OOBFREE | |
CAZX_SPI_FLASH_SPI_CHIP | |
CAZX_SPI_FLASH_SPI_SLAVE | |
CAZX_TASKS_MESSAGE_T | Structure holding the task message data |
Cdcs_struct | |
CEASY_AT_HANDLES_TAG | Structure containing atpHandle and atpI info for a specific command |
CEASY_AT_MODULE_TAG | The module structure retrieved by azx_easy_at_init() |
CFtpCallbackOptions | Structure that holds status callback function parameters |
Cpdu_struct | |
Csockaddr_storage | |
Ctimezone | |
Caddrinfo | |
CAZX_CJSON_TAG | A structure to allow you walk through array/object json chains |
CAZX_EASY_AT_ATCOMMAND_TAG | Single custom command utility struct |
CAZX_EASY_AT_HANDLES_TAG | |
CAZX_EASY_AT_MODULE_TAG | |
CAZX_EEPROM_T | EEPROM handle structure This structure holds the parameters of the EEPROM handle, used by all communication functions |
CAZX_FTP_BUFFER | Generic buffer information structure |
CAZX_FTP_BUFFER_TAG | |
CAZX_FTP_CALLBACK_OPTIONS_TAG | |
CAZX_FTP_FILE_INFO | Generic file information structure |
CAZX_FTP_FILE_INFO_TAG | |
CAZX_FTP_NET_BUF_TAG | Ftp Client parameters structure |
CAZX_FTP_OPTIONS_TAG | FTP initialization options structure |
CAZX_FTP_XFER_TAG | Generic transfer information structure |
CAZX_HTTP_HEADER | HTTP header structure |
CAZX_HTTP_INFO | The HTTP operation structure |
CAZX_HTTP_OPTIONS | |
CAZX_HTTP_SSL | HTTP SSL structure |
CAZX_HTTP_URL | HTTP URL structure |
Cazx_httpCallbackOptions | The HTTP callback options structure |
CAZX_HTTPS_OPTIONS | The HTTP configuration options |
CAZX_LFS_CONTEXT | |
CAZX_LFS_INFO_FILE | |
CAZX_LFS_STATUS_UTILS | |
CAZX_LOG_CFG_T | Logging configuration structure |
CAZX_RAM_DISK_S | |
CAZX_SPI_FLASH_DESCRIPTOR | |
CAZX_SPI_FLASH_ECCLAYOUT | |
CAZX_SPI_FLASH_EVENT_CALLBACK | |
CAZX_SPI_FLASH_JSC_EVENT_RES_T | |
CAZX_SPI_FLASH_MICRO_SPI_PARAMS | |
CAZX_SPI_FLASH_MTD_OOB_OPS | |
CAZX_SPI_FLASH_OOBFREE | |
CAZX_SPI_FLASH_SPI_CHIP | |
CAZX_SPI_FLASH_SPI_SLAVE | |
CAZX_TASKS_MESSAGE_T | Structure holding the task message data |
Cdcs_struct | |
CEASY_AT_HANDLES_TAG | Structure containing atpHandle and atpI info for a specific command |
CEASY_AT_MODULE_TAG | The module structure retrieved by azx_easy_at_init() |
CFtpCallbackOptions | Structure that holds status callback function parameters |
Cpdu_struct | |
Csockaddr_storage | |
Ctimezone |
Base64 utilities.
-Porting of base64 de/encoder from https://sources.debian.org/src/fetchmail/6.4.16-1/base64.c refer to COPYING-base64 file in this folder for attributions
diff --git a/LE910Cx_L/AZX_Docs/html/azx__base64_8h_source.html b/LE910Cx_L/AZX_Docs/html/azx__base64_8h_source.html index e6761293..85e78166 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__base64_8h_source.html +++ b/LE910Cx_L/AZX_Docs/html/azx__base64_8h_source.html @@ -34,7 +34,7 @@Supports any memory address (refer to AZX_EEPROM_24XX256T_SLAVE_ADDR macro)
Supported read modes: 1) Current address read byte 2) Random read (byte or stream) 3) Sequential read (byte or stream)
Refer to https://ww1.microchip.com/downloads/en/DeviceDoc/24AA256-24LC256-24FC256-Data-Sheet-20001203W.pdf for further details
-@@ -297,7 +297,7 @@ |
FTP Library routines.
-gnu definition More...
- +#include <stdarg.h>
#include "m2mb_fs_stdio.h"
Go to the source code of this file.
Macros | |
-#define | stdout (void*)(0x88888888) |
-#define | stderr (void*)(0x99999999) |
#define | fopen m2mb_fs_fopen |
#define | FILE M2MB_FILE_T |
-#define | m2m_fputc m2mb_fs_fputc |
-#define | m2m_fgetc m2mb_fs_fgetc |
+#define | clearerr azx_gnu_clearerr |
+#define | stdout (FILE*)(0x88888888) |
+#define | stderr (FILE*)(0x99999999) |
+#define | stdin (FILE*)(NULL) |
+#define | fputc m2mb_fs_fputc |
+#define | fgetc m2mb_fs_fgetc |
#define | fseek m2mb_fs_fseek |
+#define | fseeko m2mb_fs_fseek |
#define | rewind(a) (void)fseek(a, 0L, SEEK_SET) |
+#define | ftell m2mb_fs_ftell |
+#define | ftello m2mb_fs_ftell |
+#define | fdopen azx_gnu_fdopen |
#define | fprintf azx_gnu_fprintf |
+#define | vfprintf azx_gnu_vfprintf |
#define | truncate azx_gnu_truncate |
+#define | feof azx_gnu_feof |
+#define | printf(a...) fprintf(stdout, a) |
+#define | vprintf(f, a) vfprintf(stdout, f, a) |
+#define | ungetc azx_gnu_ungetc |
+#define | ferror azx_gnu_ferror |
Functions | |
int | azx_gnu_fprintf (void *f, const char *format,...) |
Prints a autput. More... | |
Prints data in a file stream. More... | |
int | azx_gnu_vfprintf (void *f, const char *format, va_list ap) |
Prints data in a file stream. Requires a variadic list. More... | |
int | azx_gnu_truncate (const char *path, off_t length) |
Truncate file. More... | |
+int | azx_gnu_ungetc (void *f, int c) |
+int | azx_gnu_ferror (void *f) |
+int | azx_gnu_feof (void *f) |
+FILE * | azx_gnu_fdopen (int, const char *) |
+void | azx_gnu_clearerr (FILE *) |
gnu definition
@@ -177,7 +243,9 @@Prints a autput.
-Prints on the defined stream (UART or USB channel)
+Prints data in a file stream.
+Prints on the defined stream (If stderr or stdout are passed, will print on defined UART or USB channel )
[in] | f | void* pointer |
int azx_gnu_vfprintf | +( | +void * | +f, | +
+ | + | const char * | +format, | +
+ | + | va_list | +ap | +
+ | ) | ++ |
Prints data in a file stream. Requires a variadic list.
+Prints on the defined stream (If stderr or stdout are passed, will print on defined UART or USB channel )
+[in] | f | void* pointer |
[in] | format | const char* pointer |
[in] | ap | variadic list retrieved with va_list() |
Example
Functions | |
void * | azx_gnu_realloc (void *ptr, size_t size) |
Dynamic memory reallocation. More... | |
void | azx_gnu_exit (int status) |
exit process. remaps stdlib exit() More... | |
gnu definition
@@ -210,6 +216,33 @@void azx_gnu_exit | +( | +int | +status | ) | ++ |
exit process. remaps stdlib exit()
+quits the application
+[in] |
Macros | |
#define | s6_addr addr8_s |
+#define | fd_set M2MB_SOCKET_BSD_FD_SET_T |
#define | socket m2mb_socket_bsd_socket |
@@ -205,6 +210,18 @@ | |
#define | select azx_gnu_select |
+#define | fd_set M2MB_SOCKET_BSD_FD_SET_T |
+#define | fds_bits fd_array |
+#define | getaddrinfo azx_gnu_getaddrinfo |
+#define | freeaddrinfo azx_gnu_freeaddrinfo |
#define | _SS_MAXSIZE 128 /* Implementation specific max size */ |
@@ -244,6 +261,9 @@ | |
#define | IPPROTO_UDP M2MB_SOCKET_BSD_IPPROTO_UDP |
+#define | AF_UNSPEC M2MB_SOCKET_BSD_AF_UNSPEC |
#define | SOCK_STREAM M2MB_SOCKET_BSD_SOCK_STREAM |
#define | AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ |
+#define | EAI_FAIL 4 /* non-recoverable failure in name resolution */ |
+#define | EAI_MEMORY 6 /* memory allocation failure */ |
+#define | EAI_NODATA 7 /* no address associated with host */ |
+#define | EAI_NONAME 8 /* host nor service provided, or not known */ |
+#define | EAI_SYSTEM 11 /* system error returned in errno */ |
#define | INET_ADDRSTRLEN 16 |
@@ -290,6 +325,9 @@ | |
#define | IF_NAMESIZE 16 |
+#define | INET6_ADDRSTRLEN 46 |
#define | hstrerror azx_gnu_hstrerror |
const char * | azx_gnu_hstrerror (int err) |
Return information after a host name or address lookup error. More... | |
int | azx_gnu_getaddrinfo (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) |
+void | azx_gnu_freeaddrinfo (struct addrinfo *ai) |
Variables |
int azx_gnu_getaddrinfo | +( | +const char * | +node, | +
+ | + | const char * | +service, | +
+ | + | const struct addrinfo * | +hints, | +
+ | + | struct addrinfo ** | +res | +
+ | ) | ++ |
<– From netdb.h
+ +![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.1.19-CxL
+
+ A set of companion utilities that make AZ development easier
+ |
+
gnu definition +More...
+#include "m2mb_fs_posix.h"
Go to the source code of this file.
++Macros | |
+#define | stat m2mb_fs_stat |
+#define | fstat m2mb_fs_fstat |
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.1.19-CxL
+
+ A set of companion utilities that make AZ development easier
+ |
+
Go to the source code of this file.
Typedefs | |||||||||||||||||||||||||||||||
diff --git a/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h.js b/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h.js index 525bdbc3..6466ddc1 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h.js +++ b/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h.js @@ -5,8 +5,6 @@ var azx__gnu__sys__types_8h = [ "__u_long_defined", "azx__gnu__sys__types_8h.html#aa533eb809f1d84d5be96986d09c3d82c", null ], [ "__u_short_defined", "azx__gnu__sys__types_8h.html#acc6532a77aea8a0cc93a3595abcbe2b2", null ], [ "_BSDTYPES_DEFINED", "azx__gnu__sys__types_8h.html#a1a4e27cc21ecdbd9a738a8e9e340e4fd", null ], - [ "fd_set", "azx__gnu__sys__types_8h.html#a7acea921b59df1dc48b89b21ecfa446b", null ], - [ "fds_bits", "azx__gnu__sys__types_8h.html#adc54b31687655b483505806432677ba5", null ], [ "u_char", "azx__gnu__sys__types_8h.html#ae2b02ed168fc99cff3851603910b1fb6", null ], [ "u_int", "azx__gnu__sys__types_8h.html#ac319c165d52643e43249fe003e18bdf3", null ], [ "u_long", "azx__gnu__sys__types_8h.html#a8f25a50daf29ce2cee1ec038a4d744ea", null ], diff --git a/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h_source.html b/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h_source.html index 20cb79b2..049af63c 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h_source.html +++ b/LE910Cx_L/AZX_Docs/html/azx__gnu__sys__types_8h_source.html @@ -34,7 +34,7 @@ | ![]() |
AZX (AppZone eXtensions) documentation
- 1.1.15-CxL
+ 1.1.19-CxL
A set of companion utilities that make AZ development easier
|
@@ -95,7 +95,7 @@
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.1.19-CxL
+
+ A set of companion utilities that make AZ development easier
+ |
+
gnu definition +More...
+ +Go to the source code of this file.
++Macros | |
+#define | time(a) azx_gnu_time(a) |
+Functions | |
time_t | azx_gnu_time (time_t *_timer) |
Returns a timestamp from unix epoch. More... | |
gnu definition
+ +Porting from gnu to azx
+time_t azx_gnu_time | +( | +time_t * | +_timer | ) | ++ |
Returns a timestamp from unix epoch.
+[in] | timer | time_t pointer |
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.1.19-CxL
+
+ A set of companion utilities that make AZ development easier
+ |
+
gnu definition More...
#include <unistd.h>
#include <sys/types.h>
#include "m2mb_types.h"
#include "m2mb_os_api.h"
#include "m2mb_fs_posix.h"
Functions | |
int | azx_gnu_chown (const char *__path, uid_t __owner, gid_t __group) |
chown More... | |
+unsigned | azx_gnu_sleep (unsigned int seconds) |
gnu definition
diff --git a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h.js b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h.js index 3b767dc2..fd8dbb47 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h.js +++ b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h.js @@ -4,7 +4,9 @@ var azx__gnu__unistd_8h = [ "close", "azx__gnu__unistd_8h.html#a9c7f6d5331abb2692a876d5ee67474b7", null ], [ "lseek", "azx__gnu__unistd_8h.html#a160e48b6f44d4559f0859360a340cf23", null ], [ "read", "azx__gnu__unistd_8h.html#a68dc4fd7189d34e2052e25ada13f89e0", null ], + [ "sleep", "azx__gnu__unistd_8h.html#acc8612feeec5f569b1e096e3110d0dca", null ], [ "unlink", "azx__gnu__unistd_8h.html#a1865e3e4dbf6644059d3e46946f7763e", null ], [ "write", "azx__gnu__unistd_8h.html#ac40a1eaac5f8dbc1eef9b944d494770c", null ], - [ "azx_gnu_chown", "azx__gnu__unistd_8h.html#a0df411b3596f1d5f25031fce69c5f696", null ] + [ "azx_gnu_chown", "azx__gnu__unistd_8h.html#a0df411b3596f1d5f25031fce69c5f696", null ], + [ "azx_gnu_sleep", "azx__gnu__unistd_8h.html#a987f57aa1eaeedf6d097359e95505478", null ] ]; \ No newline at end of file diff --git a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.md5 b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.md5 index 7ff6f69b..3f54e0e7 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.md5 +++ b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.md5 @@ -1 +1 @@ -ddb13d8326f7ba27f4aa517b1facce1b \ No newline at end of file +a275c1a50fc100e4dae6265bcf54d1df \ No newline at end of file diff --git a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.png b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.png index e073ce0b..b606c2da 100644 Binary files a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.png and b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h__incl.png differ diff --git a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h_source.html b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h_source.html index 2bcd5902..c193e174 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h_source.html +++ b/LE910Cx_L/AZX_Docs/html/azx__gnu__unistd_8h_source.html @@ -34,7 +34,7 @@Macros | |
+#define | AZX_HTTP_OK 200 |
+#define | AZX_HTTP_CLIENT_CLOSED_REQUEST 499 |
Header defines | |
These defines are related to HTTP header info | AZX_HTTP_AUTH_SCHEMA |
HTTP Supported authentication methods. | |
typedef INT32(* | AZX_HTTPS_USER_CB) (void *, UINT32, INT8 *) |
User callback prototype. More... | |
typedef INT32(* | AZX_HTTPS_USER_CB) (void *, UINT32, void *) |
User callback prototype. More... | |
typedef void(* | user_base64_encode) (UINT8 *out, const UINT8 *in, int inlen) |
User base 64 encoder function prototype. More... | |
int | azx_http_post (AZX_HTTP_INFO *hi, char *url) |
Run a HTTP POST request. More... | |
int | azx_http_post_file (AZX_HTTP_INFO *hi, char *url, char *filepath) |
Run a HTTP POST request for a local file. More... | |
void | azx_http_setCB (AZX_HTTP_INFO *hi, azx_httpCallbackOptions http_cb) |
Sets user callback. More... | |
HTTPs client.
-Porting of HTTPs client from https://github.com/HISONA/https_client
Encoding functionalities for PDUs.
diff --git a/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h.js b/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h.js index 677dc658..543e4ee4 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h.js +++ b/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h.js @@ -1,5 +1,6 @@ var azx__pdu_enc_8h = [ [ "azx_pdu_convertZeroPaddedHexIntoByte", "group__pdu_enc_usage.html#ga43f49411b4f11d9b77abed8036346cca", null ], - [ "azx_pdu_encode", "group__pdu_enc_usage.html#gacb79107f730c3a648b4033429d3cc8d8", null ] + [ "azx_pdu_encode", "group__pdu_enc_usage.html#gacb79107f730c3a648b4033429d3cc8d8", null ], + [ "azx_pdu_encode_generic", "group__pdu_enc_usage.html#gaccb4e2ccee1b643e47dc243c5351883a", null ] ]; \ No newline at end of file diff --git a/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h_source.html b/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h_source.html index 8f20474b..2f606924 100644 --- a/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h_source.html +++ b/LE910Cx_L/AZX_Docs/html/azx__pdu_enc_8h_source.html @@ -34,7 +34,7 @@Enumerations | |
Task related return codes. More... | |
Task convenient task size values. More... | |
INT32 | azx_tasks_init (void) |
Initializes the parameters needed to use tasks. More... | |
INT32 | azx_tasks_initWithComplCB (azx_tasks_onTaskComplCB cb) |
Initializes the callback with all parameters needed to use tasks and monitoring the execution end. More... | |
INT32 | azx_tasks_createTask (CHAR *task_name, INT32 stack_size, INT32 priority, INT32 msg_q_size, USER_TASK_CB cb) |
Creates a new user task. More... | |
INT32 | azx_tasks_destroyTask (INT8 task_id) |
Destroys an user task. More... | |
INT32 | azx_tasks_sendMessageToTask (INT8 task_id, INT32 type, INT32 param1, INT32 param2) |
Sends a message to a task. More... | |
INT32 | azx_tasks_destroyTask (INT32 task_id) |
Destroys an user task. More... | |
INT32 | azx_tasks_sendMessageToTask (INT32 task_id, INT32 type, INT32 param1, INT32 param2) |
Sends a message to a task. More... | |
INT32 | azx_tasks_getCurrentTaskId (void) |
Retrieves the current task ID value. More... | |
CHAR * | azx_tasks_getCurrentTaskName (CHAR *name) |
Retrieves the current task name string. More... | |
INT32 | azx_tasks_getEnqueuedCount (INT8 task_id) |
INT32 | azx_tasks_getEnqueuedCount (INT32 TaskProcID) |
INT32 | azx_tasks_suspendTask (INT32 TaskProcID) |
INT32 | azx_tasks_resumeTask (INT32 TaskProcID) |
M2MB_OS_TASK_HANDLE | azx_tasks_getM2MBTaskHandleById (INT32 TaskProcID) |
Tasks related utilities.
-Functions usable to simplify the tasks creation and usage (instead of directly using m2mb_os_q.h low level APIs, which in turn allow much greater control of the tasks)
The library is modelled after the way tasks were handled in the old M2M API.
M2MB_OS_TASK_HANDLE azx_tasks_getM2MBTaskHandleById | +( | +INT32 | +TaskProcID | ) | ++ |
Returns the handle for a given task_id ()
[in] | The | ID of the task whose queue should be checked. |
INT32 azx_tasks_resumeTask | +( | +INT32 | +TaskProcID | ) | ++ |
Resumes a task (suspended with azx_tasks_suspendTask) given its ID
+[in] | The | ID of the task to be resumed. |
INT32 azx_tasks_suspendTask | +( | +INT32 | +TaskProcID | ) | ++ |
Suspends a task given its ID. It must be resumed with azx_tasks_resumeTask()
+[in] | The | ID of the task to be suspended. |
Functions usable to create a PDU message from a string text.
@@ -216,6 +219,67 @@INT32 azx_pdu_encode_generic | +( | +AZX_SMS_ADDR_NUM_TYPE_E | +type, | +
+ | + | CHAR * | +number, | +
+ | + | CHAR * | +str, | +
+ | + | UINT8 * | +pdu, | +
+ | + | INT32 | +dcs | +
+ | ) | ++ |
Encode a PDU from the input parameters, allowing to select the number address type.
+This function encodes the PDU (in binary stream format) using the encoding, number and message provided
+[in] | type | Address number type (national/international), refer to AZX_SMS_ADDR_NUM_TYPE_E enum. |
[in] | number | string containig the sender number |
[in] | str | string containing the text message |
[in] | pdu | pointer to the pdu buffer that will be filled with the encoded data |
[in] | dcs | data coding scheme, can bee GSM Standard (PDU_DCS_7), 8bits (PDU_DCS_8) or UCS2 (PDU_DCS_UCS2) |
Refer to azx_pdu_Decoder()
+Enumerations | |
Task related return codes. More... | |
Task convenient task size values. More... | |
INT32 | azx_tasks_init (void) |
Initializes the parameters needed to use tasks. More... | |
INT32 | azx_tasks_initWithComplCB (azx_tasks_onTaskComplCB cb) |
Initializes the callback with all parameters needed to use tasks and monitoring the execution end. More... | |
INT32 | azx_tasks_createTask (CHAR *task_name, INT32 stack_size, INT32 priority, INT32 msg_q_size, USER_TASK_CB cb) |
Creates a new user task. More... | |
INT32 | azx_tasks_destroyTask (INT8 task_id) |
Destroys an user task. More... | |
INT32 | azx_tasks_sendMessageToTask (INT8 task_id, INT32 type, INT32 param1, INT32 param2) |
Sends a message to a task. More... | |
INT32 | azx_tasks_destroyTask (INT32 task_id) |
Destroys an user task. More... | |
INT32 | azx_tasks_sendMessageToTask (INT32 task_id, INT32 type, INT32 param1, INT32 param2) |
Sends a message to a task. More... | |
INT32 | azx_tasks_getCurrentTaskId (void) |
Retrieves the current task ID value. More... | |
#define | AZX_TASKS_MIN_STACK_SIZE 1024 |
#define | AZX_TASKS_MAX_STACK_SIZE 32768 |
#define | AZX_TASKS_MAX_STACK_SIZE 65536 |
#define | AZX_TASKS_MIN_QUEUE_SIZE 1 |
#define | AZX_TASKS_PRIORITY_MAX 1 |
#define | AZX_TASKS_PRIORITY_MIN 32 |
#define | AZX_TASKS_PRIORITY_MIN 50 |
#define | AZX_TASKS_MAX_TASKS 32 |
#define AZX_TASKS_MAX_STACK_SIZE 32768 | +#define AZX_TASKS_MAX_STACK_SIZE 65536 |
typedef INT32(* azx_tasks_onTaskComplCB) (INT32, INT32, INT32) | +
task complete return user function
+If registered, this function is executed when a task user callback function exits, reporting the Task ID, input "type" parameter and result code.
+refer to azx_tasks_init_with_compl()
+ +Error when sending a message to task queue
Internal OS task error
+16KB of stack size
32K of stack size. Consider this as a max limit
+32KB of stack size
+64K of stack size. Consider this as a max limit
INT32 azx_tasks_initWithComplCB | +( | +azx_tasks_onTaskComplCB | +cb | ) | ++ |
Initializes the callback with all parameters needed to use tasks and monitoring the execution end.
+The data callback hook
-The pointer to the buffer to be used when downloading
-The buffer size
-User argument to pass to function
-Callback Function to call
-Callback if this many milliseconds have elapsed
-File path (local or remote)
-This structure contains the options for the FTP client, as the debug callback function hook FtpDebugHook() The CID to be used for the network operations (a PDP context must be already active to use the client) the debug level to be used. a callback argument (unused at the moment)
Refer to azx_ftp_init()
-Debug callback function to call for client logging
-Context id used by active connection
-Global debug Level to set
-If type is AZX_FTP_XFER_BUFF, this will provide buffer information (pointer, size, data callback if needed)
-If type is AZX_FTP_XFER_FILE, this will provide file information (path, size)
-Payload of the transfer operation
-The type of the transfer mode
-HTTP header structure.
@@ -169,21 +169,6 @@Type of authentication
-char AZX_HTTP_HEADER::boundary[AZX_HTTP_H_FIELD_SIZE] | -
Field to hold HTTP boundary
-Field to hold HTTP content length
+ + + +char* AZX_HTTP_HEADER::content_range | +
The Content-Range info, request for user or containing the server response (buffer provided by used)
+Data Fields | |
unsigned char | cid |
AZX_HTTP_LOG_HOOK_LEVELS_E | loglevel |
azx_httpDebugHook | logFunc |
void * | logArg |
unsigned char | cid |
int | padding |
![]() |
+
+ AZX (AppZone eXtensions) documentation
+ 1.1.19-CxL
+
+ A set of companion utilities that make AZ development easier
+ |
+
+Data Fields | |
+int | ai_flags |
+int | ai_family |
+int | ai_socktype |
+int | ai_protocol |
+socklen_t | ai_addrlen |
+struct M2MB_SOCKET_BSD_SOCKADDR * | ai_addr |
+char * | ai_canonname |
+struct addrinfo * | ai_next |
void* azx_httpCallbackOptions::cbData | +void* azx_httpCallbackOptions::cbArg |
The buffer pointer (already allocated) that will contain the data to output with the callback
-Callback argument pointer. This is a user provided context.
+INT8* azx_httpCallbackOptions::cbEvtFlag | +void* azx_httpCallbackOptions::cbData |
Callback event pointer. This is a flag. When activated (set to a value different from 0) from user application side this leads the HTTP read process to be forcefully stopped
-The buffer pointer (already allocated) that will contain the data to output with the callback
+AZX_HTTPS_USER_CB azx_httpCallbackOptions::cbFunc | +AZX_HTTPS_USER_CB azx_httpCallbackOptions::cbFunc |
Data Fields | |
+ | |
+struct { | |
+ uint8_t len | |
+ uint8_t bytes | |
+ uint8_t type | |
+ uint8_t data [14] | |
} | smsc |
struct { | |
uint8_t len | |
uint8_t data [14] | |
} | smsc |
-struct { | |
- uint8_t len | |
- uint8_t bytes | |
- uint8_t type | |
- uint8_t data [14] | |
} | sender |
+ | |
} | sender |
struct { | |
+ | |
uint16_t len | |
+ | |
uint16_t bytes | |
+ | |
uint8_t * data | |
} | msg |
} | msg |
uint8_t | first |
![]() |
AZX (AppZone eXtensions) documentation
- 1.1.15-CxL
+ 1.1.19-CxL
A set of companion utilities that make AZ development easier
|
diff --git a/LE910Cx_L/AZX_Docs/html/structtimezone.html b/LE910Cx_L/AZX_Docs/html/structtimezone.html
index 53732da1..a0767115 100644
--- a/LE910Cx_L/AZX_Docs/html/structtimezone.html
+++ b/LE910Cx_L/AZX_Docs/html/structtimezone.html
@@ -34,7 +34,7 @@
![]() |
AZX (AppZone eXtensions) documentation
- 1.1.15-CxL
+ 1.1.19-CxL
A set of companion utilities that make AZ development easier
|
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/Makefile.in b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/Makefile.in
index f5f77abb..5dfab775 100755
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/Makefile.in
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/Makefile.in
@@ -15,7 +15,7 @@ LOGS_COLOUR = 0
## ---- do not touch below this line
-SW_VER = 1.1.15
+SW_VER = 1.1.19
CLEAN_BEFORE_BUILD = clean
@@ -24,25 +24,34 @@ CPPFLAGS += -DVERSION=\"$(SW_VER)\"
ifeq ($(strip $(LOGS_ENABLE)),1)
-CPPFLAGS += -DAZX_LOG_ENABLE
CPPFLAGS += -DLOG_CHANNEL=$(LOGS_CHANNEL)
CPPFLAGS += -DAZX_LOG_LEVEL=AZX_LOG_LEVEL_$(LOGS_LEVEL)
-
CPPFLAGS += -DAZX_LOG_ENABLE_COLOURS=$(LOGS_COLOUR)
-
+else
+CPPFLAGS += -DAZX_LOG_DISABLE
endif
+is_toolchain =$(foreach v,$2,$(if $(findstring $v,$1),$(1)))
+
+GCC_TOOLCHAINS := GCC GNUEABI
+RVCT_TOOLCHAINS := RVCT506
+
+
# Disable the missing-field-initializers as GCC sometimes complains about
# legitimate struct initialization
# (https://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru)
-
-ifneq (,$(filter $(TOOLCHAIN),GCC GCC_LINUX GNUEABI))
+ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(GCC_TOOLCHAINS))))
CPPFLAGS += -Wall -Werror -Wextra -Wunreachable-code -Wno-missing-field-initializers -Wno-format
else
- CPPFLAGS += --diag_suppress=111,177,1293
+ ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(RVCT_TOOLCHAINS))))
+ CPPFLAGS += --diag_suppress=111,177,1293
+ else
+ $(info "Unexpected toolchain $(TOOLCHAIN)")
+ endif
endif
+
# --------------------------------------------------------------------------
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/metadata.json b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/metadata.json
old mode 100755
new mode 100644
index f0543cde..58fcdf37
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/metadata.json
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_Main_UART/metadata.json
@@ -24,20 +24,28 @@
"37.00.xx1",
"37.00.xx2",
"37.00.xx3",
- "37.00.xx4"
+ "37.00.xx4",
+ "37.00.xx6",
+ "37.00.xx5"
]
},
"LE910Cx-L": {
"firmwares": [
"25.20.xx8",
"25.20.xx9",
- "25.21.xx0"
+ "25.21.xx0",
+ "25.21.xx2",
+ "25.21.xx3"
]
},
"LE910Cx-X": {
"firmwares": [
"25.30.xx1",
- "25.30.xx2"
+ "25.30.xx2",
+ "25.30.xx3",
+ "25.30.xx4",
+ "25.30.xx5",
+ "25.30.xx6"
]
}
},
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/Makefile.in b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/Makefile.in
index f5f77abb..5dfab775 100755
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/Makefile.in
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/Makefile.in
@@ -15,7 +15,7 @@ LOGS_COLOUR = 0
## ---- do not touch below this line
-SW_VER = 1.1.15
+SW_VER = 1.1.19
CLEAN_BEFORE_BUILD = clean
@@ -24,25 +24,34 @@ CPPFLAGS += -DVERSION=\"$(SW_VER)\"
ifeq ($(strip $(LOGS_ENABLE)),1)
-CPPFLAGS += -DAZX_LOG_ENABLE
CPPFLAGS += -DLOG_CHANNEL=$(LOGS_CHANNEL)
CPPFLAGS += -DAZX_LOG_LEVEL=AZX_LOG_LEVEL_$(LOGS_LEVEL)
-
CPPFLAGS += -DAZX_LOG_ENABLE_COLOURS=$(LOGS_COLOUR)
-
+else
+CPPFLAGS += -DAZX_LOG_DISABLE
endif
+is_toolchain =$(foreach v,$2,$(if $(findstring $v,$1),$(1)))
+
+GCC_TOOLCHAINS := GCC GNUEABI
+RVCT_TOOLCHAINS := RVCT506
+
+
# Disable the missing-field-initializers as GCC sometimes complains about
# legitimate struct initialization
# (https://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru)
-
-ifneq (,$(filter $(TOOLCHAIN),GCC GCC_LINUX GNUEABI))
+ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(GCC_TOOLCHAINS))))
CPPFLAGS += -Wall -Werror -Wextra -Wunreachable-code -Wno-missing-field-initializers -Wno-format
else
- CPPFLAGS += --diag_suppress=111,177,1293
+ ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(RVCT_TOOLCHAINS))))
+ CPPFLAGS += --diag_suppress=111,177,1293
+ else
+ $(info "Unexpected toolchain $(TOOLCHAIN)")
+ endif
endif
+
# --------------------------------------------------------------------------
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/metadata.json b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/metadata.json
old mode 100755
new mode 100644
index e06fa274..db8948fb
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/metadata.json
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_HelloWorld_USB0/metadata.json
@@ -24,20 +24,28 @@
"37.00.xx1",
"37.00.xx2",
"37.00.xx3",
- "37.00.xx4"
+ "37.00.xx4",
+ "37.00.xx6",
+ "37.00.xx5"
]
},
"LE910Cx-L": {
"firmwares": [
"25.20.xx8",
"25.20.xx9",
- "25.21.xx0"
+ "25.21.xx0",
+ "25.21.xx2",
+ "25.21.xx3"
]
},
"LE910Cx-X": {
"firmwares": [
"25.30.xx1",
- "25.30.xx2"
+ "25.30.xx2",
+ "25.30.xx3",
+ "25.30.xx4",
+ "25.30.xx5",
+ "25.30.xx6"
]
}
},
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/Makefile.in b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/Makefile.in
index 3fe66284..d22252b6 100755
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/Makefile.in
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/Makefile.in
@@ -15,7 +15,7 @@ LOGS_COLOUR = 0
## ---- do not touch below this line
-SW_VER = 1.1.15
+SW_VER = 1.1.19
CLEAN_BEFORE_BUILD = clean
@@ -24,25 +24,34 @@ CPPFLAGS += -DVERSION=\"$(SW_VER)\"
ifeq ($(strip $(LOGS_ENABLE)),1)
-CPPFLAGS += -DAZX_LOG_ENABLE
CPPFLAGS += -DLOG_CHANNEL=$(LOGS_CHANNEL)
CPPFLAGS += -DAZX_LOG_LEVEL=AZX_LOG_LEVEL_$(LOGS_LEVEL)
-
CPPFLAGS += -DAZX_LOG_ENABLE_COLOURS=$(LOGS_COLOUR)
-
+else
+CPPFLAGS += -DAZX_LOG_DISABLE
endif
+is_toolchain =$(foreach v,$2,$(if $(findstring $v,$1),$(1)))
+
+GCC_TOOLCHAINS := GCC GNUEABI
+RVCT_TOOLCHAINS := RVCT506
+
+
# Disable the missing-field-initializers as GCC sometimes complains about
# legitimate struct initialization
# (https://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru)
-
-ifneq (,$(filter $(TOOLCHAIN),GCC GCC_LINUX GNUEABI))
+ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(GCC_TOOLCHAINS))))
CPPFLAGS += -Wall -Werror -Wextra -Wunreachable-code -Wno-missing-field-initializers -Wno-format
else
- CPPFLAGS += --diag_suppress=111,177,1293
+ ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(RVCT_TOOLCHAINS))))
+ CPPFLAGS += --diag_suppress=111,177,1293
+ else
+ $(info "Unexpected toolchain $(TOOLCHAIN)")
+ endif
endif
+
# --------------------------------------------------------------------------
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/hdr/azx_log.h b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/hdr/azx_log.h
index 76d26eea..06043bff 100755
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/hdr/azx_log.h
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/hdr/azx_log.h
@@ -5,7 +5,7 @@
#define HDR_AZX_LOG_H_
/**
* @file azx_log.h
- * @version 1.0.9
+ * @version 1.1.0
* @dependencies
* @author Fabio Pintus
* @author Ioannis Demetriou
@@ -210,6 +210,27 @@ void azx_log_setLevel(AZX_LOG_LEVEL_E level);
*/
AZX_LOG_LEVEL_E azx_log_getLevel(void);
+
+/**
+ * @brief Puts the UART used for logs in power OFF mode
+ *
+ *
+ * @return 0 in case of success, -1 otherwise
+ *
+ * @see azx_log_init()
+ */
+INT32 azx_log_disableUart(void);
+
+/**
+ * @brief Puts the UART used for logs in power ON mode
+ *
+ *
+ * @return 0 in case of success, -1 otherwise
+ *
+ * @see azx_log_init()
+ */
+INT32 azx_log_enableUart(void);
+
/**
* @brief Gets the logging component to output to a file.
*
@@ -254,7 +275,7 @@ void azx_log_flush_to_file(void);
* If disabled, these messages will be printed using the internal
* m2mb_trace.h API.
*/
-#ifdef AZX_LOG_ENABLE
+#ifndef AZX_LOG_DISABLE
/** @cond DEV */
#if AZX_LOG_ENABLE_COLOURS
@@ -306,26 +327,33 @@ void azx_log_flush_to_file(void);
/** @} */
/** @} */
-#else /* !AZX_LOG_ENABLE */
-
-#include "m2mb_types.h"
-#include "m2mb_trace.h"
-
+#else /* AZX_LOG_DISABLE */
/**
* @brief Call this at your AZ entry point to easily configure logging
*/
-#define AZX_LOG_INIT() do { \
- m2mb_trace_init(); \
- m2mb_trace_enable(M2MB_TC_M2M_USER); \
-} while(0)
+#define AZX_LOG_INIT()
-#define AZX_LOG_CRITICAL(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_FATAL, (CHAR*)a)
-#define AZX_LOG_ERROR(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_ERROR, (CHAR*)a)
-#define AZX_LOG_WARN(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_WARNING, (CHAR*)a)
-#define AZX_LOG_INFO(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_LOG, (CHAR*)a)
-#define AZX_LOG_DEBUG(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_DEBUG, (CHAR*)a)
+#define AZX_LOG_CRITICAL(a...)
+#define AZX_LOG_ERROR(a...)
+#define AZX_LOG_WARN(a...)
+#define AZX_LOG_INFO(a...)
+#define AZX_LOG_DEBUG(a...)
#define AZX_LOG_TRACE(a...)
+#endif /* AZX_LOG_DISABLE */
+
+/**
+ * @brief Wrapping macros that can be called with parameters wrapped in double parentheses to be ISO C89/C90 standard compliant.
+ *
+ * e.g. LogInfo(("hello world %d", var));
+ */
+/**/
+#define LogCritical(a) AZX_LOG_CRITICAL a
+#define LogError(a) AZX_LOG_ERROR a
+#define LogWarn(a) AZX_LOG_WARN a
+#define LogInfo(a) AZX_LOG_INFO a
+#define LogDebug(a) AZX_LOG_DEBUG a
+#define LogTrace(a) AZX_LOG_TRACE a
-#endif /* AZX_LOG_ENABLE */
/** @} */
+
#endif /* HDR_AZX_LOG_H_ */
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/src/azx_log.c b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/src/azx_log.c
index 3cb669c7..484827b4 100755
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/src/azx_log.c
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/azx/src/azx_log.c
@@ -104,6 +104,7 @@ static struct
CHAR current_name[40];
UINT32 circular_chunks;
UINT32 max_size_kb;
+ UINT32 current_file_size;
AZX_LOG_LEVEL_E min_level;
UINT32 cache_idx;
CHAR cache[MAX_FILE_LOG_CACHE];
@@ -118,6 +119,8 @@ static struct
0,
/*.max_size_kb */
0,
+ /*.current_file_size */
+ 0,
/*.min_level */
AZX_LOG_LEVEL_CRITICAL,
/*.cache_idx */
@@ -174,7 +177,7 @@ static INT32 log_print_to_USB (const CHAR *path, const CHAR *message );
static UINT32 get_uptime(void);
static const char* get_file_title(const CHAR* path);
static char* get_current_task_name(CHAR *name);
-static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb);
+static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb, UINT32 data_size);
static void flush_log_to_file(void);
static void file_log_or_cache(const CHAR* buffer);
static const CHAR* get_next_log_filename(const CHAR* filename,
@@ -482,6 +485,37 @@ AZX_LOG_LEVEL_E azx_log_getLevel(void)
return AZX_LOG_LEVEL_NONE;
}
+INT32 azx_log_disableUart(void)
+{
+ INT32 res = -1;
+ if(log_cfg.isInit)
+ {
+
+ if(log_cfg.ch_fd != -1 && (log_cfg.channel == AZX_LOG_TO_MAIN_UART || log_cfg.channel == AZX_LOG_TO_AUX_UART ))
+ {
+ res = m2mb_uart_ioctl(log_cfg.ch_fd, M2MB_UART_IOCTL_SET_POWER_STATE, FALSE);
+ }
+ }
+
+ return res;
+}
+
+
+INT32 azx_log_enableUart(void)
+{
+ INT32 res = -1;
+ if(log_cfg.isInit)
+ {
+
+ if(log_cfg.ch_fd != -1 && (log_cfg.channel == AZX_LOG_TO_MAIN_UART || log_cfg.channel == AZX_LOG_TO_AUX_UART ))
+ {
+ res = m2mb_uart_ioctl(log_cfg.ch_fd, M2MB_UART_IOCTL_SET_POWER_STATE, TRUE);
+ }
+ }
+
+ return res;
+}
+
/*----------------------------------------------------------------------------*/
/*!
\brief Prints on the requested log channel (USB, UART, AUX)
@@ -575,7 +609,24 @@ INT32 azx_log_formatted(AZX_LOG_LEVEL_E level,
if(logFile.fd && level >= logFile.min_level)
{
- if(!check_file_size(logFile.current_name, logFile.max_size_kb))
+
+ switch(level)
+ {
+ LOG_FILE_PREFIX(TRACE);
+ LOG_FILE_PREFIX(DEBUG);
+ LOG_FILE_PREFIX(INFO);
+ LOG_FILE_PREFIX(WARN);
+ LOG_FILE_PREFIX(ERROR);
+ LOG_FILE_PREFIX(CRITICAL);
+ default:
+ break;
+ }
+
+ va_start(arg, fmt);
+ vsnprintf(log_buffer + offset, LOG_BUFFER_SIZE - offset, fmt, arg);
+ va_end(arg);
+
+ if(!check_file_size(logFile.current_name, logFile.max_size_kb, strlen(log_buffer)))
{
/* Log limit reached, so we'll need to open the next file in the rotation. Log in the file
* that this limit is reached and then get the next filename */
@@ -600,21 +651,6 @@ INT32 azx_log_formatted(AZX_LOG_LEVEL_E level,
}
}
- switch(level)
- {
- LOG_FILE_PREFIX(TRACE);
- LOG_FILE_PREFIX(DEBUG);
- LOG_FILE_PREFIX(INFO);
- LOG_FILE_PREFIX(WARN);
- LOG_FILE_PREFIX(ERROR);
- LOG_FILE_PREFIX(CRITICAL);
- default:
- break;
- }
-
- va_start(arg, fmt);
- vsnprintf(log_buffer + offset, LOG_BUFFER_SIZE - offset, fmt, arg);
- va_end(arg);
file_log_or_cache(log_buffer);
}
@@ -625,15 +661,34 @@ INT32 azx_log_formatted(AZX_LOG_LEVEL_E level,
return sent;
}
-static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb)
+static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb, UINT32 data_size)
{
struct M2MB_STAT stat;
+ BOOLEAN result = TRUE;
+ UINT32 max_size_bytes = max_size_kb << 10;
+
if(-1 == m2mb_fs_stat(filename, &stat))
{
/* Most likely the file doesn't exist, so return true */
return TRUE;
}
- return ((stat.st_size >> 10) < max_size_kb);
+
+ logFile.current_file_size = stat.st_size;
+
+ if(logFile.current_file_size >= max_size_bytes)
+ {
+ result = FALSE;
+ }
+ else if (data_size > 0) /*If the function was provided with the expected amount of data to write */
+ {
+ /* The file is still smaller than the expected size, but less than the amount needed to log the new message */
+ if( (max_size_bytes - logFile.current_file_size) < data_size )
+ {
+ result = FALSE;
+ }
+ }
+
+ return result;
}
static void flush_log_to_file(void)
@@ -647,7 +702,34 @@ static void file_log_or_cache(const CHAR* buffer)
{
const UINT32 size = strlen(buffer);
- if(MAX_FILE_LOG_CACHE - 1 - size < logFile.cache_idx)
+ /*If the file max size in KB is smaller than file LOG CACHE, flush earlier*/
+// UINT32 max_size = M2MB_MIN( logFile.max_size_kb << 10 , MAX_FILE_LOG_CACHE);
+ UINT32 file_max_size_bytes = logFile.max_size_kb << 10;
+ UINT32 max_size = MAX_FILE_LOG_CACHE;
+
+
+ /*If the file max size in bytes is smaller than file LOG CACHE, flush earlier*/
+ if( (file_max_size_bytes > 0) && ( (file_max_size_bytes) < MAX_FILE_LOG_CACHE ) )
+ {
+ /*size = file max size*/
+ max_size = file_max_size_bytes;
+ }
+ else
+ {
+ /*If the file remaining size in bytes is smaller than file LOG CACHE, flush earlier*/
+ UINT32 offset = file_max_size_bytes - logFile.current_file_size;
+ if( (offset > 0 ) && ( offset < MAX_FILE_LOG_CACHE ))
+ {
+ /*size = offset between file size and cache size*/
+ max_size = offset;
+ }
+ else
+ {
+ /*size = log cache size*/
+ }
+ }
+
+ if(max_size - 1 - size < logFile.cache_idx)
{
flush_log_to_file();
}
@@ -699,7 +781,7 @@ static const CHAR* get_next_log_filename(const CHAR* filename,
/* First try the original file */
snprintf(filenameInUse, sizeof(filenameInUse), "%s", filename);
- if(check_file_size(filenameInUse, max_size_kb))
+ if(check_file_size(filenameInUse, max_size_kb, 0))
{
goto end;
}
@@ -715,7 +797,7 @@ static const CHAR* get_next_log_filename(const CHAR* filename,
* filename.1 (since the old one got moved to filename.2) */
snprintf(filenameInUse, sizeof(filenameInUse), "%s.1", filename);
- if(check_file_size(filenameInUse, max_size_kb))
+ if(check_file_size(filenameInUse, max_size_kb, 0))
{
goto end;
}
@@ -740,7 +822,7 @@ BOOLEAN azx_log_send_to_file(const CHAR* filename, UINT32 circular_chunks,
return FALSE;
}
- if(circular_chunks == 0 && !check_file_size(filename, max_size_kb))
+ if(circular_chunks == 0 && !check_file_size(filename, max_size_kb, 0))
{
return FALSE;
}
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/metadata.json b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/metadata.json
old mode 100755
new mode 100644
index 19d2f477..ba291d33
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/metadata.json
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_Task/metadata.json
@@ -24,18 +24,26 @@
"37.00.xx1",
"37.00.xx2",
"37.00.xx3",
- "37.00.xx4"
+ "37.00.xx4",
+ "37.00.xx6",
+ "37.00.xx5"
]
},
"LE910Cx-L": {
"firmwares": [
- "25.21.xx0"
+ "25.21.xx0",
+ "25.21.xx2",
+ "25.21.xx3"
]
},
"LE910Cx-X": {
"firmwares": [
"25.30.xx1",
- "25.30.xx2"
+ "25.30.xx2",
+ "25.30.xx3",
+ "25.30.xx4",
+ "25.30.xx5",
+ "25.30.xx6"
]
}
},
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/Makefile.in b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/Makefile.in
index f5f77abb..5dfab775 100755
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/Makefile.in
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/Makefile.in
@@ -15,7 +15,7 @@ LOGS_COLOUR = 0
## ---- do not touch below this line
-SW_VER = 1.1.15
+SW_VER = 1.1.19
CLEAN_BEFORE_BUILD = clean
@@ -24,25 +24,34 @@ CPPFLAGS += -DVERSION=\"$(SW_VER)\"
ifeq ($(strip $(LOGS_ENABLE)),1)
-CPPFLAGS += -DAZX_LOG_ENABLE
CPPFLAGS += -DLOG_CHANNEL=$(LOGS_CHANNEL)
CPPFLAGS += -DAZX_LOG_LEVEL=AZX_LOG_LEVEL_$(LOGS_LEVEL)
-
CPPFLAGS += -DAZX_LOG_ENABLE_COLOURS=$(LOGS_COLOUR)
-
+else
+CPPFLAGS += -DAZX_LOG_DISABLE
endif
+is_toolchain =$(foreach v,$2,$(if $(findstring $v,$1),$(1)))
+
+GCC_TOOLCHAINS := GCC GNUEABI
+RVCT_TOOLCHAINS := RVCT506
+
+
# Disable the missing-field-initializers as GCC sometimes complains about
# legitimate struct initialization
# (https://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru)
-
-ifneq (,$(filter $(TOOLCHAIN),GCC GCC_LINUX GNUEABI))
+ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(GCC_TOOLCHAINS))))
CPPFLAGS += -Wall -Werror -Wextra -Wunreachable-code -Wno-missing-field-initializers -Wno-format
else
- CPPFLAGS += --diag_suppress=111,177,1293
+ ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(RVCT_TOOLCHAINS))))
+ CPPFLAGS += --diag_suppress=111,177,1293
+ else
+ $(info "Unexpected toolchain $(TOOLCHAIN)")
+ endif
endif
+
# --------------------------------------------------------------------------
diff --git a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/metadata.json b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/metadata.json
old mode 100755
new mode 100644
index 47922a21..38633465
--- a/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/metadata.json
+++ b/LE910Cx_L/AppZoneSampleApps-BASIC/Basic_UART_USB_tunnel/metadata.json
@@ -26,19 +26,27 @@
"37.00.xx1",
"37.00.xx2",
"37.00.xx3",
- "37.00.xx4"
+ "37.00.xx4",
+ "37.00.xx6",
+ "37.00.xx5"
]
},
"LE910Cx-L": {
"firmwares": [
"25.20.xx9",
- "25.21.xx0"
+ "25.21.xx0",
+ "25.21.xx2",
+ "25.21.xx3"
]
},
"LE910Cx-X": {
"firmwares": [
"25.30.xx1",
- "25.30.xx2"
+ "25.30.xx2",
+ "25.30.xx3",
+ "25.30.xx4",
+ "25.30.xx5",
+ "25.30.xx6"
]
}
},
diff --git a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/Makefile.in b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/Makefile.in
index 90916a65..cb8872d5 100755
--- a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/Makefile.in
+++ b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/Makefile.in
@@ -15,7 +15,7 @@ LOGS_COLOUR = 0
## ---- do not touch below this line
-SW_VER = 1.1.15
+SW_VER = 1.1.19
CLEAN_BEFORE_BUILD = clean
@@ -24,25 +24,34 @@ CPPFLAGS += -DVERSION=\"$(SW_VER)\"
ifeq ($(strip $(LOGS_ENABLE)),1)
-CPPFLAGS += -DAZX_LOG_ENABLE
CPPFLAGS += -DLOG_CHANNEL=$(LOGS_CHANNEL)
CPPFLAGS += -DAZX_LOG_LEVEL=AZX_LOG_LEVEL_$(LOGS_LEVEL)
-
CPPFLAGS += -DAZX_LOG_ENABLE_COLOURS=$(LOGS_COLOUR)
-
+else
+CPPFLAGS += -DAZX_LOG_DISABLE
endif
+is_toolchain =$(foreach v,$2,$(if $(findstring $v,$1),$(1)))
+
+GCC_TOOLCHAINS := GCC GNUEABI
+RVCT_TOOLCHAINS := RVCT506
+
+
# Disable the missing-field-initializers as GCC sometimes complains about
# legitimate struct initialization
# (https://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru)
-
-ifneq (,$(filter $(TOOLCHAIN),GCC GCC_LINUX GNUEABI))
+ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(GCC_TOOLCHAINS))))
CPPFLAGS += -Wall -Werror -Wextra -Wunreachable-code -Wno-missing-field-initializers -Wno-format
else
- CPPFLAGS += --diag_suppress=111,177,1293
+ ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(RVCT_TOOLCHAINS))))
+ CPPFLAGS += --diag_suppress=111,177,1293
+ else
+ $(info "Unexpected toolchain $(TOOLCHAIN)")
+ endif
endif
+
# --------------------------------------------------------------------------
diff --git a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/hdr/azx_log.h b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/hdr/azx_log.h
index 76d26eea..06043bff 100755
--- a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/hdr/azx_log.h
+++ b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/hdr/azx_log.h
@@ -5,7 +5,7 @@
#define HDR_AZX_LOG_H_
/**
* @file azx_log.h
- * @version 1.0.9
+ * @version 1.1.0
* @dependencies
* @author Fabio Pintus
* @author Ioannis Demetriou
@@ -210,6 +210,27 @@ void azx_log_setLevel(AZX_LOG_LEVEL_E level);
*/
AZX_LOG_LEVEL_E azx_log_getLevel(void);
+
+/**
+ * @brief Puts the UART used for logs in power OFF mode
+ *
+ *
+ * @return 0 in case of success, -1 otherwise
+ *
+ * @see azx_log_init()
+ */
+INT32 azx_log_disableUart(void);
+
+/**
+ * @brief Puts the UART used for logs in power ON mode
+ *
+ *
+ * @return 0 in case of success, -1 otherwise
+ *
+ * @see azx_log_init()
+ */
+INT32 azx_log_enableUart(void);
+
/**
* @brief Gets the logging component to output to a file.
*
@@ -254,7 +275,7 @@ void azx_log_flush_to_file(void);
* If disabled, these messages will be printed using the internal
* m2mb_trace.h API.
*/
-#ifdef AZX_LOG_ENABLE
+#ifndef AZX_LOG_DISABLE
/** @cond DEV */
#if AZX_LOG_ENABLE_COLOURS
@@ -306,26 +327,33 @@ void azx_log_flush_to_file(void);
/** @} */
/** @} */
-#else /* !AZX_LOG_ENABLE */
-
-#include "m2mb_types.h"
-#include "m2mb_trace.h"
-
+#else /* AZX_LOG_DISABLE */
/**
* @brief Call this at your AZ entry point to easily configure logging
*/
-#define AZX_LOG_INIT() do { \
- m2mb_trace_init(); \
- m2mb_trace_enable(M2MB_TC_M2M_USER); \
-} while(0)
+#define AZX_LOG_INIT()
-#define AZX_LOG_CRITICAL(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_FATAL, (CHAR*)a)
-#define AZX_LOG_ERROR(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_ERROR, (CHAR*)a)
-#define AZX_LOG_WARN(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_WARNING, (CHAR*)a)
-#define AZX_LOG_INFO(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_LOG, (CHAR*)a)
-#define AZX_LOG_DEBUG(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_DEBUG, (CHAR*)a)
+#define AZX_LOG_CRITICAL(a...)
+#define AZX_LOG_ERROR(a...)
+#define AZX_LOG_WARN(a...)
+#define AZX_LOG_INFO(a...)
+#define AZX_LOG_DEBUG(a...)
#define AZX_LOG_TRACE(a...)
+#endif /* AZX_LOG_DISABLE */
+
+/**
+ * @brief Wrapping macros that can be called with parameters wrapped in double parentheses to be ISO C89/C90 standard compliant.
+ *
+ * e.g. LogInfo(("hello world %d", var));
+ */
+/**/
+#define LogCritical(a) AZX_LOG_CRITICAL a
+#define LogError(a) AZX_LOG_ERROR a
+#define LogWarn(a) AZX_LOG_WARN a
+#define LogInfo(a) AZX_LOG_INFO a
+#define LogDebug(a) AZX_LOG_DEBUG a
+#define LogTrace(a) AZX_LOG_TRACE a
-#endif /* AZX_LOG_ENABLE */
/** @} */
+
#endif /* HDR_AZX_LOG_H_ */
diff --git a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/src/azx_log.c b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/src/azx_log.c
index 3cb669c7..484827b4 100755
--- a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/src/azx_log.c
+++ b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/azx/src/azx_log.c
@@ -104,6 +104,7 @@ static struct
CHAR current_name[40];
UINT32 circular_chunks;
UINT32 max_size_kb;
+ UINT32 current_file_size;
AZX_LOG_LEVEL_E min_level;
UINT32 cache_idx;
CHAR cache[MAX_FILE_LOG_CACHE];
@@ -118,6 +119,8 @@ static struct
0,
/*.max_size_kb */
0,
+ /*.current_file_size */
+ 0,
/*.min_level */
AZX_LOG_LEVEL_CRITICAL,
/*.cache_idx */
@@ -174,7 +177,7 @@ static INT32 log_print_to_USB (const CHAR *path, const CHAR *message );
static UINT32 get_uptime(void);
static const char* get_file_title(const CHAR* path);
static char* get_current_task_name(CHAR *name);
-static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb);
+static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb, UINT32 data_size);
static void flush_log_to_file(void);
static void file_log_or_cache(const CHAR* buffer);
static const CHAR* get_next_log_filename(const CHAR* filename,
@@ -482,6 +485,37 @@ AZX_LOG_LEVEL_E azx_log_getLevel(void)
return AZX_LOG_LEVEL_NONE;
}
+INT32 azx_log_disableUart(void)
+{
+ INT32 res = -1;
+ if(log_cfg.isInit)
+ {
+
+ if(log_cfg.ch_fd != -1 && (log_cfg.channel == AZX_LOG_TO_MAIN_UART || log_cfg.channel == AZX_LOG_TO_AUX_UART ))
+ {
+ res = m2mb_uart_ioctl(log_cfg.ch_fd, M2MB_UART_IOCTL_SET_POWER_STATE, FALSE);
+ }
+ }
+
+ return res;
+}
+
+
+INT32 azx_log_enableUart(void)
+{
+ INT32 res = -1;
+ if(log_cfg.isInit)
+ {
+
+ if(log_cfg.ch_fd != -1 && (log_cfg.channel == AZX_LOG_TO_MAIN_UART || log_cfg.channel == AZX_LOG_TO_AUX_UART ))
+ {
+ res = m2mb_uart_ioctl(log_cfg.ch_fd, M2MB_UART_IOCTL_SET_POWER_STATE, TRUE);
+ }
+ }
+
+ return res;
+}
+
/*----------------------------------------------------------------------------*/
/*!
\brief Prints on the requested log channel (USB, UART, AUX)
@@ -575,7 +609,24 @@ INT32 azx_log_formatted(AZX_LOG_LEVEL_E level,
if(logFile.fd && level >= logFile.min_level)
{
- if(!check_file_size(logFile.current_name, logFile.max_size_kb))
+
+ switch(level)
+ {
+ LOG_FILE_PREFIX(TRACE);
+ LOG_FILE_PREFIX(DEBUG);
+ LOG_FILE_PREFIX(INFO);
+ LOG_FILE_PREFIX(WARN);
+ LOG_FILE_PREFIX(ERROR);
+ LOG_FILE_PREFIX(CRITICAL);
+ default:
+ break;
+ }
+
+ va_start(arg, fmt);
+ vsnprintf(log_buffer + offset, LOG_BUFFER_SIZE - offset, fmt, arg);
+ va_end(arg);
+
+ if(!check_file_size(logFile.current_name, logFile.max_size_kb, strlen(log_buffer)))
{
/* Log limit reached, so we'll need to open the next file in the rotation. Log in the file
* that this limit is reached and then get the next filename */
@@ -600,21 +651,6 @@ INT32 azx_log_formatted(AZX_LOG_LEVEL_E level,
}
}
- switch(level)
- {
- LOG_FILE_PREFIX(TRACE);
- LOG_FILE_PREFIX(DEBUG);
- LOG_FILE_PREFIX(INFO);
- LOG_FILE_PREFIX(WARN);
- LOG_FILE_PREFIX(ERROR);
- LOG_FILE_PREFIX(CRITICAL);
- default:
- break;
- }
-
- va_start(arg, fmt);
- vsnprintf(log_buffer + offset, LOG_BUFFER_SIZE - offset, fmt, arg);
- va_end(arg);
file_log_or_cache(log_buffer);
}
@@ -625,15 +661,34 @@ INT32 azx_log_formatted(AZX_LOG_LEVEL_E level,
return sent;
}
-static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb)
+static BOOLEAN check_file_size(const CHAR* filename, UINT32 max_size_kb, UINT32 data_size)
{
struct M2MB_STAT stat;
+ BOOLEAN result = TRUE;
+ UINT32 max_size_bytes = max_size_kb << 10;
+
if(-1 == m2mb_fs_stat(filename, &stat))
{
/* Most likely the file doesn't exist, so return true */
return TRUE;
}
- return ((stat.st_size >> 10) < max_size_kb);
+
+ logFile.current_file_size = stat.st_size;
+
+ if(logFile.current_file_size >= max_size_bytes)
+ {
+ result = FALSE;
+ }
+ else if (data_size > 0) /*If the function was provided with the expected amount of data to write */
+ {
+ /* The file is still smaller than the expected size, but less than the amount needed to log the new message */
+ if( (max_size_bytes - logFile.current_file_size) < data_size )
+ {
+ result = FALSE;
+ }
+ }
+
+ return result;
}
static void flush_log_to_file(void)
@@ -647,7 +702,34 @@ static void file_log_or_cache(const CHAR* buffer)
{
const UINT32 size = strlen(buffer);
- if(MAX_FILE_LOG_CACHE - 1 - size < logFile.cache_idx)
+ /*If the file max size in KB is smaller than file LOG CACHE, flush earlier*/
+// UINT32 max_size = M2MB_MIN( logFile.max_size_kb << 10 , MAX_FILE_LOG_CACHE);
+ UINT32 file_max_size_bytes = logFile.max_size_kb << 10;
+ UINT32 max_size = MAX_FILE_LOG_CACHE;
+
+
+ /*If the file max size in bytes is smaller than file LOG CACHE, flush earlier*/
+ if( (file_max_size_bytes > 0) && ( (file_max_size_bytes) < MAX_FILE_LOG_CACHE ) )
+ {
+ /*size = file max size*/
+ max_size = file_max_size_bytes;
+ }
+ else
+ {
+ /*If the file remaining size in bytes is smaller than file LOG CACHE, flush earlier*/
+ UINT32 offset = file_max_size_bytes - logFile.current_file_size;
+ if( (offset > 0 ) && ( offset < MAX_FILE_LOG_CACHE ))
+ {
+ /*size = offset between file size and cache size*/
+ max_size = offset;
+ }
+ else
+ {
+ /*size = log cache size*/
+ }
+ }
+
+ if(max_size - 1 - size < logFile.cache_idx)
{
flush_log_to_file();
}
@@ -699,7 +781,7 @@ static const CHAR* get_next_log_filename(const CHAR* filename,
/* First try the original file */
snprintf(filenameInUse, sizeof(filenameInUse), "%s", filename);
- if(check_file_size(filenameInUse, max_size_kb))
+ if(check_file_size(filenameInUse, max_size_kb, 0))
{
goto end;
}
@@ -715,7 +797,7 @@ static const CHAR* get_next_log_filename(const CHAR* filename,
* filename.1 (since the old one got moved to filename.2) */
snprintf(filenameInUse, sizeof(filenameInUse), "%s.1", filename);
- if(check_file_size(filenameInUse, max_size_kb))
+ if(check_file_size(filenameInUse, max_size_kb, 0))
{
goto end;
}
@@ -740,7 +822,7 @@ BOOLEAN azx_log_send_to_file(const CHAR* filename, UINT32 circular_chunks,
return FALSE;
}
- if(circular_chunks == 0 && !check_file_size(filename, max_size_kb))
+ if(circular_chunks == 0 && !check_file_size(filename, max_size_kb, 0))
{
return FALSE;
}
diff --git a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/metadata.json b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/metadata.json
old mode 100755
new mode 100644
index 46015d76..2b9fb74f
--- a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/metadata.json
+++ b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/ATI/metadata.json
@@ -23,20 +23,28 @@
"37.00.xx1",
"37.00.xx2",
"37.00.xx3",
- "37.00.xx4"
+ "37.00.xx4",
+ "37.00.xx6",
+ "37.00.xx5"
]
},
"LE910Cx-L": {
"firmwares": [
"25.20.xx8",
"25.20.xx9",
- "25.21.xx0"
+ "25.21.xx0",
+ "25.21.xx2",
+ "25.21.xx3"
]
},
"LE910Cx-X": {
"firmwares": [
"25.30.xx1",
- "25.30.xx2"
+ "25.30.xx2",
+ "25.30.xx3",
+ "25.30.xx4",
+ "25.30.xx5",
+ "25.30.xx6"
]
}
},
diff --git a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/Makefile.in b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/Makefile.in
index 90916a65..cb8872d5 100755
--- a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/Makefile.in
+++ b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/Makefile.in
@@ -15,7 +15,7 @@ LOGS_COLOUR = 0
## ---- do not touch below this line
-SW_VER = 1.1.15
+SW_VER = 1.1.19
CLEAN_BEFORE_BUILD = clean
@@ -24,25 +24,34 @@ CPPFLAGS += -DVERSION=\"$(SW_VER)\"
ifeq ($(strip $(LOGS_ENABLE)),1)
-CPPFLAGS += -DAZX_LOG_ENABLE
CPPFLAGS += -DLOG_CHANNEL=$(LOGS_CHANNEL)
CPPFLAGS += -DAZX_LOG_LEVEL=AZX_LOG_LEVEL_$(LOGS_LEVEL)
-
CPPFLAGS += -DAZX_LOG_ENABLE_COLOURS=$(LOGS_COLOUR)
-
+else
+CPPFLAGS += -DAZX_LOG_DISABLE
endif
+is_toolchain =$(foreach v,$2,$(if $(findstring $v,$1),$(1)))
+
+GCC_TOOLCHAINS := GCC GNUEABI
+RVCT_TOOLCHAINS := RVCT506
+
+
# Disable the missing-field-initializers as GCC sometimes complains about
# legitimate struct initialization
# (https://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru)
-
-ifneq (,$(filter $(TOOLCHAIN),GCC GCC_LINUX GNUEABI))
+ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(GCC_TOOLCHAINS))))
CPPFLAGS += -Wall -Werror -Wextra -Wunreachable-code -Wno-missing-field-initializers -Wno-format
else
- CPPFLAGS += --diag_suppress=111,177,1293
+ ifneq (,$(strip $(call is_toolchain,$(TOOLCHAIN),$(RVCT_TOOLCHAINS))))
+ CPPFLAGS += --diag_suppress=111,177,1293
+ else
+ $(info "Unexpected toolchain $(TOOLCHAIN)")
+ endif
endif
+
# --------------------------------------------------------------------------
diff --git a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_log.h b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_log.h
index 76d26eea..06043bff 100755
--- a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_log.h
+++ b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_log.h
@@ -5,7 +5,7 @@
#define HDR_AZX_LOG_H_
/**
* @file azx_log.h
- * @version 1.0.9
+ * @version 1.1.0
* @dependencies
* @author Fabio Pintus
* @author Ioannis Demetriou
@@ -210,6 +210,27 @@ void azx_log_setLevel(AZX_LOG_LEVEL_E level);
*/
AZX_LOG_LEVEL_E azx_log_getLevel(void);
+
+/**
+ * @brief Puts the UART used for logs in power OFF mode
+ *
+ *
+ * @return 0 in case of success, -1 otherwise
+ *
+ * @see azx_log_init()
+ */
+INT32 azx_log_disableUart(void);
+
+/**
+ * @brief Puts the UART used for logs in power ON mode
+ *
+ *
+ * @return 0 in case of success, -1 otherwise
+ *
+ * @see azx_log_init()
+ */
+INT32 azx_log_enableUart(void);
+
/**
* @brief Gets the logging component to output to a file.
*
@@ -254,7 +275,7 @@ void azx_log_flush_to_file(void);
* If disabled, these messages will be printed using the internal
* m2mb_trace.h API.
*/
-#ifdef AZX_LOG_ENABLE
+#ifndef AZX_LOG_DISABLE
/** @cond DEV */
#if AZX_LOG_ENABLE_COLOURS
@@ -306,26 +327,33 @@ void azx_log_flush_to_file(void);
/** @} */
/** @} */
-#else /* !AZX_LOG_ENABLE */
-
-#include "m2mb_types.h"
-#include "m2mb_trace.h"
-
+#else /* AZX_LOG_DISABLE */
/**
* @brief Call this at your AZ entry point to easily configure logging
*/
-#define AZX_LOG_INIT() do { \
- m2mb_trace_init(); \
- m2mb_trace_enable(M2MB_TC_M2M_USER); \
-} while(0)
+#define AZX_LOG_INIT()
-#define AZX_LOG_CRITICAL(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_FATAL, (CHAR*)a)
-#define AZX_LOG_ERROR(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_ERROR, (CHAR*)a)
-#define AZX_LOG_WARN(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_WARNING, (CHAR*)a)
-#define AZX_LOG_INFO(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_LOG, (CHAR*)a)
-#define AZX_LOG_DEBUG(a...) m2mb_trace_file_line_printf(__FILE__, __LINE__, M2MB_TC_M2M_USER, M2MB_TL_DEBUG, (CHAR*)a)
+#define AZX_LOG_CRITICAL(a...)
+#define AZX_LOG_ERROR(a...)
+#define AZX_LOG_WARN(a...)
+#define AZX_LOG_INFO(a...)
+#define AZX_LOG_DEBUG(a...)
#define AZX_LOG_TRACE(a...)
+#endif /* AZX_LOG_DISABLE */
+
+/**
+ * @brief Wrapping macros that can be called with parameters wrapped in double parentheses to be ISO C89/C90 standard compliant.
+ *
+ * e.g. LogInfo(("hello world %d", var));
+ */
+/**/
+#define LogCritical(a) AZX_LOG_CRITICAL a
+#define LogError(a) AZX_LOG_ERROR a
+#define LogWarn(a) AZX_LOG_WARN a
+#define LogInfo(a) AZX_LOG_INFO a
+#define LogDebug(a) AZX_LOG_DEBUG a
+#define LogTrace(a) AZX_LOG_TRACE a
-#endif /* AZX_LOG_ENABLE */
/** @} */
+
#endif /* HDR_AZX_LOG_H_ */
diff --git a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_tasks.h b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_tasks.h
index e392af6a..73354ca5 100755
--- a/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_tasks.h
+++ b/LE910Cx_L/AppZoneSampleApps-MAIN_UART/AT_Tunnel/azx/hdr/azx_tasks.h
@@ -5,10 +5,12 @@
#define HDR_AZX_TASKS_H_
/**
* @file azx_tasks.h
- * @version 1.0.4
+ * @version 1.1.1
* @dependencies core/azx_log core/azx_utils
* @author Alessio Quieti
- * @date 07/04/2018
+ * @author Fabio Pintus
+ * @author Norman Argiolas
+ * @date 21/06/2022
*
* @brief Tasks related utilities
*
@@ -48,13 +50,13 @@ typedef INT32 (*USER_TASK_CB)(INT32, INT32, INT32);
* @brief Available ranges for tasks
* @{ */
#define AZX_TASKS_MIN_STACK_SIZE 1024 /**