Skip to content

Commit

Permalink
Convert AT_proc and sim800_oper files into AT_Lib
Browse files Browse the repository at this point in the history
Signed-off-by: Tejas Vasekar <[email protected]>
  • Loading branch information
tejas-tj committed Apr 21, 2020
1 parent ea01d23 commit 7855dee
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 6 deletions.
9 changes: 5 additions & 4 deletions application/sim800_testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/**
* @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
Expand Down Expand Up @@ -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 ();

Expand All @@ -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 */
/**
* @}
* @}
*/
7 changes: 7 additions & 0 deletions codebase/AT_lib/Makefile.AT
Original file line number Diff line number Diff line change
@@ -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

9 changes: 9 additions & 0 deletions codebase/AT_lib/defgroup_peripheral_modules.txt
Original file line number Diff line number Diff line change
@@ -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
* @{
*/
/** @} */
/** @} */
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/**
* @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
Expand Down Expand Up @@ -174,3 +184,7 @@ sim800_conn_status_t sim800_oper_get_server_status (uint32_t server_id);


#endif /* SIM800_OPER_H */
/**
* @}
* @}
*/

0 comments on commit 7855dee

Please sign in to comment.