Skip to content

Commit 7855dee

Browse files
committed
Convert AT_proc and sim800_oper files into AT_Lib
Signed-off-by: Tejas Vasekar <tsvasekar@gmail.com>
1 parent ea01d23 commit 7855dee

8 files changed

Lines changed: 52 additions & 6 deletions

File tree

application/sim800_testing/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ DISPLAY_USED := blank
1313
SD_VER := 6.0.0
1414
CONFIG_HEADER := 0
1515
SHARED_RESOURCES := 0
16+
AT_MOD_USED := SIM800
1617

1718
SDK_DIR = ../../SDK_components
1819
DOC_DIR = ../../doc
@@ -53,11 +54,11 @@ C_SRC += hal_uart.c tinyprintf.c
5354
else
5455
endif
5556
C_SRC += hal_uarte.c tinyprintf.c
56-
C_SRC += AT_proc.c sim800_oper.c
57+
#C_SRC += AT_proc.c sim800_oper.c
5758

58-
ifneq ($(DISPLAY_USED), blank)
59-
DISPLAY_DIR = $(CODEBASE_DIR)/display_lib
60-
include $(DISPLAY_DIR)/Makefile.display
59+
ifneq ($(AT_MOD_USED), blank)
60+
AT_DIR = $(CODEBASE_DIR)/AT_lib
61+
include $(AT_DIR)/Makefile.AT
6162
endif
6263

6364
#Gets the name of the application folder
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ void AT_proc_add_ticks (uint32_t ticks)
358358
{
359359
{
360360
g_current_status = CMD_RUNNING;
361-
/** uncomment this if UART is being disabled after command execution is done */
361+
// uncomment this if UART is being disabled after command execution is done
362362
//hal_uarte_start_rx (collect_rsp);
363363
hal_uarte_puts (g_arr_cmd, g_cmd_len);
364364
}
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
1818

19+
/**
20+
* @addtogroup group_at_lib
21+
* @{
22+
*
23+
* @defgroup group_at_proc AT Process
24+
* @brief Driver to Process AT commands using hal_uarte module
25+
*
26+
* @warning This module needs the device_tick and to be on and running to be able to work
27+
* @note This module uses UARTE peripheral. So developer can't use uart prints for debugging
28+
* @{
29+
*/
1930

2031
#ifndef AT_PROC_H
2132
#define AT_PROC_H
@@ -138,7 +149,7 @@ void AT_proc_process ();
138149
/**
139150
* @brief Function to check if AT command process module is busy
140151
* @return 1 if module is executing some AT command
141-
* 0 if module is available
152+
* @return 0 if module is available
142153
*/
143154
uint8_t AT_proc_is_busy ();
144155

@@ -157,3 +168,7 @@ void AT_proc_repeat_last_cmd ();
157168
void AT_proc_send_cmd_no_rsp (uint8_t * cmd, uint32_t len, uint32_t duration);
158169

159170
#endif /* AT_PROC_H */
171+
/**
172+
* @}
173+
* @}
174+
*/

codebase/AT_lib/Makefile.AT

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
INCLUDEDIRS += $(AT_DIR)
2+
C_SRC_DIRS += $(AT_DIR)
3+
C_SRC += AT_proc.c
4+
ifeq ($(AT_MOD_USED), SIM800)
5+
C_SRC += sim800_oper.c
6+
endif
7+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @addtogroup group_codebase
3+
* @{
4+
* @defgroup group_at_lib AT Library
5+
* @brief Library to handle all the modules which runs in AT commands
6+
* @{
7+
*/
8+
/** @} */
9+
/** @} */
File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
1818

19+
/**
20+
* @addtogroup group_at_lib
21+
* @{
22+
*
23+
* @defgroup group_sim800 SIM800 Operations
24+
* @brief Driver to use SIM800 module using the AT Process
25+
*
26+
* @warning This module needs the device_tick to be on and running to be able to work
27+
* @{
28+
*/
1929

2030
#ifndef SIM800_OPER_H
2131
#define SIM800_OPER_H
@@ -174,3 +184,7 @@ sim800_conn_status_t sim800_oper_get_server_status (uint32_t server_id);
174184

175185

176186
#endif /* SIM800_OPER_H */
187+
/**
188+
* @}
189+
* @}
190+
*/

0 commit comments

Comments
 (0)