-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathat_demo.c
More file actions
62 lines (55 loc) · 2.22 KB
/
Copy pathat_demo.c
File metadata and controls
62 lines (55 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*****************************************************************/ /**
* @file at_demo.c
* @brief
* @author larson.li@quectel.com
* @date 2025-05-14
*
* @copyright Copyright (c) 2023 Quectel Wireless Solution, Co., Ltd.
* All Rights Reserved. Quectel Wireless Solution Proprietary and Confidential.
*
* @par EDIT HISTORY FOR MODULE
* <table>
* <tr><th>Date <th>Version <th>Author <th>Description"
* <tr><td>2023-06-13 <td>1.0 <td>Larson.Li <td> Init
* </table>
**********************************************************************/
#include "qosa_sys.h"
#include "qosa_def.h"
#include "qosa_log.h"
#include "qosa_at_cmd.h"
#include "at_demo.h"
#include "at_def.h"
#include "unirtos_app_init_registry.h"
#include <stdlib.h>
#include <string.h>
/*===========================================================================
* Macro Definition
===========================================================================*/
#define QOS_LOG_TAG LOG_TAG
/*===========================================================================
* Variate
===========================================================================*/
static qosa_task_t g_unir_at_demo_task = QOSA_NULL;
/*===========================================================================
* Static API Functions
===========================================================================*/
extern void unir_at_cmd_demo_init(void);
static void unir_at_demo_process(void *ctx)
{
// Load and register ATCMD table, all user AT commands can be placed in one table, do not create multiple tables
qosa_at_parser_add_cust_at((const qosa_at_desc_t *)unir_examples_at_desc, QOSA_ARRAY_SIZE(unir_examples_at_desc));
// Example AT initialization
unir_at_cmd_demo_init();
}
/*===========================================================================
* Public API Functions
===========================================================================*/
void unir_at_demo_init(void)
{
QLOGV("enter UniRTOS at DEMO !!!");
if (g_unir_at_demo_task == QOSA_NULL)
{
qosa_task_create(&g_unir_at_demo_task, CONFIG_UNIRTOS_AT_DEMO_TASK_STACK_SIZE, UNIR_AT_DEMO_TASK_PRIO, "at_demo", unir_at_demo_process, QOSA_NULL, 1);
}
}
UNIRTOS_APP_EXPORT(130, "at_demo", unir_at_demo_init);