diff --git a/application/sim800_testing/Makefile b/application/sim800_testing/Makefile index b73bed2..f6b77d5 100644 --- a/application/sim800_testing/Makefile +++ b/application/sim800_testing/Makefile @@ -13,6 +13,7 @@ DISPLAY_USED := blank SD_VER := 6.0.0 CONFIG_HEADER := 0 SHARED_RESOURCES := 0 +AT_MOD_USED := SIM800 SDK_DIR = ../../SDK_components DOC_DIR = ../../doc @@ -53,11 +54,11 @@ C_SRC += hal_uart.c tinyprintf.c else endif C_SRC += hal_uarte.c tinyprintf.c -C_SRC += AT_proc.c sim800_oper.c +#C_SRC += AT_proc.c sim800_oper.c -ifneq ($(DISPLAY_USED), blank) -DISPLAY_DIR = $(CODEBASE_DIR)/display_lib -include $(DISPLAY_DIR)/Makefile.display +ifneq ($(AT_MOD_USED), blank) +AT_DIR = $(CODEBASE_DIR)/AT_lib +include $(AT_DIR)/Makefile.AT endif #Gets the name of the application folder diff --git a/application/sim800_testing/AT_proc.c b/codebase/AT_lib/AT_proc.c similarity index 99% rename from application/sim800_testing/AT_proc.c rename to codebase/AT_lib/AT_proc.c index c0d3534..6bc6ee2 100644 --- a/application/sim800_testing/AT_proc.c +++ b/codebase/AT_lib/AT_proc.c @@ -358,7 +358,7 @@ void AT_proc_add_ticks (uint32_t ticks) { { g_current_status = CMD_RUNNING; - /** uncomment this if UART is being disabled after command execution is done */ + // uncomment this if UART is being disabled after command execution is done //hal_uarte_start_rx (collect_rsp); hal_uarte_puts (g_arr_cmd, g_cmd_len); } diff --git a/application/sim800_testing/AT_proc.h b/codebase/AT_lib/AT_proc.h similarity index 91% rename from application/sim800_testing/AT_proc.h rename to codebase/AT_lib/AT_proc.h index ab1d75e..8794dfd 100644 --- a/application/sim800_testing/AT_proc.h +++ b/codebase/AT_lib/AT_proc.h @@ -16,6 +16,17 @@ * along with this program. If not, see . */ +/** + * @addtogroup group_at_lib + * @{ + * + * @defgroup group_at_proc AT Process + * @brief Driver to Process AT commands using hal_uarte module + * + * @warning This module needs the device_tick and to be on and running to be able to work + * @note This module uses UARTE peripheral. So developer can't use uart prints for debugging + * @{ + */ #ifndef AT_PROC_H #define AT_PROC_H @@ -138,7 +149,7 @@ void AT_proc_process (); /** * @brief Function to check if AT command process module is busy * @return 1 if module is executing some AT command - * 0 if module is available + * @return 0 if module is available */ uint8_t AT_proc_is_busy (); @@ -157,3 +168,7 @@ void AT_proc_repeat_last_cmd (); void AT_proc_send_cmd_no_rsp (uint8_t * cmd, uint32_t len, uint32_t duration); #endif /* AT_PROC_H */ +/** + * @} + * @} + */ diff --git a/codebase/AT_lib/Makefile.AT b/codebase/AT_lib/Makefile.AT new file mode 100644 index 0000000..eecc727 --- /dev/null +++ b/codebase/AT_lib/Makefile.AT @@ -0,0 +1,7 @@ +INCLUDEDIRS += $(AT_DIR) +C_SRC_DIRS += $(AT_DIR) +C_SRC += AT_proc.c +ifeq ($(AT_MOD_USED), SIM800) +C_SRC += sim800_oper.c +endif + diff --git a/codebase/AT_lib/defgroup_peripheral_modules.txt b/codebase/AT_lib/defgroup_peripheral_modules.txt new file mode 100644 index 0000000..c421942 --- /dev/null +++ b/codebase/AT_lib/defgroup_peripheral_modules.txt @@ -0,0 +1,9 @@ +/** +* @addtogroup group_codebase +* @{ +* @defgroup group_at_lib AT Library +* @brief Library to handle all the modules which runs in AT commands +* @{ +*/ +/** @} */ +/** @} */ diff --git a/application/sim800_testing/sim800_cmd_id.h b/codebase/AT_lib/sim800_cmd_id.h similarity index 100% rename from application/sim800_testing/sim800_cmd_id.h rename to codebase/AT_lib/sim800_cmd_id.h diff --git a/application/sim800_testing/sim800_oper.c b/codebase/AT_lib/sim800_oper.c similarity index 100% rename from application/sim800_testing/sim800_oper.c rename to codebase/AT_lib/sim800_oper.c diff --git a/application/sim800_testing/sim800_oper.h b/codebase/AT_lib/sim800_oper.h similarity index 94% rename from application/sim800_testing/sim800_oper.h rename to codebase/AT_lib/sim800_oper.h index 9d63737..62fe631 100644 --- a/application/sim800_testing/sim800_oper.h +++ b/codebase/AT_lib/sim800_oper.h @@ -16,6 +16,16 @@ * along with this program. If not, see . */ +/** + * @addtogroup group_at_lib + * @{ + * + * @defgroup group_sim800 SIM800 Operations + * @brief Driver to use SIM800 module using the AT Process + * + * @warning This module needs the device_tick to be on and running to be able to work + * @{ + */ #ifndef SIM800_OPER_H #define SIM800_OPER_H @@ -174,3 +184,7 @@ sim800_conn_status_t sim800_oper_get_server_status (uint32_t server_id); #endif /* SIM800_OPER_H */ +/** + * @} + * @} + */