From b625350108430604ae1a476de4e16bd348b34858 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 13 Oct 2019 13:07:02 +0200 Subject: [PATCH 001/115] Remove version number from development branch --- dev/VisualStudio/gsm_config.h | 2 +- dev/VisualStudio/lwmem_config.h | 2 +- .../mqtt_client_api_rtos_stm32f429zi_nucleo/inc/gsm_config.h | 2 +- .../stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/main.h | 2 +- .../stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/src/main.c | 2 +- .../netconn_client_rtos_stm32f429zi_nucleo/inc/gsm_config.h | 2 +- .../stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/main.h | 2 +- .../stm32/netconn_client_rtos_stm32f429zi_nucleo/src/main.c | 2 +- .../sms_send_receive_rtos_stm32f429zi_nucleo/inc/gsm_config.h | 2 +- .../stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/main.h | 2 +- .../stm32/sms_send_receive_rtos_stm32f429zi_nucleo/src/main.c | 2 +- .../inc/gsm_config.h | 2 +- .../sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/main.h | 2 +- .../sms_send_receive_thread_rtos_stm32f429zi_nucleo/src/main.c | 2 +- examples/win32/call_rtos/gsm_config.h | 2 +- examples/win32/call_sms_rtos/gsm_config.h | 2 +- examples/win32/device_info_rtos/gsm_config.h | 2 +- examples/win32/mqtt_client_api_rtos/gsm_config.h | 2 +- examples/win32/netconn_client_rtos/gsm_config.h | 2 +- examples/win32/sms_send_receive_rtos/gsm_config.h | 2 +- gsm_at_lib/src/api/gsm_netconn.c | 2 +- gsm_at_lib/src/api/gsm_network_api.c | 2 +- gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c | 2 +- gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_api.c | 2 +- gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_evt.c | 2 +- gsm_at_lib/src/gsm/gsm.c | 2 +- gsm_at_lib/src/gsm/gsm_buff.c | 2 +- gsm_at_lib/src/gsm/gsm_call.c | 2 +- gsm_at_lib/src/gsm/gsm_conn.c | 2 +- gsm_at_lib/src/gsm/gsm_debug.c | 2 +- gsm_at_lib/src/gsm/gsm_device_info.c | 2 +- gsm_at_lib/src/gsm/gsm_evt.c | 2 +- gsm_at_lib/src/gsm/gsm_ftp.c | 2 +- gsm_at_lib/src/gsm/gsm_http.c | 2 +- gsm_at_lib/src/gsm/gsm_input.c | 2 +- gsm_at_lib/src/gsm/gsm_int.c | 2 +- gsm_at_lib/src/gsm/gsm_mem.c | 2 +- gsm_at_lib/src/gsm/gsm_network.c | 2 +- gsm_at_lib/src/gsm/gsm_operator.c | 2 +- gsm_at_lib/src/gsm/gsm_parser.c | 2 +- gsm_at_lib/src/gsm/gsm_pbuf.c | 2 +- gsm_at_lib/src/gsm/gsm_phonebook.c | 2 +- gsm_at_lib/src/gsm/gsm_ping.c | 2 +- gsm_at_lib/src/gsm/gsm_sim.c | 2 +- gsm_at_lib/src/gsm/gsm_sms.c | 2 +- gsm_at_lib/src/gsm/gsm_threads.c | 2 +- gsm_at_lib/src/gsm/gsm_timeout.c | 2 +- gsm_at_lib/src/gsm/gsm_unicode.c | 2 +- gsm_at_lib/src/gsm/gsm_ussd.c | 2 +- gsm_at_lib/src/gsm/gsm_utils.c | 2 +- gsm_at_lib/src/include/gsm/apps/gsm_apps.h | 2 +- gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client.h | 2 +- gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_api.h | 2 +- gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_evt.h | 2 +- gsm_at_lib/src/include/gsm/gsm.h | 2 +- gsm_at_lib/src/include/gsm/gsm_buff.h | 2 +- gsm_at_lib/src/include/gsm/gsm_call.h | 2 +- gsm_at_lib/src/include/gsm/gsm_config_default.h | 2 +- gsm_at_lib/src/include/gsm/gsm_config_template.h | 2 +- gsm_at_lib/src/include/gsm/gsm_conn.h | 2 +- gsm_at_lib/src/include/gsm/gsm_debug.h | 2 +- gsm_at_lib/src/include/gsm/gsm_device_info.h | 2 +- gsm_at_lib/src/include/gsm/gsm_evt.h | 2 +- gsm_at_lib/src/include/gsm/gsm_ftp.h | 2 +- gsm_at_lib/src/include/gsm/gsm_http.h | 2 +- gsm_at_lib/src/include/gsm/gsm_includes.h | 2 +- gsm_at_lib/src/include/gsm/gsm_input.h | 2 +- gsm_at_lib/src/include/gsm/gsm_int.h | 2 +- gsm_at_lib/src/include/gsm/gsm_mem.h | 2 +- gsm_at_lib/src/include/gsm/gsm_memories.h | 2 +- gsm_at_lib/src/include/gsm/gsm_models.h | 2 +- gsm_at_lib/src/include/gsm/gsm_netconn.h | 2 +- gsm_at_lib/src/include/gsm/gsm_network.h | 2 +- gsm_at_lib/src/include/gsm/gsm_network_api.h | 2 +- gsm_at_lib/src/include/gsm/gsm_operator.h | 2 +- gsm_at_lib/src/include/gsm/gsm_parser.h | 2 +- gsm_at_lib/src/include/gsm/gsm_pbuf.h | 2 +- gsm_at_lib/src/include/gsm/gsm_phonebook.h | 2 +- gsm_at_lib/src/include/gsm/gsm_ping.h | 2 +- gsm_at_lib/src/include/gsm/gsm_private.h | 2 +- gsm_at_lib/src/include/gsm/gsm_sim.h | 2 +- gsm_at_lib/src/include/gsm/gsm_sms.h | 2 +- gsm_at_lib/src/include/gsm/gsm_threads.h | 2 +- gsm_at_lib/src/include/gsm/gsm_timeout.h | 2 +- gsm_at_lib/src/include/gsm/gsm_typedefs.h | 2 +- gsm_at_lib/src/include/gsm/gsm_unicode.h | 2 +- gsm_at_lib/src/include/gsm/gsm_ussd.h | 2 +- gsm_at_lib/src/include/gsm/gsm_utils.h | 2 +- gsm_at_lib/src/include/system/gsm_ll.h | 2 +- gsm_at_lib/src/include/system/gsm_sys.h | 2 +- gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h | 2 +- gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h | 2 +- gsm_at_lib/src/include/system/gsm_sys_template.h | 2 +- gsm_at_lib/src/include/system/gsm_sys_win32.h | 2 +- gsm_at_lib/src/system/gsm_ll_stm32.c | 2 +- gsm_at_lib/src/system/gsm_ll_stm32f429zi_nucleo.c | 2 +- gsm_at_lib/src/system/gsm_ll_template.c | 2 +- gsm_at_lib/src/system/gsm_ll_win32.c | 2 +- gsm_at_lib/src/system/gsm_mem_lwmem.c | 2 +- gsm_at_lib/src/system/gsm_sys_cmsis_os.c | 2 +- gsm_at_lib/src/system/gsm_sys_cmsis_os2.c | 2 +- gsm_at_lib/src/system/gsm_sys_template.c | 2 +- gsm_at_lib/src/system/gsm_sys_win32.c | 2 +- 103 files changed, 103 insertions(+), 103 deletions(-) diff --git a/dev/VisualStudio/gsm_config.h b/dev/VisualStudio/gsm_config.h index 6102100e..70431d07 100644 --- a/dev/VisualStudio/gsm_config.h +++ b/dev/VisualStudio/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/dev/VisualStudio/lwmem_config.h b/dev/VisualStudio/lwmem_config.h index 225127fe..669c2d34 100644 --- a/dev/VisualStudio/lwmem_config.h +++ b/dev/VisualStudio/lwmem_config.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef LWMEM_HDR_CONFIG_H #define LWMEM_HDR_CONFIG_H diff --git a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/gsm_config.h b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/gsm_config.h index 70d707c1..9402961c 100644 --- a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/gsm_config.h +++ b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/main.h b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/main.h index 6b258f26..d9b06dca 100644 --- a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/main.h +++ b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/main.h @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef __MAIN_H #define __MAIN_H diff --git a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/src/main.c b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/src/main.c index 10364486..ec48234d 100644 --- a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/src/main.c +++ b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/src/main.c @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "main.h" #include "cmsis_os.h" diff --git a/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/gsm_config.h b/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/gsm_config.h index 70d707c1..9402961c 100644 --- a/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/gsm_config.h +++ b/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/main.h b/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/main.h index 6b258f26..d9b06dca 100644 --- a/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/main.h +++ b/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/main.h @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef __MAIN_H #define __MAIN_H diff --git a/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/src/main.c b/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/src/main.c index 40bd3278..ce4f2c6b 100644 --- a/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/src/main.c +++ b/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/src/main.c @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "main.h" #include "cmsis_os.h" diff --git a/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/gsm_config.h b/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/gsm_config.h index e38c16c2..ed198b14 100644 --- a/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/gsm_config.h +++ b/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/main.h b/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/main.h index 6b258f26..d9b06dca 100644 --- a/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/main.h +++ b/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/inc/main.h @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef __MAIN_H #define __MAIN_H diff --git a/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/src/main.c b/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/src/main.c index 18a1da81..3d9e95e0 100644 --- a/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/src/main.c +++ b/examples/stm32/sms_send_receive_rtos_stm32f429zi_nucleo/src/main.c @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "main.h" #include "cmsis_os.h" diff --git a/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/gsm_config.h b/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/gsm_config.h index e38c16c2..ed198b14 100644 --- a/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/gsm_config.h +++ b/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/main.h b/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/main.h index 6b258f26..d9b06dca 100644 --- a/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/main.h +++ b/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/inc/main.h @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef __MAIN_H #define __MAIN_H diff --git a/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/src/main.c b/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/src/main.c index f80ed0cb..89347c33 100644 --- a/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/src/main.c +++ b/examples/stm32/sms_send_receive_thread_rtos_stm32f429zi_nucleo/src/main.c @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "main.h" #include "cmsis_os.h" diff --git a/examples/win32/call_rtos/gsm_config.h b/examples/win32/call_rtos/gsm_config.h index 8d66b547..d86b9e8e 100644 --- a/examples/win32/call_rtos/gsm_config.h +++ b/examples/win32/call_rtos/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/win32/call_sms_rtos/gsm_config.h b/examples/win32/call_sms_rtos/gsm_config.h index 441ea47f..581bb58b 100644 --- a/examples/win32/call_sms_rtos/gsm_config.h +++ b/examples/win32/call_sms_rtos/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/win32/device_info_rtos/gsm_config.h b/examples/win32/device_info_rtos/gsm_config.h index a1b7ac9f..a301797d 100644 --- a/examples/win32/device_info_rtos/gsm_config.h +++ b/examples/win32/device_info_rtos/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/win32/mqtt_client_api_rtos/gsm_config.h b/examples/win32/mqtt_client_api_rtos/gsm_config.h index 19afce73..f6623185 100644 --- a/examples/win32/mqtt_client_api_rtos/gsm_config.h +++ b/examples/win32/mqtt_client_api_rtos/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/win32/netconn_client_rtos/gsm_config.h b/examples/win32/netconn_client_rtos/gsm_config.h index 19afce73..f6623185 100644 --- a/examples/win32/netconn_client_rtos/gsm_config.h +++ b/examples/win32/netconn_client_rtos/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/examples/win32/sms_send_receive_rtos/gsm_config.h b/examples/win32/sms_send_receive_rtos/gsm_config.h index a1b7ac9f..a301797d 100644 --- a/examples/win32/sms_send_receive_rtos/gsm_config.h +++ b/examples/win32/sms_send_receive_rtos/gsm_config.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/gsm_at_lib/src/api/gsm_netconn.c b/gsm_at_lib/src/api/gsm_netconn.c index b6ae8ca5..af872725 100644 --- a/gsm_at_lib/src/api/gsm_netconn.c +++ b/gsm_at_lib/src/api/gsm_netconn.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_netconn.h" #include "gsm/gsm_private.h" diff --git a/gsm_at_lib/src/api/gsm_network_api.c b/gsm_at_lib/src/api/gsm_network_api.c index aa5cd1af..e372224d 100644 --- a/gsm_at_lib/src/api/gsm_network_api.c +++ b/gsm_at_lib/src/api/gsm_network_api.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_network_api.h" #include "gsm/gsm_private.h" diff --git a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c index cd71b66c..85cb52e0 100644 --- a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c +++ b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/apps/gsm_mqtt_client.h" #include "gsm/gsm_mem.h" diff --git a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_api.c b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_api.c index adde5f6f..457c87e0 100644 --- a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_api.c +++ b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_api.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/apps/gsm_mqtt_client_api.h" #include "gsm/gsm_mem.h" diff --git a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_evt.c b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_evt.c index 5b48691d..f29e6c27 100644 --- a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_evt.c +++ b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client_evt.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/apps/gsm_mqtt_client_evt.h" diff --git a/gsm_at_lib/src/gsm/gsm.c b/gsm_at_lib/src/gsm/gsm.c index 564d40ec..c2e41a00 100644 --- a/gsm_at_lib/src/gsm/gsm.c +++ b/gsm_at_lib/src/gsm/gsm.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_mem.h" diff --git a/gsm_at_lib/src/gsm/gsm_buff.c b/gsm_at_lib/src/gsm/gsm_buff.c index 8c530c34..b728f405 100644 --- a/gsm_at_lib/src/gsm/gsm_buff.c +++ b/gsm_at_lib/src/gsm/gsm_buff.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_buff.h" diff --git a/gsm_at_lib/src/gsm/gsm_call.c b/gsm_at_lib/src/gsm/gsm_call.c index 145905f5..ae4641d7 100644 --- a/gsm_at_lib/src/gsm/gsm_call.c +++ b/gsm_at_lib/src/gsm/gsm_call.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_call.h" diff --git a/gsm_at_lib/src/gsm/gsm_conn.c b/gsm_at_lib/src/gsm/gsm_conn.c index ef68e07e..b1c84f2b 100644 --- a/gsm_at_lib/src/gsm/gsm_conn.c +++ b/gsm_at_lib/src/gsm/gsm_conn.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_conn.h" diff --git a/gsm_at_lib/src/gsm/gsm_debug.c b/gsm_at_lib/src/gsm/gsm_debug.c index 9be1c0c1..5e80b1ac 100644 --- a/gsm_at_lib/src/gsm/gsm_debug.c +++ b/gsm_at_lib/src/gsm/gsm_debug.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_debug.h" diff --git a/gsm_at_lib/src/gsm/gsm_device_info.c b/gsm_at_lib/src/gsm/gsm_device_info.c index 98d72cbc..771d06ea 100644 --- a/gsm_at_lib/src/gsm/gsm_device_info.c +++ b/gsm_at_lib/src/gsm/gsm_device_info.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_device_info.h" diff --git a/gsm_at_lib/src/gsm/gsm_evt.c b/gsm_at_lib/src/gsm/gsm_evt.c index d1ea3208..58234b5d 100644 --- a/gsm_at_lib/src/gsm/gsm_evt.c +++ b/gsm_at_lib/src/gsm/gsm_evt.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_evt.h" diff --git a/gsm_at_lib/src/gsm/gsm_ftp.c b/gsm_at_lib/src/gsm/gsm_ftp.c index 8998cb4e..e6af7403 100644 --- a/gsm_at_lib/src/gsm/gsm_ftp.c +++ b/gsm_at_lib/src/gsm/gsm_ftp.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_ftp.h" diff --git a/gsm_at_lib/src/gsm/gsm_http.c b/gsm_at_lib/src/gsm/gsm_http.c index 2b845612..37ce50bb 100644 --- a/gsm_at_lib/src/gsm/gsm_http.c +++ b/gsm_at_lib/src/gsm/gsm_http.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_http.h" diff --git a/gsm_at_lib/src/gsm/gsm_input.c b/gsm_at_lib/src/gsm/gsm_input.c index 38dac471..cdeb75fa 100644 --- a/gsm_at_lib/src/gsm/gsm_input.c +++ b/gsm_at_lib/src/gsm/gsm_input.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm.h" diff --git a/gsm_at_lib/src/gsm/gsm_int.c b/gsm_at_lib/src/gsm/gsm_int.c index 095f58ef..7130bd65 100644 --- a/gsm_at_lib/src/gsm/gsm_int.c +++ b/gsm_at_lib/src/gsm/gsm_int.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm.h" diff --git a/gsm_at_lib/src/gsm/gsm_mem.c b/gsm_at_lib/src/gsm/gsm_mem.c index 291af57d..0e73bbcd 100644 --- a/gsm_at_lib/src/gsm/gsm_mem.c +++ b/gsm_at_lib/src/gsm/gsm_mem.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_mem.h" diff --git a/gsm_at_lib/src/gsm/gsm_network.c b/gsm_at_lib/src/gsm/gsm_network.c index 1869942d..41e44e42 100644 --- a/gsm_at_lib/src/gsm/gsm_network.c +++ b/gsm_at_lib/src/gsm/gsm_network.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_network.h" diff --git a/gsm_at_lib/src/gsm/gsm_operator.c b/gsm_at_lib/src/gsm/gsm_operator.c index ae0c4424..f8e7a7c6 100644 --- a/gsm_at_lib/src/gsm/gsm_operator.c +++ b/gsm_at_lib/src/gsm/gsm_operator.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_operator.h" diff --git a/gsm_at_lib/src/gsm/gsm_parser.c b/gsm_at_lib/src/gsm/gsm_parser.c index a2938bae..0ea62813 100644 --- a/gsm_at_lib/src/gsm/gsm_parser.c +++ b/gsm_at_lib/src/gsm/gsm_parser.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_parser.h" diff --git a/gsm_at_lib/src/gsm/gsm_pbuf.c b/gsm_at_lib/src/gsm/gsm_pbuf.c index 79b0782d..5310ab57 100644 --- a/gsm_at_lib/src/gsm/gsm_pbuf.c +++ b/gsm_at_lib/src/gsm/gsm_pbuf.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_pbuf.h" diff --git a/gsm_at_lib/src/gsm/gsm_phonebook.c b/gsm_at_lib/src/gsm/gsm_phonebook.c index e7e3b01f..bcec3aaa 100644 --- a/gsm_at_lib/src/gsm/gsm_phonebook.c +++ b/gsm_at_lib/src/gsm/gsm_phonebook.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_phonebook.h" diff --git a/gsm_at_lib/src/gsm/gsm_ping.c b/gsm_at_lib/src/gsm/gsm_ping.c index 9a81f328..9f46276d 100644 --- a/gsm_at_lib/src/gsm/gsm_ping.c +++ b/gsm_at_lib/src/gsm/gsm_ping.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_ping.h" diff --git a/gsm_at_lib/src/gsm/gsm_sim.c b/gsm_at_lib/src/gsm/gsm_sim.c index 371790ee..2e0ed31e 100644 --- a/gsm_at_lib/src/gsm/gsm_sim.c +++ b/gsm_at_lib/src/gsm/gsm_sim.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_sim.h" diff --git a/gsm_at_lib/src/gsm/gsm_sms.c b/gsm_at_lib/src/gsm/gsm_sms.c index 39dd449d..da1e0ed3 100644 --- a/gsm_at_lib/src/gsm/gsm_sms.c +++ b/gsm_at_lib/src/gsm/gsm_sms.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_sms.h" diff --git a/gsm_at_lib/src/gsm/gsm_threads.c b/gsm_at_lib/src/gsm/gsm_threads.c index d421c5f3..adb2e8c2 100644 --- a/gsm_at_lib/src/gsm/gsm_threads.c +++ b/gsm_at_lib/src/gsm/gsm_threads.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_threads.h" diff --git a/gsm_at_lib/src/gsm/gsm_timeout.c b/gsm_at_lib/src/gsm/gsm_timeout.c index da13f2e2..dff618ba 100644 --- a/gsm_at_lib/src/gsm/gsm_timeout.c +++ b/gsm_at_lib/src/gsm/gsm_timeout.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_timeout.h" diff --git a/gsm_at_lib/src/gsm/gsm_unicode.c b/gsm_at_lib/src/gsm/gsm_unicode.c index b928cf39..3104a6de 100644 --- a/gsm_at_lib/src/gsm/gsm_unicode.c +++ b/gsm_at_lib/src/gsm/gsm_unicode.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_unicode.h" diff --git a/gsm_at_lib/src/gsm/gsm_ussd.c b/gsm_at_lib/src/gsm/gsm_ussd.c index 2113d23d..da8114c6 100644 --- a/gsm_at_lib/src/gsm/gsm_ussd.c +++ b/gsm_at_lib/src/gsm/gsm_ussd.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_ussd.h" diff --git a/gsm_at_lib/src/gsm/gsm_utils.c b/gsm_at_lib/src/gsm/gsm_utils.c index 24207e83..6ddd1516 100644 --- a/gsm_at_lib/src/gsm/gsm_utils.c +++ b/gsm_at_lib/src/gsm/gsm_utils.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm_private.h" #include "gsm/gsm_utils.h" diff --git a/gsm_at_lib/src/include/gsm/apps/gsm_apps.h b/gsm_at_lib/src/include/gsm/apps/gsm_apps.h index 7f00fb68..db8a744a 100644 --- a/gsm_at_lib/src/include/gsm/apps/gsm_apps.h +++ b/gsm_at_lib/src/include/gsm/apps/gsm_apps.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_APPS_H #define GSM_HDR_APPS_H diff --git a/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client.h b/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client.h index f7f1c7b6..88a2dba2 100644 --- a/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client.h +++ b/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_APP_MQTT_CLIENT_H #define GSM_HDR_APP_MQTT_CLIENT_H diff --git a/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_api.h b/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_api.h index 4b3c4896..55dcf583 100644 --- a/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_api.h +++ b/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_api.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_APP_MQTT_CLIENT_API_H #define GSM_HDR_APP_MQTT_CLIENT_API_H diff --git a/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_evt.h b/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_evt.h index 7f6316ce..88aa3e0b 100644 --- a/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_evt.h +++ b/gsm_at_lib/src/include/gsm/apps/gsm_mqtt_client_evt.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_APP_MQTT_CLIENT_EVT_H #define GSM_HDR_APP_MQTT_CLIENT_EVT_H diff --git a/gsm_at_lib/src/include/gsm/gsm.h b/gsm_at_lib/src/include/gsm/gsm.h index fe3c225f..9fe211fb 100644 --- a/gsm_at_lib/src/include/gsm/gsm.h +++ b/gsm_at_lib/src/include/gsm/gsm.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_H #define GSM_HDR_H diff --git a/gsm_at_lib/src/include/gsm/gsm_buff.h b/gsm_at_lib/src/include/gsm/gsm_buff.h index b746aadc..24e8404d 100644 --- a/gsm_at_lib/src/include/gsm/gsm_buff.h +++ b/gsm_at_lib/src/include/gsm/gsm_buff.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_BUFF_H #define GSM_HDR_BUFF_H diff --git a/gsm_at_lib/src/include/gsm/gsm_call.h b/gsm_at_lib/src/include/gsm/gsm_call.h index 469c0a80..9bae1290 100644 --- a/gsm_at_lib/src/include/gsm/gsm_call.h +++ b/gsm_at_lib/src/include/gsm/gsm_call.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CALL_H #define GSM_HDR_CALL_H diff --git a/gsm_at_lib/src/include/gsm/gsm_config_default.h b/gsm_at_lib/src/include/gsm/gsm_config_default.h index a4683197..c3292119 100644 --- a/gsm_at_lib/src/include/gsm/gsm_config_default.h +++ b/gsm_at_lib/src/include/gsm/gsm_config_default.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_DEFAULT_CONFIG_H #define GSM_HDR_DEFAULT_CONFIG_H diff --git a/gsm_at_lib/src/include/gsm/gsm_config_template.h b/gsm_at_lib/src/include/gsm/gsm_config_template.h index 20aa0d4a..f10cdb82 100644 --- a/gsm_at_lib/src/include/gsm/gsm_config_template.h +++ b/gsm_at_lib/src/include/gsm/gsm_config_template.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONFIG_H #define GSM_HDR_CONFIG_H diff --git a/gsm_at_lib/src/include/gsm/gsm_conn.h b/gsm_at_lib/src/include/gsm/gsm_conn.h index d8864abf..089d5a49 100644 --- a/gsm_at_lib/src/include/gsm/gsm_conn.h +++ b/gsm_at_lib/src/include/gsm/gsm_conn.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_CONN_H #define GSM_HDR_CONN_H diff --git a/gsm_at_lib/src/include/gsm/gsm_debug.h b/gsm_at_lib/src/include/gsm/gsm_debug.h index 6d4b6116..18bdfd26 100644 --- a/gsm_at_lib/src/include/gsm/gsm_debug.h +++ b/gsm_at_lib/src/include/gsm/gsm_debug.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_DEBUG_H #define GSM_HDR_DEBUG_H diff --git a/gsm_at_lib/src/include/gsm/gsm_device_info.h b/gsm_at_lib/src/include/gsm/gsm_device_info.h index 46d617ac..3332e43b 100644 --- a/gsm_at_lib/src/include/gsm/gsm_device_info.h +++ b/gsm_at_lib/src/include/gsm/gsm_device_info.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_DEVICE_INFO_H #define GSM_HDR_DEVICE_INFO_H diff --git a/gsm_at_lib/src/include/gsm/gsm_evt.h b/gsm_at_lib/src/include/gsm/gsm_evt.h index 5dc5a5e2..b0dbaa21 100644 --- a/gsm_at_lib/src/include/gsm/gsm_evt.h +++ b/gsm_at_lib/src/include/gsm/gsm_evt.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_EVT_H #define GSM_HDR_EVT_H diff --git a/gsm_at_lib/src/include/gsm/gsm_ftp.h b/gsm_at_lib/src/include/gsm/gsm_ftp.h index 419a2e72..4e2f8f4d 100644 --- a/gsm_at_lib/src/include/gsm/gsm_ftp.h +++ b/gsm_at_lib/src/include/gsm/gsm_ftp.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_FTP_H #define GSM_HDR_FTP_H diff --git a/gsm_at_lib/src/include/gsm/gsm_http.h b/gsm_at_lib/src/include/gsm/gsm_http.h index 8e0803e4..1af13296 100644 --- a/gsm_at_lib/src/include/gsm/gsm_http.h +++ b/gsm_at_lib/src/include/gsm/gsm_http.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_HTTP_H #define GSM_HDR_HTTP_H diff --git a/gsm_at_lib/src/include/gsm/gsm_includes.h b/gsm_at_lib/src/include/gsm/gsm_includes.h index a3a5fa0b..81bb3370 100644 --- a/gsm_at_lib/src/include/gsm/gsm_includes.h +++ b/gsm_at_lib/src/include/gsm/gsm_includes.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_INCLUDES_H #define GSM_HDR_INCLUDES_H diff --git a/gsm_at_lib/src/include/gsm/gsm_input.h b/gsm_at_lib/src/include/gsm/gsm_input.h index 3fa4c046..ffb522f2 100644 --- a/gsm_at_lib/src/include/gsm/gsm_input.h +++ b/gsm_at_lib/src/include/gsm/gsm_input.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_INPUT_H #define GSM_HDR_INPUT_H diff --git a/gsm_at_lib/src/include/gsm/gsm_int.h b/gsm_at_lib/src/include/gsm/gsm_int.h index 29491d40..51c3c3e3 100644 --- a/gsm_at_lib/src/include/gsm/gsm_int.h +++ b/gsm_at_lib/src/include/gsm/gsm_int.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_INT_H #define GSM_HDR_INT_H diff --git a/gsm_at_lib/src/include/gsm/gsm_mem.h b/gsm_at_lib/src/include/gsm/gsm_mem.h index 2fdc97c3..0edf821a 100644 --- a/gsm_at_lib/src/include/gsm/gsm_mem.h +++ b/gsm_at_lib/src/include/gsm/gsm_mem.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_MEM_H #define GSM_HDR_MEM_H diff --git a/gsm_at_lib/src/include/gsm/gsm_memories.h b/gsm_at_lib/src/include/gsm/gsm_memories.h index c2219678..0803a916 100644 --- a/gsm_at_lib/src/include/gsm/gsm_memories.h +++ b/gsm_at_lib/src/include/gsm/gsm_memories.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ GSM_DEV_MEMORY_ENTRY(SM_P, "SM_P") diff --git a/gsm_at_lib/src/include/gsm/gsm_models.h b/gsm_at_lib/src/include/gsm/gsm_models.h index 9a6d9736..8ed79139 100644 --- a/gsm_at_lib/src/include/gsm/gsm_models.h +++ b/gsm_at_lib/src/include/gsm/gsm_models.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ /* Order: Device name; Device model identification, Is_2G, Is_LTE */ diff --git a/gsm_at_lib/src/include/gsm/gsm_netconn.h b/gsm_at_lib/src/include/gsm/gsm_netconn.h index 9d0dc870..6102d040 100644 --- a/gsm_at_lib/src/include/gsm/gsm_netconn.h +++ b/gsm_at_lib/src/include/gsm/gsm_netconn.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_NETCONN_H #define GSM_HDR_NETCONN_H diff --git a/gsm_at_lib/src/include/gsm/gsm_network.h b/gsm_at_lib/src/include/gsm/gsm_network.h index f773322b..aaf53675 100644 --- a/gsm_at_lib/src/include/gsm/gsm_network.h +++ b/gsm_at_lib/src/include/gsm/gsm_network.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_NETWORK_H #define GSM_HDR_NETWORK_H diff --git a/gsm_at_lib/src/include/gsm/gsm_network_api.h b/gsm_at_lib/src/include/gsm/gsm_network_api.h index a794b2f5..92cf8ce5 100644 --- a/gsm_at_lib/src/include/gsm/gsm_network_api.h +++ b/gsm_at_lib/src/include/gsm/gsm_network_api.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_NETWORK_API_H #define GSM_HDR_NETWORK_API_H diff --git a/gsm_at_lib/src/include/gsm/gsm_operator.h b/gsm_at_lib/src/include/gsm/gsm_operator.h index a35451d7..e07a9e6f 100644 --- a/gsm_at_lib/src/include/gsm/gsm_operator.h +++ b/gsm_at_lib/src/include/gsm/gsm_operator.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_OPERATOR_H #define GSM_HDR_OPERATOR_H diff --git a/gsm_at_lib/src/include/gsm/gsm_parser.h b/gsm_at_lib/src/include/gsm/gsm_parser.h index d772e7ae..1bdb386f 100644 --- a/gsm_at_lib/src/include/gsm/gsm_parser.h +++ b/gsm_at_lib/src/include/gsm/gsm_parser.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_PARSER_H #define GSM_HDR_PARSER_H diff --git a/gsm_at_lib/src/include/gsm/gsm_pbuf.h b/gsm_at_lib/src/include/gsm/gsm_pbuf.h index 1942c37d..b57d2a70 100644 --- a/gsm_at_lib/src/include/gsm/gsm_pbuf.h +++ b/gsm_at_lib/src/include/gsm/gsm_pbuf.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_PBUF_H #define GSM_HDR_PBUF_H diff --git a/gsm_at_lib/src/include/gsm/gsm_phonebook.h b/gsm_at_lib/src/include/gsm/gsm_phonebook.h index b2a902e1..f17cf34b 100644 --- a/gsm_at_lib/src/include/gsm/gsm_phonebook.h +++ b/gsm_at_lib/src/include/gsm/gsm_phonebook.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_PHONEBOOK_H #define GSM_HDR_PHONEBOOK_H diff --git a/gsm_at_lib/src/include/gsm/gsm_ping.h b/gsm_at_lib/src/include/gsm/gsm_ping.h index 4f4ea6b9..3cbb9ae6 100644 --- a/gsm_at_lib/src/include/gsm/gsm_ping.h +++ b/gsm_at_lib/src/include/gsm/gsm_ping.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_PING_H #define GSM_HDR_PING_H diff --git a/gsm_at_lib/src/include/gsm/gsm_private.h b/gsm_at_lib/src/include/gsm/gsm_private.h index 8b2adb5c..379b175e 100644 --- a/gsm_at_lib/src/include/gsm/gsm_private.h +++ b/gsm_at_lib/src/include/gsm/gsm_private.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef __GSM_PRIV_H #define __GSM_PRIV_H diff --git a/gsm_at_lib/src/include/gsm/gsm_sim.h b/gsm_at_lib/src/include/gsm/gsm_sim.h index 901a74cd..f0b7ea3a 100644 --- a/gsm_at_lib/src/include/gsm/gsm_sim.h +++ b/gsm_at_lib/src/include/gsm/gsm_sim.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_SIM_H #define GSM_HDR_SIM_H diff --git a/gsm_at_lib/src/include/gsm/gsm_sms.h b/gsm_at_lib/src/include/gsm/gsm_sms.h index 2cac273b..551a2785 100644 --- a/gsm_at_lib/src/include/gsm/gsm_sms.h +++ b/gsm_at_lib/src/include/gsm/gsm_sms.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_SMS_H #define GSM_HDR_SMS_H diff --git a/gsm_at_lib/src/include/gsm/gsm_threads.h b/gsm_at_lib/src/include/gsm/gsm_threads.h index f11f59a4..1e163a03 100644 --- a/gsm_at_lib/src/include/gsm/gsm_threads.h +++ b/gsm_at_lib/src/include/gsm/gsm_threads.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_THREADS_H #define GSM_HDR_THREADS_H diff --git a/gsm_at_lib/src/include/gsm/gsm_timeout.h b/gsm_at_lib/src/include/gsm/gsm_timeout.h index 2405d18b..1fb7c0ea 100644 --- a/gsm_at_lib/src/include/gsm/gsm_timeout.h +++ b/gsm_at_lib/src/include/gsm/gsm_timeout.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_TIMEOUT_H #define GSM_HDR_TIMEOUT_H diff --git a/gsm_at_lib/src/include/gsm/gsm_typedefs.h b/gsm_at_lib/src/include/gsm/gsm_typedefs.h index a9b5b190..e2395f37 100644 --- a/gsm_at_lib/src/include/gsm/gsm_typedefs.h +++ b/gsm_at_lib/src/include/gsm/gsm_typedefs.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_DEFS_H #define GSM_HDR_DEFS_H diff --git a/gsm_at_lib/src/include/gsm/gsm_unicode.h b/gsm_at_lib/src/include/gsm/gsm_unicode.h index 0a84ab70..477f1a37 100644 --- a/gsm_at_lib/src/include/gsm/gsm_unicode.h +++ b/gsm_at_lib/src/include/gsm/gsm_unicode.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_UNICODE_H #define GSM_HDR_UNICODE_H diff --git a/gsm_at_lib/src/include/gsm/gsm_ussd.h b/gsm_at_lib/src/include/gsm/gsm_ussd.h index 4ffd947c..a4d9813b 100644 --- a/gsm_at_lib/src/include/gsm/gsm_ussd.h +++ b/gsm_at_lib/src/include/gsm/gsm_ussd.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_USSD_H #define GSM_HDR_USSD_H diff --git a/gsm_at_lib/src/include/gsm/gsm_utils.h b/gsm_at_lib/src/include/gsm/gsm_utils.h index 3c103b3d..718e0ea7 100644 --- a/gsm_at_lib/src/include/gsm/gsm_utils.h +++ b/gsm_at_lib/src/include/gsm/gsm_utils.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_UTILS_H #define GSM_HDR_UTILS_H diff --git a/gsm_at_lib/src/include/system/gsm_ll.h b/gsm_at_lib/src/include/system/gsm_ll.h index 793f966e..240272c1 100644 --- a/gsm_at_lib/src/include/system/gsm_ll.h +++ b/gsm_at_lib/src/include/system/gsm_ll.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_LL_H #define GSM_HDR_LL_H diff --git a/gsm_at_lib/src/include/system/gsm_sys.h b/gsm_at_lib/src/include/system/gsm_sys.h index dbcff241..36f275fc 100644 --- a/gsm_at_lib/src/include/system/gsm_sys.h +++ b/gsm_at_lib/src/include/system/gsm_sys.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_MAIN_SYS_H #define GSM_HDR_MAIN_SYS_H diff --git a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h b/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h index 4a3aeccc..8b802d75 100644 --- a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h +++ b/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_SYSTEM_CMSIS_OS_H #define GSM_HDR_SYSTEM_CMSIS_OS_H diff --git a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h b/gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h index 04d9d572..8bb1c96e 100644 --- a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h +++ b/gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_SYSTEM_CMSIS_OS2_H #define GSM_HDR_SYSTEM_CMSIS_OS2_H diff --git a/gsm_at_lib/src/include/system/gsm_sys_template.h b/gsm_at_lib/src/include/system/gsm_sys_template.h index 9d7ab38e..608624a2 100644 --- a/gsm_at_lib/src/include/system/gsm_sys_template.h +++ b/gsm_at_lib/src/include/system/gsm_sys_template.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_SYSTEM_H #define GSM_HDR_SYSTEM_H diff --git a/gsm_at_lib/src/include/system/gsm_sys_win32.h b/gsm_at_lib/src/include/system/gsm_sys_win32.h index 1a837fdf..d10dac0e 100644 --- a/gsm_at_lib/src/include/system/gsm_sys_win32.h +++ b/gsm_at_lib/src/include/system/gsm_sys_win32.h @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #ifndef GSM_HDR_SYSTEM_WIN32_H #define GSM_HDR_SYSTEM_WIN32_H diff --git a/gsm_at_lib/src/system/gsm_ll_stm32.c b/gsm_at_lib/src/system/gsm_ll_stm32.c index a6f062dc..9087e765 100644 --- a/gsm_at_lib/src/system/gsm_ll_stm32.c +++ b/gsm_at_lib/src/system/gsm_ll_stm32.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ /* diff --git a/gsm_at_lib/src/system/gsm_ll_stm32f429zi_nucleo.c b/gsm_at_lib/src/system/gsm_ll_stm32f429zi_nucleo.c index 6b9749ff..8ee6ece4 100644 --- a/gsm_at_lib/src/system/gsm_ll_stm32f429zi_nucleo.c +++ b/gsm_at_lib/src/system/gsm_ll_stm32f429zi_nucleo.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ /* diff --git a/gsm_at_lib/src/system/gsm_ll_template.c b/gsm_at_lib/src/system/gsm_ll_template.c index 1c2a959b..6debf7c5 100644 --- a/gsm_at_lib/src/system/gsm_ll_template.c +++ b/gsm_at_lib/src/system/gsm_ll_template.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "system/gsm_ll.h" #include "gsm/gsm.h" diff --git a/gsm_at_lib/src/system/gsm_ll_win32.c b/gsm_at_lib/src/system/gsm_ll_win32.c index 7a1f2b32..ebc0e5c7 100644 --- a/gsm_at_lib/src/system/gsm_ll_win32.c +++ b/gsm_at_lib/src/system/gsm_ll_win32.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "system/gsm_ll.h" #include "gsm/gsm.h" diff --git a/gsm_at_lib/src/system/gsm_mem_lwmem.c b/gsm_at_lib/src/system/gsm_mem_lwmem.c index e6b76d15..adc72384 100644 --- a/gsm_at_lib/src/system/gsm_mem_lwmem.c +++ b/gsm_at_lib/src/system/gsm_mem_lwmem.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "gsm/gsm.h" diff --git a/gsm_at_lib/src/system/gsm_sys_cmsis_os.c b/gsm_at_lib/src/system/gsm_sys_cmsis_os.c index 079405d6..f5afb9aa 100644 --- a/gsm_at_lib/src/system/gsm_sys_cmsis_os.c +++ b/gsm_at_lib/src/system/gsm_sys_cmsis_os.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "system/gsm_sys.h" #include "cmsis_os.h" diff --git a/gsm_at_lib/src/system/gsm_sys_cmsis_os2.c b/gsm_at_lib/src/system/gsm_sys_cmsis_os2.c index a986cfbd..6f2e8500 100644 --- a/gsm_at_lib/src/system/gsm_sys_cmsis_os2.c +++ b/gsm_at_lib/src/system/gsm_sys_cmsis_os2.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "system/gsm_sys.h" #include "cmsis_os2.h" diff --git a/gsm_at_lib/src/system/gsm_sys_template.c b/gsm_at_lib/src/system/gsm_sys_template.c index e7a4b8f2..aa131777 100644 --- a/gsm_at_lib/src/system/gsm_sys_template.c +++ b/gsm_at_lib/src/system/gsm_sys_template.c @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "system/gsm_sys.h" #include "cmsis_os.h" diff --git a/gsm_at_lib/src/system/gsm_sys_win32.c b/gsm_at_lib/src/system/gsm_sys_win32.c index 5018825f..5af6288c 100644 --- a/gsm_at_lib/src/system/gsm_sys_win32.c +++ b/gsm_at_lib/src/system/gsm_sys_win32.c @@ -29,7 +29,7 @@ * This file is part of GSM-AT library. * * Author: Tilen MAJERLE - * Version: v0.6.0 + * Version: $_version_$ */ #include "system/gsm_sys.h" #include From 6fc9e9028c24c9ee4d890905d75a730a421d8083 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sat, 26 Oct 2019 13:44:03 +0200 Subject: [PATCH 002/115] Fix ambiguity & win32 port for mbox get --- gsm_at_lib/src/include/gsm/gsm_private.h | 8 ++--- gsm_at_lib/src/system/gsm_sys_win32.c | 43 +++++++----------------- 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/gsm_at_lib/src/include/gsm/gsm_private.h b/gsm_at_lib/src/include/gsm/gsm_private.h index 379b175e..7242bea2 100644 --- a/gsm_at_lib/src/include/gsm/gsm_private.h +++ b/gsm_at_lib/src/include/gsm/gsm_private.h @@ -756,12 +756,12 @@ extern const size_t gsm_dev_model_map_size; gsm_mem_free_s((void **)&(name)); \ } while (0) #if GSM_CFG_USE_API_FUNC_EVT -#define GSM_MSG_VAR_SET_EVT(name, evt_fn, evt_arg) do {\ - (name)->evt_fn = (evt_fn); \ - (name)->evt_arg = (evt_arg); \ +#define GSM_MSG_VAR_SET_EVT(name, e_fn, e_arg) do {\ + (name)->evt_fn = (e_fn); \ + (name)->evt_arg = (e_arg); \ } while (0) #else /* GSM_CFG_USE_API_FUNC_EVT */ -#define GSM_MSG_VAR_SET_EVT(name, evt_fn, evt_arg) do { GSM_UNUSED(evt_fn); GSM_UNUSED(evt_arg); } while (0) +#define GSM_MSG_VAR_SET_EVT(name, e_fn, e_arg) do { GSM_UNUSED(e_fn); GSM_UNUSED(e_arg); } while (0) #endif /* !GSM_CFG_USE_API_FUNC_EVT */ #define GSM_CHARISNUM(x) ((x) >= '0' && (x) <= '9') diff --git a/gsm_at_lib/src/system/gsm_sys_win32.c b/gsm_at_lib/src/system/gsm_sys_win32.c index 5af6288c..ea8c68fc 100644 --- a/gsm_at_lib/src/system/gsm_sys_win32.c +++ b/gsm_at_lib/src/system/gsm_sys_win32.c @@ -234,12 +234,10 @@ gsm_sys_mbox_put(gsm_sys_mbox_t* b, void* m) { gsm_sys_sem_wait(&mbox->sem, 0); /* Wait availability again */ } mbox->entries[mbox->in] = m; - if (mbox->in == mbox->out) { /* Was the previous state empty? */ - gsm_sys_sem_release(&mbox->sem_not_empty); /* Signal non-empty state */ - } if (++mbox->in >= mbox->size) { mbox->in = 0; } + gsm_sys_sem_release(&mbox->sem_not_empty); /* Signal non-empty state */ gsm_sys_sem_release(&mbox->sem); /* Release access for other threads */ return osKernelSysTick() - time; } @@ -247,44 +245,27 @@ gsm_sys_mbox_put(gsm_sys_mbox_t* b, void* m) { uint32_t gsm_sys_mbox_get(gsm_sys_mbox_t* b, void** m, uint32_t timeout) { win32_mbox_t* mbox = *b; - uint32_t time = osKernelSysTick(); /* Get current time */ - uint32_t spent_time; + uint32_t time; + + time = osKernelSysTick(); /* Get exclusive access to message queue */ - if ((spent_time = gsm_sys_sem_wait(&mbox->sem, timeout)) == GSM_SYS_TIMEOUT) { - return spent_time; + if (gsm_sys_sem_wait(&mbox->sem, timeout) == GSM_SYS_TIMEOUT) { + return GSM_SYS_TIMEOUT; } - - /* Make sure we have something to read from queue. */ while (mbox_is_empty(mbox)) { - gsm_sys_sem_release(&mbox->sem); /* Release semaphore and allow other threads to write something */ - /* - * Timeout = 0 means unlimited time - * Wait either unlimited time or for specific timeout - */ - if (timeout == 0) { - gsm_sys_sem_wait(&mbox->sem_not_empty, 0); - } else { - spent_time = gsm_sys_sem_wait(&mbox->sem_not_empty, timeout); - if (spent_time == GSM_SYS_TIMEOUT) { - return spent_time; - } + gsm_sys_sem_release(&mbox->sem); + if (gsm_sys_sem_wait(&mbox->sem_not_empty, timeout) == GSM_SYS_TIMEOUT) { + return GSM_SYS_TIMEOUT; } - spent_time = gsm_sys_sem_wait(&mbox->sem, timeout); /* Wait again for exclusive access */ + gsm_sys_sem_wait(&mbox->sem, timeout); } - - /* - * At this point, semaphore is not empty and - * we have exclusive access to content - */ *m = mbox->entries[mbox->out]; if (++mbox->out >= mbox->size) { mbox->out = 0; } - - /* Release it only if waiting for it */ - gsm_sys_sem_release(&mbox->sem_not_full); /* Release semaphore as it is not full */ - gsm_sys_sem_release(&mbox->sem); /* Release exclusive access to mbox */ + gsm_sys_sem_release(&mbox->sem_not_full); + gsm_sys_sem_release(&mbox->sem); return osKernelSysTick() - time; } From 415fba1c631cee6aa7e6be6e38a39946702a70e8 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 27 Oct 2019 15:22:58 +0100 Subject: [PATCH 003/115] Use pre-inc instead of post-inc --- gsm_at_lib/src/api/gsm_netconn.c | 2 +- gsm_at_lib/src/api/gsm_network_api.c | 2 +- gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c | 22 ++--- gsm_at_lib/src/gsm/gsm.c | 4 +- gsm_at_lib/src/gsm/gsm_input.c | 4 +- gsm_at_lib/src/gsm/gsm_int.c | 33 +++---- gsm_at_lib/src/gsm/gsm_mem.c | 7 +- gsm_at_lib/src/gsm/gsm_parser.c | 104 ++++++++++----------- gsm_at_lib/src/gsm/gsm_pbuf.c | 8 +- gsm_at_lib/src/gsm/gsm_utils.c | 10 +- gsm_at_lib/src/system/gsm_ll_stm32.c | 2 +- gsm_at_lib/src/system/gsm_ll_win32.c | 6 +- gsm_at_lib/src/system/gsm_sys_win32.c | 6 +- 13 files changed, 103 insertions(+), 107 deletions(-) diff --git a/gsm_at_lib/src/api/gsm_netconn.c b/gsm_at_lib/src/api/gsm_netconn.c index af872725..dc72d5c9 100644 --- a/gsm_at_lib/src/api/gsm_netconn.c +++ b/gsm_at_lib/src/api/gsm_netconn.c @@ -158,7 +158,7 @@ netconn_evt(gsm_evt_t* evt) { gsm_pbuf_free(pbuf); /* Free pbuf */ return gsmOKIGNOREMORE; /* Return OK to free the memory and ignore further data */ } - nc->rcv_packets++; /* Increase number of received packets */ + ++nc->rcv_packets; /* Increase number of received packets */ GSM_DEBUGF(GSM_CFG_DBG_NETCONN | GSM_DBG_TYPE_TRACE, "[NETCONN] Received pbuf contains %d bytes. Handle written to receive mbox\r\n", (int)gsm_pbuf_length(pbuf, 0)); diff --git a/gsm_at_lib/src/api/gsm_network_api.c b/gsm_at_lib/src/api/gsm_network_api.c index e372224d..19c04e96 100644 --- a/gsm_at_lib/src/api/gsm_network_api.c +++ b/gsm_at_lib/src/api/gsm_network_api.c @@ -76,7 +76,7 @@ gsm_network_request_attach(void) { do_conn = 1; } } - network_counter++; + ++network_counter; gsm_core_unlock(); /* Connect to network */ diff --git a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c index 85cb52e0..18e13ead 100644 --- a/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c +++ b/gsm_at_lib/src/apps/mqtt/gsm_mqtt_client.c @@ -153,8 +153,7 @@ mqtt_evt_fn_default(gsm_mqtt_client_p client, gsm_mqtt_evt_t* evt) { */ static uint16_t create_packet_id(gsm_mqtt_client_p client) { - client->last_packet_id++; - if (client->last_packet_id == 0) { + if (++client->last_packet_id == 0) { client->last_packet_id = 1; } return client->last_packet_id; @@ -179,7 +178,7 @@ request_create(gsm_mqtt_client_p client, uint16_t packet_id, void* arg) { uint16_t i; /* Try to find a new request which does not have IN_USE flag set */ - for (request = NULL, i = 0; i < GSM_CFG_MQTT_MAX_REQUESTS; i++) { + for (request = NULL, i = 0; i < GSM_CFG_MQTT_MAX_REQUESTS; ++i) { if (!(client->requests[i].status & MQTT_REQUEST_FLAG_IN_USE)) { request = &client->requests[i]; /* We have empty request */ break; @@ -225,7 +224,7 @@ request_set_pending(gsm_mqtt_client_p client, gsm_mqtt_request_t* request) { static gsm_mqtt_request_t * request_get_pending(gsm_mqtt_client_p client, int32_t pkt_id) { /* Try to find a new request which does not have IN_USE flag set */ - for (size_t i = 0; i < GSM_CFG_MQTT_MAX_REQUESTS; i++) { + for (size_t i = 0; i < GSM_CFG_MQTT_MAX_REQUESTS; ++i) { if ((client->requests[i].status & MQTT_REQUEST_FLAG_PENDING) && (pkt_id == -1 || client->requests[i].packet_id == (uint16_t)pkt_id)) { return &client->requests[i]; @@ -343,7 +342,7 @@ output_check_enough_memory(gsm_mqtt_client_p client, uint16_t rem_len) { uint16_t total_len = rem_len + 1; /* Remaining length + first (packet start) byte */ do { /* Calculate bytes for encoding remaining length itself */ - total_len++; + ++total_len; rem_len >>= 7; /* Encoded with 7 bits per byte */ } while (rem_len > 0); @@ -465,7 +464,7 @@ sub_unsub(gsm_mqtt_client_p client, const char* topic, gsm_mqtt_qos_t qos, void* */ rem_len = 2 + len_topic + 2; if (sub) { - rem_len++; + ++rem_len; } gsm_core_lock(); @@ -656,7 +655,7 @@ mqtt_process_incoming_message(gsm_mqtt_client_p client) { */ static uint8_t mqtt_parse_incoming(gsm_mqtt_client_p client, gsm_pbuf_p pbuf) { - size_t idx, buff_len = 0, buff_offset = 0; + size_t buff_len = 0, buff_offset = 0; uint8_t ch, *d; do { @@ -665,7 +664,7 @@ mqtt_parse_incoming(gsm_mqtt_client_p client, gsm_pbuf_p pbuf) { if (d == NULL) { break; } - for (idx = 0; idx < buff_len; idx++) { /* Process entire linear buffer */ + for (size_t idx = 0; idx < buff_len; ++idx) { /* Process entire linear buffer */ ch = d[idx]; switch (client->parser_state) { /* Check parser state */ case MQTT_PARSER_STATE_INIT: { /* We are waiting for start byte and packet type */ @@ -683,7 +682,8 @@ mqtt_parse_incoming(gsm_mqtt_client_p client, gsm_pbuf_p pbuf) { } case MQTT_PARSER_STATE_CALC_REM_LEN: { /* Calculate remaining length of packet */ /* Length of packet is LSB first, each consist of up to 7 bits */ - client->msg_rem_len |= (ch & 0x7F) << ((size_t)7 * (size_t)client->msg_rem_len_mult++); + client->msg_rem_len |= (ch & 0x7F) << ((size_t)7 * (size_t)client->msg_rem_len_mult); + ++client->msg_rem_len_mult; if (!(ch & 0x80)) { /* Is this last entry? */ GSM_DEBUGF(GSM_CFG_DBG_MQTT_STATE, @@ -726,7 +726,7 @@ mqtt_parse_incoming(gsm_mqtt_client_p client, gsm_pbuf_p pbuf) { if (client->msg_curr_pos < client->rx_buff_len) { client->rx_buff[client->msg_curr_pos] = ch; /* Write received character */ } - client->msg_curr_pos++; + ++client->msg_curr_pos; /* We reached end of received characters? */ if (client->msg_curr_pos == client->msg_rem_len) { @@ -912,7 +912,7 @@ mqtt_data_sent_cb(gsm_mqtt_client_p client, size_t sent_len, uint8_t successful) */ static uint8_t mqtt_poll_cb(gsm_mqtt_client_p client) { - client->poll_time++; + ++client->poll_time; if (client->conn_state == GSM_MQTT_CONN_DISCONNECTING) { return 0; diff --git a/gsm_at_lib/src/gsm/gsm.c b/gsm_at_lib/src/gsm/gsm.c index c2e41a00..1ac95590 100644 --- a/gsm_at_lib/src/gsm/gsm.c +++ b/gsm_at_lib/src/gsm/gsm.c @@ -210,7 +210,7 @@ gsm_reset_with_delay(uint32_t delay, gsmr_t gsm_core_lock(void) { gsm_sys_protect(); - gsm.locked_cnt++; + ++gsm.locked_cnt; return gsmOK; } @@ -226,7 +226,7 @@ gsm_core_lock(void) { */ gsmr_t gsm_core_unlock(void) { - gsm.locked_cnt--; + --gsm.locked_cnt; gsm_sys_unprotect(); return gsmOK; } diff --git a/gsm_at_lib/src/gsm/gsm_input.c b/gsm_at_lib/src/gsm/gsm_input.c index cdeb75fa..b2d8c717 100644 --- a/gsm_at_lib/src/gsm/gsm_input.c +++ b/gsm_at_lib/src/gsm/gsm_input.c @@ -56,7 +56,7 @@ gsm_input(const void* data, size_t len) { gsm_buff_write(&gsm.buff, data, len); /* Write data to buffer */ gsm_sys_mbox_putnow(&gsm.mbox_process, NULL); /* Write empty box, don't care if write fails */ gsm_recv_total_len += len; /* Update total number of received bytes */ - gsm_recv_calls++; /* Update number of calls */ + ++gsm_recv_calls; /* Update number of calls */ return gsmOK; } @@ -84,7 +84,7 @@ gsm_input_process(const void* data, size_t len) { } gsm_recv_total_len += len; /* Update total number of received bytes */ - gsm_recv_calls++; /* Update number of calls */ + ++gsm_recv_calls; /* Update number of calls */ gsm_core_lock(); res = gsmi_process(data, len); /* Process input data */ diff --git a/gsm_at_lib/src/gsm/gsm_int.c b/gsm_at_lib/src/gsm/gsm_int.c index 7130bd65..590f2df7 100644 --- a/gsm_at_lib/src/gsm/gsm_int.c +++ b/gsm_at_lib/src/gsm/gsm_int.c @@ -253,7 +253,7 @@ gsmi_send_ip_mac(const void* d, uint8_t is_ip, uint8_t q, uint8_t c) { } AT_PORT_SEND_QUOTE_COND(q); /* Send quote */ ch = is_ip ? '.' : ':'; /* Get delimiter character */ - for (uint8_t i = 0; i < (is_ip ? 4 : 6); i++) { /* Process byte by byte */ + for (uint8_t i = 0; i < (is_ip ? 4 : 6); ++i) { /* Process byte by byte */ if (is_ip) { /* In case of IP ... */ gsm_u8_to_str(ip->ip[i], str); /* ... go to decimal format ... */ } else { /* ... in case of MAC ... */ @@ -287,7 +287,7 @@ gsmi_send_string(const char* str, uint8_t e, uint8_t q, uint8_t c) { AT_PORT_SEND_CHR(&special); /* Send special character */ } AT_PORT_SEND_CHR(str); /* Send character */ - str++; + ++str; } } else { AT_PORT_SEND_STR(str); /* Send plain string */ @@ -400,7 +400,7 @@ reset_connections(uint8_t forced) { gsm.evt.evt.conn_active_close.forced = forced; gsm.evt.evt.conn_active_close.res = gsmOK; - for (size_t i = 0; i < GSM_CFG_MAX_CONNS; i++) {/* Check all connections */ + for (size_t i = 0; i < GSM_CFG_MAX_CONNS; ++i) {/* Check all connections */ if (gsm.m.conns[i].status.f.active) { gsm.m.conns[i].status.f.active = 0; @@ -557,7 +557,7 @@ gsmi_tcpip_process_data_sent(uint8_t sent) { } gsm.msg->msg.conn_send.tries = 0; } else { /* We were not successful */ - gsm.msg->msg.conn_send.tries++; /* Increase number of tries */ + ++gsm.msg->msg.conn_send.tries; /* Increase number of tries */ if (gsm.msg->msg.conn_send.tries == GSM_CFG_MAX_SEND_RETRIES) { /* In case we reached max number of retransmissions */ return 1; /* Return 1 and indicate error */ } @@ -629,7 +629,7 @@ gsmi_send_conn_error_cb(gsm_msg_t* msg, gsmr_t error) { uint8_t gsmi_is_valid_conn_ptr(gsm_conn_p conn) { uint8_t i = 0; - for (i = 0; i < GSM_ARRAYSIZE(gsm.m.conns); i++) { + for (i = 0; i < GSM_ARRAYSIZE(gsm.m.conns); ++i) { if (conn == &gsm.m.conns[i]) { return 1; } @@ -821,7 +821,7 @@ gsmi_parse_received(gsm_recv_t* rcv) { GSM_MEMCPY(gsm.msg->msg.device_info.str, gsm.m.model_number, tocopy); gsm.msg->msg.device_info.str[tocopy - 1] = 0; } - for (size_t i = 0; i < gsm_dev_model_map_size; i++) { + for (size_t i = 0; i < gsm_dev_model_map_size; ++i) { if (strstr(gsm.m.model_number, gsm_dev_model_map[i].id_str) != NULL) { gsm.m.model = gsm_dev_model_map[i].model; break; @@ -961,7 +961,7 @@ gsmi_parse_received(gsm_recv_t* rcv) { res = gsm.msg->res = res; /* Set the error status */ } } else { - gsm.msg->i++; /* Number of continue calls */ + ++gsm.msg->i; /* Number of continue calls */ } /* @@ -1032,9 +1032,10 @@ gsmi_process(const void* data, size_t data_len) { return gsmERRNODEVICE; } - while (d_len) { /* Read entire set of characters from buffer */ - ch = *d++; /* Get next character */ - d_len--; /* Decrease remaining length */ + while (d_len > 0) { /* Read entire set of characters from buffer */ + ch = *d; /* Get next character */ + ++d; /* Go to next character, must be here as it is used later on */ + --d_len; /* Decrease remaining length, must be here as it is decreased later too */ if (0) { #if GSM_CFG_CONN @@ -1044,8 +1045,8 @@ gsmi_process(const void* data, size_t data_len) { if (gsm.m.ipd.buff != NULL) { /* Do we have active buffer? */ gsm.m.ipd.buff->payload[gsm.m.ipd.buff_ptr] = ch; /* Save data character */ } - gsm.m.ipd.buff_ptr++; - gsm.m.ipd.rem_len--; + ++gsm.m.ipd.buff_ptr; + --gsm.m.ipd.rem_len; /* Try to read more data directly from buffer */ len = GSM_MIN(d_len, GSM_MIN(gsm.m.ipd.rem_len, gsm.m.ipd.buff != NULL ? (gsm.m.ipd.buff->len - gsm.m.ipd.buff_ptr) : gsm.m.ipd.rem_len)); @@ -1157,7 +1158,7 @@ gsmi_process(const void* data, size_t data_len) { } if (ch == '\n' && ch_prev1 == '\r') { if (gsm.msg->msg.sms_list.read == 2) { - gsm.msg->msg.sms_list.ei++; /* Go to next entry */ + ++gsm.msg->msg.sms_list.ei; /* Go to next entry */ if (gsm.msg->msg.sms_list.er != NULL) { /* Check and update user variable */ *gsm.msg->msg.sms_list.er = gsm.msg->msg.sms_list.ei; } @@ -1287,7 +1288,7 @@ gsmi_process(const void* data, size_t data_len) { * so it is safe to just add them to receive array without checking * what are the actual values */ - for (uint8_t i = 0; i < unicode.t; i++) { + for (uint8_t i = 0; i < unicode.t; ++i) { RECV_ADD(unicode.ch[i]);/* Add character to receive array */ } } @@ -1376,7 +1377,7 @@ gsmi_process_sub_cmd(gsm_msg_t* msg, uint8_t* is_ok, uint16_t* is_error) { if (!*is_ok) { /* Sometimes SIM is not ready just after PIN entered */ if (msg->msg.sim_info.cnum_tries < 5) { - msg->msg.sim_info.cnum_tries++; + ++msg->msg.sim_info.cnum_tries; SET_NEW_CMD(GSM_CMD_CNUM); gsm_delay(1000); } @@ -2000,7 +2001,7 @@ gsmi_initiate_cmd(gsm_msg_t* msg) { } else if(CMD_IS_DEF(GSM_CMD_CMGL)) { /* List SMS original command? */ gsmi_send_dev_memory(msg->msg.sms_list.mem == GSM_MEM_CURRENT ? gsm.m.sms.mem[0].current : msg->msg.sms_list.mem, 1, 0); } else if (CMD_IS_DEF(GSM_CMD_CPMS_SET)) { /* Do we want to set memory for read/delete,sent/write,receive? */ - for (size_t i = 0; i < 3; i++) {/* Write 3 memories */ + for (size_t i = 0; i < 3; ++i) {/* Write 3 memories */ gsmi_send_dev_memory(msg->msg.sms_memory.mem[i] == GSM_MEM_CURRENT ? gsm.m.sms.mem[i].current : msg->msg.sms_memory.mem[i], 1, !!i); } } diff --git a/gsm_at_lib/src/gsm/gsm_mem.c b/gsm_at_lib/src/gsm/gsm_mem.c index 0e73bbcd..c012e09c 100644 --- a/gsm_at_lib/src/gsm/gsm_mem.c +++ b/gsm_at_lib/src/gsm/gsm_mem.c @@ -125,18 +125,17 @@ mem_assignmem(const gsm_mem_region_t* regions, size_t len) { /* Check if region address are linear and rising */ mem_start_addr = (uint8_t *)0; - for (size_t i = 0; i < len; i++) { + for (size_t i = 0; i < len; ++i) { if (mem_start_addr >= (uint8_t *)regions[i].start_addr) { /* Check if previous greater than current */ return 0; /* Return as invalid and failed */ } mem_start_addr = (uint8_t *)regions[i].start_addr; /* Save as previous address */ } - while (len--) { + for (; len > 0; --len, ++regions) { /* Check minimum region size */ mem_size = regions->size; if (mem_size < (MEM_ALIGN_NUM + MEMBLOCK_METASIZE)) { - regions++; continue; } /* @@ -196,8 +195,6 @@ mem_assignmem(const gsm_mem_region_t* regions, size_t len) { /* Set number of free bytes available to allocate in region */ mem_available_bytes += first_block->size; - - regions++; /* Go to next region */ } return 1; /* Regions set as expected */ diff --git a/gsm_at_lib/src/gsm/gsm_parser.c b/gsm_at_lib/src/gsm/gsm_parser.c index 0ea62813..a4011721 100644 --- a/gsm_at_lib/src/gsm/gsm_parser.c +++ b/gsm_at_lib/src/gsm/gsm_parser.c @@ -48,33 +48,33 @@ gsmi_parse_number(const char** str) { const char* p = *str; /* */ if (*p == '"') { /* Skip leading quotes */ - p++; + ++p; } if (*p == ',') { /* Skip leading comma */ - p++; + ++p; } if (*p == '"') { /* Skip leading quotes */ - p++; + ++p; } if (*p == '/') { /* Skip '/' character, used in datetime */ - p++; + ++p; } if (*p == ':') { /* Skip ':' character, used in datetime */ - p++; + ++p; } if (*p == '+') { /* Skip '+' character, used in datetime */ - p++; + ++p; } if (*p == '-') { /* Check negative number */ minus = 1; - p++; + ++p; } while (GSM_CHARISNUM(*p)) { /* Parse until character is valid number */ val = val * 10 + GSM_CHARTONUM(*p); - p++; + ++p; } if (*p == '"') { /* Skip trailling quotes */ - p++; + ++p; } *str = p; /* Save new pointer with new offset */ @@ -93,20 +93,20 @@ gsmi_parse_hexnumber(const char** str) { const char* p = *str; /* */ if (*p == '"') { /* Skip leading quotes */ - p++; + ++p; } if (*p == ',') { /* Skip leading comma */ - p++; + ++p; } if (*p == '"') { /* Skip leading quotes */ - p++; + ++p; } while (GSM_CHARISHEXNUM(*p)) { /* Parse until character is valid number */ val = val * 16 + GSM_CHARHEXTONUM(*p); - p++; + ++p; } if (*p == ',') { /* Go to next entry if possible */ - p++; + ++p; } *str = p; /* Save new pointer with new offset */ return val; @@ -129,10 +129,10 @@ gsmi_parse_string(const char** src, char* dst, size_t dst_len, uint8_t trim) { size_t i; if (*p == ',') { - p++; + ++p; } if (*p == '"') { - p++; + ++p; } i = 0; if (dst_len > 0) { @@ -140,18 +140,18 @@ gsmi_parse_string(const char** src, char* dst, size_t dst_len, uint8_t trim) { } while (*p) { if (*p == '"' && (p[1] == ',' || p[1] == '\r' || p[1] == '\n')) { - p++; + ++p; break; } if (dst != NULL) { if (i < dst_len) { *dst++ = *p; - i++; + ++i; } else if (!trim) { break; } } - p++; + ++p; } if (dst != NULL) { *dst = 0; @@ -183,19 +183,19 @@ gsmi_parse_ip(const char** src, gsm_ip_t* ip) { const char* p = *src; if (*p == ',') { - p++; + ++p; } if (*p == '"') { - p++; + ++p; } if (GSM_CHARISNUM(*p)) { - ip->ip[0] = gsmi_parse_number(&p); p++; - ip->ip[1] = gsmi_parse_number(&p); p++; - ip->ip[2] = gsmi_parse_number(&p); p++; + ip->ip[0] = gsmi_parse_number(&p); ++p; + ip->ip[1] = gsmi_parse_number(&p); ++p; + ip->ip[2] = gsmi_parse_number(&p); ++p; ip->ip[3] = gsmi_parse_number(&p); } if (*p == '"') { - p++; + ++p; } *src = p; /* Set new pointer */ @@ -213,19 +213,19 @@ gsmi_parse_mac(const char** src, gsm_mac_t* mac) { const char* p = *src; if (*p == '"') { - p++; + ++p; } - mac->mac[0] = gsmi_parse_hexnumber(&p); p++; - mac->mac[1] = gsmi_parse_hexnumber(&p); p++; - mac->mac[2] = gsmi_parse_hexnumber(&p); p++; - mac->mac[3] = gsmi_parse_hexnumber(&p); p++; - mac->mac[4] = gsmi_parse_hexnumber(&p); p++; + mac->mac[0] = gsmi_parse_hexnumber(&p); ++p; + mac->mac[1] = gsmi_parse_hexnumber(&p); ++p; + mac->mac[2] = gsmi_parse_hexnumber(&p); ++p; + mac->mac[3] = gsmi_parse_hexnumber(&p); ++p; + mac->mac[4] = gsmi_parse_hexnumber(&p); ++p; mac->mac[5] = gsmi_parse_hexnumber(&p); if (*p == '"') { - p++; + ++p; } if (*p == ',') { - p++; + ++p; } *src = p; return 1; @@ -243,14 +243,14 @@ gsmi_parse_memory(const char** src) { const char* s = *src; if (*s == ',') { - s++; + ++s; } if (*s == '"') { - s++; + ++s; } /* Scan all memories available for modem */ - for (i = 0; i < gsm_dev_mem_map_size; i++) { + for (i = 0; i < gsm_dev_mem_map_size; ++i) { sl = strlen(gsm_dev_mem_map[i].mem_str); if (!strncmp(s, gsm_dev_mem_map[i].mem_str, sl)) { mem = gsm_dev_mem_map[i].mem; @@ -263,7 +263,7 @@ gsmi_parse_memory(const char** src) { gsmi_parse_string(&s, NULL, 0, 1); /* Skip string */ } if (*s == '"') { - s++; + ++s; } *src = s; return mem; @@ -283,17 +283,17 @@ gsmi_parse_memories_string(const char** src, uint32_t* mem_dst) { *mem_dst = 0; if (*str == ',') { - str++; + ++str; } if (*str == '(') { - str++; + ++str; } do { mem = gsmi_parse_memory(&str); /* Parse memory string */ *mem_dst |= GSM_U32(1 << GSM_U32(mem)); /* Set as bit field */ } while (*str && *str != ')'); if (*str == ')') { - str++; + ++str; } *src = str; return 1; @@ -494,12 +494,12 @@ gsmi_parse_cops_scan(uint8_t ch, uint8_t reset) { u.f.bo = 0; /* Clear bracket open flag */ u.f.tn = 0; /* Go to next term */ u.f.tp = 0; /* Go to beginning of next term */ - gsm.msg->msg.cops_scan.opsi++; /* Increase index */ + ++gsm.msg->msg.cops_scan.opsi; /* Increase index */ if (gsm.msg->msg.cops_scan.opf != NULL) { *gsm.msg->msg.cops_scan.opf = gsm.msg->msg.cops_scan.opsi; } } else if (ch == ',') { - u.f.tn++; /* Go to next term */ + ++u.f.tn; /* Go to next term */ u.f.tp = 0; /* Go to beginning of next term */ } else if (ch != '"') { /* We have valid data */ size_t i = gsm.msg->msg.cops_scan.opsi; @@ -510,15 +510,15 @@ gsmi_parse_cops_scan(uint8_t ch, uint8_t reset) { } case 1: { /*!< Parse long name */ if (u.f.tp < sizeof(gsm.msg->msg.cops_scan.ops[i].long_name) - 1) { - gsm.msg->msg.cops_scan.ops[i].long_name[u.f.tp++] = ch; - gsm.msg->msg.cops_scan.ops[i].long_name[u.f.tp] = 0; + gsm.msg->msg.cops_scan.ops[i].long_name[u.f.tp] = ch; + gsm.msg->msg.cops_scan.ops[i].long_name[++u.f.tp] = 0; } break; } case 2: { /*!< Parse short name */ if (u.f.tp < sizeof(gsm.msg->msg.cops_scan.ops[i].short_name) - 1) { - gsm.msg->msg.cops_scan.ops[i].short_name[u.f.tp++] = ch; - gsm.msg->msg.cops_scan.ops[i].short_name[u.f.tp] = 0; + gsm.msg->msg.cops_scan.ops[i].short_name[u.f.tp] = ch; + gsm.msg->msg.cops_scan.ops[i].short_name[++u.f.tp] = 0; } break; } @@ -730,7 +730,7 @@ gsmi_parse_cpms(const char* str, uint8_t opt) { } switch (opt) { /* Check expected input string */ case 0: { /* Get list of CPMS options: +CPMS: (("","","",..),("....")("...")) */ - for (i = 0; i < 3; i++) { /* 3 different memories for "operation","receive","sent" */ + for (i = 0; i < 3; ++i) { /* 3 different memories for "operation","receive","sent" */ if (!gsmi_parse_memories_string(&str, &gsm.m.sms.mem[i].mem_available)) { return 0; } @@ -738,7 +738,7 @@ gsmi_parse_cpms(const char* str, uint8_t opt) { break; } case 1: { /* Received statement of current info: +CPMS: "ME",10,20,"SE",2,20,"... */ - for (i = 0; i < 3; i++) { /* 3 memories expected */ + for (i = 0; i < 3; ++i) { /* 3 memories expected */ gsm.m.sms.mem[i].current = gsmi_parse_memory(&str); /* Parse memory string and save it as current */ gsm.m.sms.mem[i].used = gsmi_parse_number(&str);/* Get used memory size */ gsm.m.sms.mem[i].total = gsmi_parse_number(&str); /* Get total memory size */ @@ -746,7 +746,7 @@ gsmi_parse_cpms(const char* str, uint8_t opt) { break; } case 2: { /* Received statement of set info: +CPMS: 10,20,2,20 */ - for (i = 0; i < 3; i++) { /* 3 memories expected */ + for (i = 0; i < 3; ++i) { /* 3 memories expected */ gsm.m.sms.mem[i].used = gsmi_parse_number(&str);/* Get used memory size */ gsm.m.sms.mem[i].total = gsmi_parse_number(&str); /* Get total memory size */ } @@ -815,7 +815,7 @@ gsmi_parse_cpbr(const char* str) { e->type = (gsm_number_type_t)gsmi_parse_number(&str); gsmi_parse_string(&str, e->number, sizeof(e->number), 1); - gsm.msg->msg.pb_list.ei++; + ++gsm.msg->msg.pb_list.ei; if (gsm.msg->msg.pb_list.er != NULL) { *gsm.msg->msg.pb_list.er = gsm.msg->msg.pb_list.ei; } @@ -846,7 +846,7 @@ gsmi_parse_cpbf(const char* str) { e->type = (gsm_number_type_t)gsmi_parse_number(&str); gsmi_parse_string(&str, e->number, sizeof(e->number), 1); - gsm.msg->msg.pb_search.ei++; + ++gsm.msg->msg.pb_search.ei; if (gsm.msg->msg.pb_search.er != NULL) { *gsm.msg->msg.pb_search.er = gsm.msg->msg.pb_search.ei; } @@ -950,7 +950,7 @@ gsmi_parse_ipd(const char* str) { gsm_conn_p c; if (*str == '+') { - str++; + ++str; if (*str == 'R') { str += 8; /* Advance for RECEIVE */ } else { diff --git a/gsm_at_lib/src/gsm/gsm_pbuf.c b/gsm_at_lib/src/gsm/gsm_pbuf.c index 5310ab57..4a37393d 100644 --- a/gsm_at_lib/src/gsm/gsm_pbuf.c +++ b/gsm_at_lib/src/gsm/gsm_pbuf.c @@ -113,7 +113,7 @@ gsm_pbuf_free(gsm_pbuf_p pbuf) { pn = p->next; /* Save next entry */ gsm_mem_free_s((void **)&p); /* Free memory for pbuf */ p = pn; /* Restore with next entry */ - cnt++; /* Increase number of freed pbufs */ + ++cnt; /* Increase number of freed pbufs */ } else { break; } @@ -204,7 +204,7 @@ gsmr_t gsm_pbuf_ref(gsm_pbuf_p pbuf) { GSM_ASSERT("pbuf != NULL", pbuf != NULL); - pbuf->ref++; /* Increase reference count for pbuf */ + ++pbuf->ref; /* Increase reference count for pbuf */ return gsmOK; } @@ -338,7 +338,7 @@ gsm_pbuf_memfind(const gsm_pbuf_p pbuf, const void* needle, size_t len, size_t o * Try entire buffer element by element * and in case we have a match, report it */ - for (size_t i = off; i <= pbuf->tot_len - len; i++) { + for (size_t i = off; i <= pbuf->tot_len - len; ++i) { if (!gsm_pbuf_memcmp(pbuf, needle, len, i)) { /* Check if identical */ return i; /* We have a match! */ } @@ -395,7 +395,7 @@ gsm_pbuf_memcmp(const gsm_pbuf_p pbuf, const void* data, size_t len, size_t offs * * Use byte by byte read function to inspect bytes separatelly */ - for (size_t i = 0; i < len; i++) { + for (size_t i = 0; i < len; ++i) { if (!gsm_pbuf_get_at(p, offset + i, &el) || el != d[i]) { /* Get value from pbuf at specific offset */ return offset + 1; /* Return value from offset where it failed */ } diff --git a/gsm_at_lib/src/gsm/gsm_utils.c b/gsm_at_lib/src/gsm/gsm_utils.c index 6ddd1516..0a67ba37 100644 --- a/gsm_at_lib/src/gsm/gsm_utils.c +++ b/gsm_at_lib/src/gsm/gsm_utils.c @@ -54,7 +54,7 @@ gsm_u32_to_gen_str(uint32_t num, char* out, uint8_t is_hex, uint8_t width) { i = 0; tmp[0] = '0'; if (num == 0) { - i++; + ++i; } else { if (is_hex) { uint8_t mod; @@ -66,20 +66,20 @@ gsm_u32_to_gen_str(uint32_t num, char* out, uint8_t is_hex, uint8_t width) { tmp[i] = mod - 10 + 'A'; } num >>= 4; - i++; + ++i; } } else { while (num > 0) { tmp[i] = (num % 10) + '0'; num /= 10; - i++; + ++i; } } } if (is_hex) { while (i < width) { tmp[i] = '0'; - i++; + ++i; } } tmp[i] = 0; @@ -90,7 +90,7 @@ gsm_u32_to_gen_str(uint32_t num, char* out, uint8_t is_hex, uint8_t width) { char t = out[i - y - 1]; out[i - y - 1] = tmp[y]; tmp[y] = t; - y++; + ++y; } out[i] = 0; return out; diff --git a/gsm_at_lib/src/system/gsm_ll_stm32.c b/gsm_at_lib/src/system/gsm_ll_stm32.c index 9087e765..f25584f2 100644 --- a/gsm_at_lib/src/system/gsm_ll_stm32.c +++ b/gsm_at_lib/src/system/gsm_ll_stm32.c @@ -316,7 +316,7 @@ static size_t send_data(const void* data, size_t len) { const uint8_t* d = data; - for (size_t i = 0; i < len; i++, d++) { + for (size_t i = 0; i < len; ++i, ++d) { LL_USART_TransmitData8(GSM_USART, *d); while (!LL_USART_IsActiveFlag_TXE(GSM_USART)) {} } diff --git a/gsm_at_lib/src/system/gsm_ll_win32.c b/gsm_at_lib/src/system/gsm_ll_win32.c index ebc0e5c7..053be7e9 100644 --- a/gsm_at_lib/src/system/gsm_ll_win32.c +++ b/gsm_at_lib/src/system/gsm_ll_win32.c @@ -62,7 +62,7 @@ send_data(const void* data, size_t len) { hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, FOREGROUND_RED); - for (DWORD i = 0; i < len; i++) { + for (DWORD i = 0; i < len; ++i) { printf("%c", d[i]); } SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); @@ -96,7 +96,7 @@ configure_uart(uint32_t baudrate) { L"\\\\.\\COM8", L"\\\\.\\COM4" }; - for (size_t i = 0; i < sizeof(com_ports) / sizeof(com_ports[0]); i++) { + for (size_t i = 0; i < sizeof(com_ports) / sizeof(com_ports[0]); ++i) { com_port = CreateFile(com_ports[i], GENERIC_READ | GENERIC_WRITE, 0, @@ -173,7 +173,7 @@ uart_thread(void* param) { HANDLE hConsole; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN); - for (DWORD i = 0; i < bytes_read; i++) { + for (DWORD i = 0; i < bytes_read; ++i) { printf("%c", data_buffer[i]); } SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); diff --git a/gsm_at_lib/src/system/gsm_sys_win32.c b/gsm_at_lib/src/system/gsm_sys_win32.c index ea8c68fc..87aa8667 100644 --- a/gsm_at_lib/src/system/gsm_sys_win32.c +++ b/gsm_at_lib/src/system/gsm_sys_win32.c @@ -283,8 +283,7 @@ gsm_sys_mbox_putnow(gsm_sys_mbox_t* b, void* m) { if (mbox->in == mbox->out) { gsm_sys_sem_release(&mbox->sem_not_empty); } - mbox->in++; - if (mbox->in >= mbox->size) { + if (++mbox->in >= mbox->size) { mbox->in = 0; } gsm_sys_sem_release(&mbox->sem); @@ -302,8 +301,7 @@ gsm_sys_mbox_getnow(gsm_sys_mbox_t* b, void** m) { } *m = mbox->entries[mbox->out]; - mbox->out++; - if (mbox->out >= mbox->size) { + if (++mbox->out >= mbox->size) { mbox->out = 0; } gsm_sys_sem_release(&mbox->sem_not_full); /* Queue not full anymore */ From 920cb81fbbbf9aaf10b8e98384401740a946ecbf Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 27 Oct 2019 15:32:20 +0100 Subject: [PATCH 004/115] Use pre-dec instead of post-dec --- gsm_at_lib/src/api/gsm_network_api.c | 2 +- gsm_at_lib/src/gsm/gsm_buff.c | 2 +- gsm_at_lib/src/gsm/gsm_int.c | 2 +- gsm_at_lib/src/gsm/gsm_parser.c | 2 +- gsm_at_lib/src/gsm/gsm_unicode.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gsm_at_lib/src/api/gsm_network_api.c b/gsm_at_lib/src/api/gsm_network_api.c index 19c04e96..3ec97fd3 100644 --- a/gsm_at_lib/src/api/gsm_network_api.c +++ b/gsm_at_lib/src/api/gsm_network_api.c @@ -103,7 +103,7 @@ gsm_network_request_detach(void) { /* Check if we need to disconnect */ gsm_core_lock(); if (network_counter > 0) { - network_counter--; + --network_counter; if (network_counter == 0) { do_disconn = 1; } diff --git a/gsm_at_lib/src/gsm/gsm_buff.c b/gsm_at_lib/src/gsm/gsm_buff.c index b728f405..73273110 100644 --- a/gsm_at_lib/src/gsm/gsm_buff.c +++ b/gsm_at_lib/src/gsm/gsm_buff.c @@ -388,7 +388,7 @@ BUF_PREF(buff_get_linear_block_write_length)(BUF_PREF(buff_t)* buff) { * - If r is not 0, statement does not get called * - buff->size cannot be 0 and if r is 0, len is greater 0 */ - len--; + --len; } } else { len = r - w - 1; diff --git a/gsm_at_lib/src/gsm/gsm_int.c b/gsm_at_lib/src/gsm/gsm_int.c index 590f2df7..2e2c21a9 100644 --- a/gsm_at_lib/src/gsm/gsm_int.c +++ b/gsm_at_lib/src/gsm/gsm_int.c @@ -1863,7 +1863,7 @@ gsmi_initiate_cmd(gsm_msg_t* msg) { /* Check if we are connected to network */ msg->msg.conn_start.num = 0; /* Start with max value = invalidated */ - for (int16_t i = GSM_CFG_MAX_CONNS - 1; i >= 0; i--) { /* Find available connection */ + for (int16_t i = GSM_CFG_MAX_CONNS - 1; i >= 0; --i) { /* Find available connection */ if (!gsm.m.conns[i].status.f.active) { c = &gsm.m.conns[i]; c->num = GSM_U8(i); diff --git a/gsm_at_lib/src/gsm/gsm_parser.c b/gsm_at_lib/src/gsm/gsm_parser.c index a4011721..17396b92 100644 --- a/gsm_at_lib/src/gsm/gsm_parser.c +++ b/gsm_at_lib/src/gsm/gsm_parser.c @@ -136,7 +136,7 @@ gsmi_parse_string(const char** src, char* dst, size_t dst_len, uint8_t trim) { } i = 0; if (dst_len > 0) { - dst_len--; + --dst_len; } while (*p) { if (*p == '"' && (p[1] == ',' || p[1] == '\r' || p[1] == '\n')) { diff --git a/gsm_at_lib/src/gsm/gsm_unicode.c b/gsm_at_lib/src/gsm/gsm_unicode.c index 3104a6de..36b242b1 100644 --- a/gsm_at_lib/src/gsm/gsm_unicode.c +++ b/gsm_at_lib/src/gsm/gsm_unicode.c @@ -64,7 +64,7 @@ gsmi_unicode_decode(gsm_unicode_t* s, uint8_t c) { s->t = s->r + 1; /* Number of bytes is 1 byte more than remaining in sequence */ return gsmINPROG; /* Return in progress status */ } else if ((c & 0xC0) == 0x80) { /* Next character in sequence */ - s->r--; /* Decrease character */ + --s->r; /* Decrease character */ s->ch[s->t - s->r - 1] = c; /* Save character to array */ if (s->r == 0) { /* Did we finish? */ return gsmOK; /* Return OK, we are ready to proceed */ From 3425dce78c00d88ad4832f9722e16a5d6fafd098 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 27 Oct 2019 22:25:47 +0100 Subject: [PATCH 005/115] Add support for CMSIS OS V2 --- third_party/Embedded_Libs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/Embedded_Libs b/third_party/Embedded_Libs index fc5b3a0d..f74dc34b 160000 --- a/third_party/Embedded_Libs +++ b/third_party/Embedded_Libs @@ -1 +1 @@ -Subproject commit fc5b3a0dc07107c63d3f2e6a5a6d31843b0606ca +Subproject commit f74dc34b472d9bd189f3cdec4f33492c3c1ab465 From efbbef2ad17ad42da9c699304735c3e3015ef9c8 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 27 Oct 2019 23:19:28 +0100 Subject: [PATCH 006/115] Remove specific CMSIS-OS v2 include file and macro --- gsm_at_lib/src/include/system/gsm_sys.h | 3 - .../src/include/system/gsm_sys_cmsis_os2.h | 68 ------------------- 2 files changed, 71 deletions(-) delete mode 100644 gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h diff --git a/gsm_at_lib/src/include/system/gsm_sys.h b/gsm_at_lib/src/include/system/gsm_sys.h index 36f275fc..38262d0a 100644 --- a/gsm_at_lib/src/include/system/gsm_sys.h +++ b/gsm_at_lib/src/include/system/gsm_sys.h @@ -63,7 +63,6 @@ typedef void (*gsm_sys_thread_fn)(void *); #define GSM_SYS_PORT_CMSIS_OS 1 /*!< CMSIS-OS based port for OS systems capable of ARM CMSIS standard */ #define GSM_SYS_PORT_WIN32 2 /*!< WIN32 based port to use GSM library with Windows applications */ -#define GSM_SYS_PORT_CMSIS_OS2 3 /*!< CMSIS-OS v2 based port for OS systems capable of ARM CMSIS standard */ #define GSM_SYS_PORT_USER 99 /*!< User custom implementation. When port is selected to user mode, user must provide "gsm_sys_user.h" file, which is not provided with library. Refer to `system/gsm_sys_template.h` file for more information @@ -76,8 +75,6 @@ typedef void (*gsm_sys_thread_fn)(void *); /* Decide which port to include */ #if GSM_CFG_SYS_PORT == GSM_SYS_PORT_CMSIS_OS #include "system/gsm_sys_cmsis_os.h" -#elif ESP_CFG_SYS_PORT == GSM_SYS_PORT_CMSIS_OS2 -#include "system/esp_sys_cmsis_os2.h" #elif GSM_CFG_SYS_PORT == GSM_SYS_PORT_WIN32 #include "system/gsm_sys_win32.h" #elif GSM_CFG_SYS_PORT == GSM_SYS_PORT_USER diff --git a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h b/gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h deleted file mode 100644 index 8bb1c96e..00000000 --- a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os2.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * \file gsm_sys_cmsis_os2.h - * \brief CMSIS-OS V2 based system file - */ - -/* - * Copyright (c) 2019 Tilen MAJERLE - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * This file is part of GSM-AT library. - * - * Author: Tilen MAJERLE - * Version: $_version_$ - */ -#ifndef GSM_HDR_SYSTEM_CMSIS_OS2_H -#define GSM_HDR_SYSTEM_CMSIS_OS2_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include -#include - -#include "gsm_config.h" - -#if GSM_CFG_OS && !__DOXYGEN__ - -#include "cmsis_os2.h" - -typedef osMutexId_t gsm_sys_mutex_t; -typedef osSemaphoreId_t gsm_sys_sem_t; -typedef osMessageQueueId_t gsm_sys_mbox_t; -typedef osThreadId_t gsm_sys_thread_t; -typedef osPriority_t gsm_sys_thread_prio_t; -#define GSM_SYS_MBOX_NULL (gsm_sys_mbox_t)0 -#define GSM_SYS_SEM_NULL (gsm_sys_sem_t)0 -#define GSM_SYS_MUTEX_NULL (gsm_sys_mutex_t)0 -#define GSM_SYS_TIMEOUT ((uint32_t)osWaitForever) -#define GSM_SYS_THREAD_PRIO (osPriorityNormal) -#define GSM_SYS_THREAD_SS (256) - -#endif /* GSM_CFG_OS && !__DOXYGEN__ */ - -#ifdef __cplusplus -}; -#endif /* __cplusplus */ - -#endif /* GSM_HDR_SYSTEM_CMSIS_OS2_H */ From f7ba821e8f5c3d00933350052fcc0f74f718efb9 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 27 Oct 2019 23:21:16 +0100 Subject: [PATCH 007/115] Default CMSIS OS is now V2 --- .../src/include/system/gsm_sys_cmsis_os.h | 18 ++-- gsm_at_lib/src/system/gsm_ll_stm32.c | 28 +++-- gsm_at_lib/src/system/gsm_sys_cmsis_os.c | 101 ++++++++---------- 3 files changed, 67 insertions(+), 80 deletions(-) diff --git a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h b/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h index 8b802d75..025a3a72 100644 --- a/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h +++ b/gsm_at_lib/src/include/system/gsm_sys_cmsis_os.h @@ -1,6 +1,6 @@ /** * \file gsm_sys_cmsis_os.h - * \brief CMSIS-OS based system file + * \brief System dependent functions for CMSIS-OS based operating system */ /* @@ -47,14 +47,14 @@ extern "C" { #if GSM_CFG_OS && !__DOXYGEN__ #include "cmsis_os.h" -typedef osMutexId gsm_sys_mutex_t; -typedef osSemaphoreId gsm_sys_sem_t; -typedef osMessageQId gsm_sys_mbox_t; -typedef osThreadId gsm_sys_thread_t; -typedef osPriority gsm_sys_thread_prio_t; -#define GSM_SYS_MBOX_NULL (gsm_sys_mbox_t)0 -#define GSM_SYS_SEM_NULL (gsm_sys_sem_t)0 -#define GSM_SYS_MUTEX_NULL (gsm_sys_mutex_t)0 +typedef osMutexId_t gsm_sys_mutex_t; +typedef osSemaphoreId_t gsm_sys_sem_t; +typedef osMessageQueueId_t gsm_sys_mbox_t; +typedef osThreadId_t gsm_sys_thread_t; +typedef osPriority_t gsm_sys_thread_prio_t; +#define GSM_SYS_MBOX_NULL ((gsm_sys_mbox_t)NULL) +#define GSM_SYS_SEM_NULL ((gsm_sys_sem_t)NULL) +#define GSM_SYS_MUTEX_NULL ((gsm_sys_mutex_t)NULL) #define GSM_SYS_TIMEOUT ((uint32_t)osWaitForever) #define GSM_SYS_THREAD_PRIO (osPriorityNormal) #define GSM_SYS_THREAD_SS (512) diff --git a/gsm_at_lib/src/system/gsm_ll_stm32.c b/gsm_at_lib/src/system/gsm_ll_stm32.c index f25584f2..cd4ddea5 100644 --- a/gsm_at_lib/src/system/gsm_ll_stm32.c +++ b/gsm_at_lib/src/system/gsm_ll_stm32.c @@ -72,31 +72,26 @@ static uint8_t is_running, initialized; static size_t old_pos; /* USART thread */ -static void usart_ll_thread(void const * arg); -static osThreadDef(usart_ll_thread, usart_ll_thread, osPriorityNormal, 0, 1024); +static void usart_ll_thread(void* arg); static osThreadId usart_ll_thread_id; /* Message queue */ -static osMessageQDef(usart_ll_mbox, 10, uint8_t); static osMessageQId usart_ll_mbox_id; /** * \brief USART data processing */ static void -usart_ll_thread(void const * arg) { - osEvent evt; - size_t pos; +usart_ll_thread(void* arg) { static size_t old_pos; + size_t pos; GSM_UNUSED(arg); while (1) { + void* d; /* Wait for the event message from DMA or USART */ - evt = osMessageGet(usart_ll_mbox_id, osWaitForever); - if (evt.status != osEventMessage) { - continue; - } + osMessageQueueGet(usart_ll_mbox_id, &d, NULL, osWaitForever); /* Read data */ #if defined(GSM_USART_DMA_RX_STREAM) @@ -284,10 +279,13 @@ configure_uart(uint32_t baudrate) { /* Create mbox and start thread */ if (usart_ll_mbox_id == NULL) { - usart_ll_mbox_id = osMessageCreate(osMessageQ(usart_ll_mbox), NULL); + usart_ll_mbox_id = osMessageQueueNew(10, sizeof(void *), NULL); } if (usart_ll_thread_id == NULL) { - usart_ll_thread_id = osThreadCreate(osThread(usart_ll_thread), usart_ll_mbox_id); + const osThreadAttr_t attr = { + .stack_size = 1024 + }; + usart_ll_thread_id = osThreadNew(usart_ll_thread, usart_ll_mbox_id, &attr); } } @@ -365,7 +363,7 @@ gsm_ll_deinit(gsm_ll_t* ll) { if (usart_ll_mbox_id != NULL) { osMessageQId tmp = usart_ll_mbox_id; usart_ll_mbox_id = NULL; - osMessageDelete(tmp); + osMessageQueueDelete(tmp); } if (usart_ll_thread_id != NULL) { osThreadId tmp = usart_ll_thread_id; @@ -389,7 +387,7 @@ GSM_USART_IRQHANDLER(void) { LL_USART_ClearFlag_NE(GSM_USART); if (usart_ll_mbox_id != NULL) { - osMessagePut(usart_ll_mbox_id, 0, 0); + osMessageQueuePut(usart_ll_mbox_id, (void *)1, 0, 0); } } @@ -402,7 +400,7 @@ GSM_USART_DMA_RX_IRQHANDLER(void) { GSM_USART_DMA_RX_CLEAR_HT; if (usart_ll_mbox_id != NULL) { - osMessagePut(usart_ll_mbox_id, 0, 0); + osMessageQueuePut(usart_ll_mbox_id, (void *)1, 0, 0); } } diff --git a/gsm_at_lib/src/system/gsm_sys_cmsis_os.c b/gsm_at_lib/src/system/gsm_sys_cmsis_os.c index f5afb9aa..4e9336e4 100644 --- a/gsm_at_lib/src/system/gsm_sys_cmsis_os.c +++ b/gsm_at_lib/src/system/gsm_sys_cmsis_os.c @@ -1,6 +1,6 @@ /** * \file gsm_sys_cmsis_os.c - * \brief System dependant functions for STM32 MCU with CMSIS OS + * \brief System dependent functions for CMSIS-OS based operating system */ /* @@ -36,151 +36,131 @@ #if !__DOXYGEN__ -static osMutexId sys_mutex; /* Mutex ID for main protection */ +static osMutexId_t sys_mutex; uint8_t gsm_sys_init(void) { - gsm_sys_mutex_create(&sys_mutex); /* Create system mutex */ + gsm_sys_mutex_create(&sys_mutex); return 1; } uint32_t gsm_sys_now(void) { - return osKernelSysTick(); /* Get current tick in units of milliseconds */ + return osKernelSysTick(); } uint8_t gsm_sys_protect(void) { - gsm_sys_mutex_lock(&sys_mutex); /* Lock system and protect it */ + gsm_sys_mutex_lock(&sys_mutex); return 1; } uint8_t gsm_sys_unprotect(void) { - gsm_sys_mutex_unlock(&sys_mutex); /* Release lock */ + gsm_sys_mutex_unlock(&sys_mutex); return 1; } uint8_t gsm_sys_mutex_create(gsm_sys_mutex_t* p) { - osMutexDef(MUT); /* Define a mutex */ - *p = osRecursiveMutexCreate(osMutex(MUT)); /* Create recursive mutex */ - return *p != NULL; /* Return status */ + const osMutexAttr_t attr = { + .attr_bits = osMutexRecursive + }; + *p = osMutexNew(&attr); + return *p != NULL; } uint8_t gsm_sys_mutex_delete(gsm_sys_mutex_t* p) { - return osMutexDelete(*p) == osOK; /* Delete mutex */ + return osMutexDelete(*p) == osOK; } uint8_t gsm_sys_mutex_lock(gsm_sys_mutex_t* p) { - return osRecursiveMutexWait(*p, osWaitForever) == osOK; /* Wait forever for mutex */ + return osMutexAcquire(*p, osWaitForever) == osOK; } uint8_t gsm_sys_mutex_unlock(gsm_sys_mutex_t* p) { - return osRecursiveMutexRelease(*p) == osOK; /* Release mutex */ + return osMutexRelease(*p) == osOK; } uint8_t gsm_sys_mutex_isvalid(gsm_sys_mutex_t* p) { - return p != NULL && *p != NULL; /* Check if mutex is valid */ + return p != NULL && *p != NULL; } uint8_t gsm_sys_mutex_invalid(gsm_sys_mutex_t* p) { - *p = GSM_SYS_MUTEX_NULL; /* Set mutex as invalid */ + *p = GSM_SYS_MUTEX_NULL; return 1; } uint8_t gsm_sys_sem_create(gsm_sys_sem_t* p, uint8_t cnt) { - osSemaphoreDef(SEM); /* Define semaphore info */ - *p = osSemaphoreCreate(osSemaphore(SEM), 1);/* Create semaphore with one token */ - - if (*p != NULL && !cnt) { /* We have valid entry */ - osSemaphoreWait(*p, 0); /* Lock semaphore immediatelly */ - } - return *p != NULL; + return (*p = osSemaphoreNew(1, cnt > 0 ? 1 : 0, NULL)) != NULL; } uint8_t gsm_sys_sem_delete(gsm_sys_sem_t* p) { - return osSemaphoreDelete(*p) == osOK; /* Delete semaphore */ + return osSemaphoreDelete(*p) == osOK; } uint32_t gsm_sys_sem_wait(gsm_sys_sem_t* p, uint32_t timeout) { - uint32_t tick = osKernelSysTick(); /* Get start tick time */ - return (osSemaphoreWait(*p, !timeout ? osWaitForever : timeout) == osOK) ? (osKernelSysTick() - tick) : GSM_SYS_TIMEOUT; /* Wait for semaphore with specific time */ + uint32_t tick = osKernelSysTick(); + return (osSemaphoreAcquire(*p, timeout == 0 ? osWaitForever : timeout) == osOK) ? (osKernelSysTick() - tick) : GSM_SYS_TIMEOUT; } uint8_t gsm_sys_sem_release(gsm_sys_sem_t* p) { - return osSemaphoreRelease(*p) == osOK; /* Release semaphore */ + return osSemaphoreRelease(*p) == osOK; } uint8_t gsm_sys_sem_isvalid(gsm_sys_sem_t* p) { - return p != NULL && *p != NULL; /* Check if valid */ + return p != NULL && *p != NULL; } uint8_t gsm_sys_sem_invalid(gsm_sys_sem_t* p) { - *p = GSM_SYS_SEM_NULL; /* Invaldiate semaphore */ + *p = GSM_SYS_SEM_NULL; return 1; } uint8_t gsm_sys_mbox_create(gsm_sys_mbox_t* b, size_t size) { - osMessageQDef(MBOX, size, void *); /* Define message box */ - *b = osMessageCreate(osMessageQ(MBOX), NULL); /* Create message box */ - return *b != NULL; + return (*b = osMessageQueueNew(size, sizeof(void *), NULL)) != NULL; } uint8_t gsm_sys_mbox_delete(gsm_sys_mbox_t* b) { - if (osMessageWaiting(*b)) { /* We still have messages in queue, should not delete queue */ - return 0; /* Return error as we still have entries in message queue */ + if (osMessageQueueGetCount(*b) > 0) { + return 0; } - return osMessageDelete(*b) == osOK; /* Delete message queue */ + return osMessageQueueDelete(*b) == osOK; } uint32_t gsm_sys_mbox_put(gsm_sys_mbox_t* b, void* m) { - uint32_t tick = osKernelSysTick(); /* Get start time */ - return osMessagePut(*b, (uint32_t)m, osWaitForever) == osOK ? (osKernelSysTick() - tick) : GSM_SYS_TIMEOUT; /* Put new message with forever timeout */ + uint32_t tick = osKernelSysTick(); + return osMessageQueuePut(*b, m, 0, osWaitForever) == osOK ? (osKernelSysTick() - tick) : GSM_SYS_TIMEOUT; } uint32_t gsm_sys_mbox_get(gsm_sys_mbox_t* b, void** m, uint32_t timeout) { - osEvent evt; - uint32_t time = osKernelSysTick(); /* Get current time */ - - evt = osMessageGet(*b, !timeout ? osWaitForever : timeout); /* Get message event */ - if (evt.status == osEventMessage) { /* Did we get a message? */ - *m = evt.value.p; /* Set value */ - return osKernelSysTick() - time; /* Return time required for reading message */ - } - return GSM_SYS_TIMEOUT; + uint32_t tick = osKernelSysTick(); + return osMessageQueueGet(*b, m, NULL, timeout == 0 ? osWaitForever : timeout) == osOK ? (osKernelSysTick() - tick) : GSM_SYS_TIMEOUT; } uint8_t gsm_sys_mbox_putnow(gsm_sys_mbox_t* b, void* m) { - return osMessagePut(*b, (uint32_t)m, 0) == osOK; /* Put new message without timeout */ + return osMessageQueuePut(*b, m, 0, 0) == osOK; /* Put new message without timeout */ } uint8_t gsm_sys_mbox_getnow(gsm_sys_mbox_t* b, void** m) { - osEvent evt; - - evt = osMessageGet(*b, 0); /* Get message event */ - if (evt.status == osEventMessage) { /* Did we get a message? */ - *m = evt.value.p; /* Set value */ - return 1; - } - return 0; + return osMessageQueueGet(*b, m, NULL, 0) == osOK; } uint8_t @@ -197,8 +177,13 @@ gsm_sys_mbox_invalid(gsm_sys_mbox_t* b) { uint8_t gsm_sys_thread_create(gsm_sys_thread_t* t, const char* name, gsm_sys_thread_fn thread_func, void* const arg, size_t stack_size, gsm_sys_thread_prio_t prio) { gsm_sys_thread_t id; - const osThreadDef_t thread_def = {(char *)name, (os_pthread)thread_func, (osPriority)prio, 0, stack_size ? stack_size : GSM_SYS_THREAD_SS }; /* Create thread description */ - id = osThreadCreate(&thread_def, arg); /* Create thread */ + const osThreadAttr_t thread_attr = { + .name = (char *)name, + .priority = (osPriority)prio, + .stack_size = stack_size ? stack_size : GSM_SYS_THREAD_SS + }; + + id = osThreadNew(thread_func, arg, &thread_attr); if (t != NULL) { *t = id; } @@ -207,7 +192,11 @@ gsm_sys_thread_create(gsm_sys_thread_t* t, const char* name, gsm_sys_thread_fn t uint8_t gsm_sys_thread_terminate(gsm_sys_thread_t* t) { - osThreadTerminate(t != NULL ? *t : NULL); /* Terminate thread */ + if (t != NULL) { + osThreadTerminate(*t); + } else { + osThreadExit(); /* Exit itself */ + } return 1; } From 660d3b6f3540329af914f54495647a8ecc6ca19f Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 27 Oct 2019 23:21:30 +0100 Subject: [PATCH 008/115] Migrate examples to CMSIS-OS V2 --- .../STM32CubeIDE/.cproject | 2 +- .../STM32CubeIDE/.project | 9 +-- .../inc/FreeRTOSConfig.h | 74 +++++++++---------- .../src/main.c | 14 ++-- .../src/stm32f4xx_it.c | 3 +- .../STM32CubeIDE/.cproject | 2 +- .../STM32CubeIDE/.project | 9 +-- .../inc/FreeRTOSConfig.h | 74 +++++++++---------- .../src/main.c | 14 ++-- .../src/stm32f4xx_it.c | 3 +- .../STM32CubeIDE/.cproject | 2 +- .../STM32CubeIDE/.project | 9 +-- .../inc/FreeRTOSConfig.h | 74 +++++++++---------- .../src/main.c | 14 ++-- .../src/stm32f4xx_it.c | 3 +- .../STM32CubeIDE/.cproject | 2 +- .../STM32CubeIDE/.project | 9 +-- .../inc/FreeRTOSConfig.h | 74 +++++++++---------- .../src/main.c | 14 ++-- .../src/stm32f4xx_it.c | 3 +- 20 files changed, 196 insertions(+), 212 deletions(-) diff --git a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/STM32CubeIDE/.cproject b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/STM32CubeIDE/.cproject index 35078b20..5f8e214a 100644 --- a/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/STM32CubeIDE/.cproject +++ b/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/STM32CubeIDE/.cproject @@ -41,7 +41,7 @@