13 |
14 | ## Features
15 |
16 | - Supports latest ESP32 & ESP8266 RTOS-SDK based AT commands firmware
17 | - Platform independent and very easy to port
18 | - Development of library under Win32 platform
19 | - Available examples for ARM Cortex-M or Win32 platforms
20 | - Written in C language (C99)
21 | - Allows different configurations to optimize user requirements
22 | - Supports implementation with operating systems with advanced inter-thread communications
23 | - Uses `2` tasks for data handling from user and device
24 | - Includes several applications built on top of library
25 | - Netconn sequential API for client and server
26 | - HTTP server with dynamic files (file system) supported
27 | - MQTT client
28 | - Embeds other AT features, such as WPS management, custom DNS setup, Hostname for DHCP, Ping feature
29 | - User friendly MIT license
30 |
31 | ## Contribute
32 |
33 | Fresh contributions are always welcome. Simple instructions to proceed::
34 |
35 | 1. Fork Github repository
36 | 2. Respect [C style & coding rules](https://github.com/MaJerle/c-code-style) used by the library
37 | 3. Create a pull request to develop branch with new features or bug fixes
38 |
39 | Alternatively you may:
40 |
41 | 1. Report a bug
42 | 2. Ask for a feature request
43 |
--------------------------------------------------------------------------------
/dev/VisualStudio/esp_at_lib_dev.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.28803.452
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esp_at_lib_dev", "esp_at_lib_dev.vcxproj", "{5D881BA7-6232-4F33-B72F-0BB5DFF2A575}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Debug|x64.ActiveCfg = Debug|Win32
17 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Debug|x64.Build.0 = Debug|Win32
18 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Debug|x86.ActiveCfg = Debug|Win32
19 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Debug|x86.Build.0 = Debug|Win32
20 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Release|x64.ActiveCfg = Release|x64
21 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Release|x64.Build.0 = Release|x64
22 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Release|x86.ActiveCfg = Release|Win32
23 | {5D881BA7-6232-4F33-B72F-0BB5DFF2A575}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {7915554A-0FB0-4F8A-9B80-404D9FCDBB34}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/dev/VisualStudio/lwmem_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file lwmem_config.h
3 | * \brief LwMEM configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of LwMEM - Lightweight dynamic memory manager library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef LWMEM_HDR_CONFIG_H
35 | #define LWMEM_HDR_CONFIG_H
36 |
37 | /* Rename this file to "lwmem_config.h" for your application */
38 |
39 | #include "windows.h"
40 |
41 | /*
42 | * Open "include/lwmem/lwmem_config_default.h" and
43 | * copy & replace here settings you want to change values
44 | */
45 | #define LWMEM_CFG_OS 1
46 | #define LWMEM_CFG_OS_MUTEX_HANDLE HANDLE
47 |
48 | /* After user configuration, call default config to merge config together */
49 | #include "lwmem/lwmem_config_default.h"
50 |
51 | #endif /* LWMEM_HDR_CONFIG_H */
52 |
--------------------------------------------------------------------------------
/docs/4a-esp8266_at_instruction_set_en.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/4a-esp8266_at_instruction_set_en.pdf
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/docs/api-reference/apps/cayenne_api.rst:
--------------------------------------------------------------------------------
1 | .. _api_app_cayenne_api:
2 |
3 | Cayenne MQTT API
4 | ================
5 |
6 | .. doxygengroup:: ESP_APP_CAYENNE_API
--------------------------------------------------------------------------------
/docs/api-reference/apps/http_server.rst:
--------------------------------------------------------------------------------
1 | .. _api_app_http_server:
2 |
3 | HTTP Server
4 | ===========
5 |
6 | .. doxygengroup:: ESP_APP_HTTP_SERVER
7 | .. doxygengroup:: ESP_APP_HTTP_SERVER_FS_FAT
--------------------------------------------------------------------------------
/docs/api-reference/apps/index.rst:
--------------------------------------------------------------------------------
1 | .. _api_apps:
2 |
3 | Applications
4 | ============
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 | :glob:
9 |
10 | *
--------------------------------------------------------------------------------
/docs/api-reference/apps/mqtt_client.rst:
--------------------------------------------------------------------------------
1 | .. _api_app_mqtt_client:
2 |
3 | MQTT Client
4 | ===========
5 |
6 | MQTT client v3.1.1 implementation, based on callback (non-netconn) connection API.
7 |
8 | .. literalinclude:: ../../../snippets/mqtt_client.c
9 | :language: c
10 | :linenos:
11 | :caption: MQTT application example code
12 |
13 | .. doxygengroup:: ESP_APP_MQTT_CLIENT
14 | .. doxygengroup:: ESP_APP_MQTT_CLIENT_EVT
--------------------------------------------------------------------------------
/docs/api-reference/apps/mqtt_client_api.rst:
--------------------------------------------------------------------------------
1 | .. _api_app_mqtt_client_api:
2 |
3 | MQTT Client API
4 | ===============
5 |
6 | *MQTT Client API* provides sequential API built on top of :ref:`api_app_mqtt_client`.
7 |
8 | .. literalinclude:: ../../../snippets/mqtt_client_api.c
9 | :language: c
10 | :linenos:
11 | :caption: MQTT API application example code
12 |
13 | .. doxygengroup:: ESP_APP_MQTT_CLIENT_API
--------------------------------------------------------------------------------
/docs/api-reference/cli/cli_config.rst:
--------------------------------------------------------------------------------
1 | .. _api_cli_config:
2 |
3 | CLI Configuration
4 | =================
5 |
6 | .. doxygengroup:: CLI_CONFIG
--------------------------------------------------------------------------------
/docs/api-reference/cli/cli_input.rst:
--------------------------------------------------------------------------------
1 | .. _api_cli_input:
2 |
3 | CLI Input module
4 | ================
5 |
6 | .. doxygengroup:: CLI_INPUT
7 |
--------------------------------------------------------------------------------
/docs/api-reference/cli/index.rst:
--------------------------------------------------------------------------------
1 | .. _api_cli:
2 |
3 | Command line interface
4 | ======================
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 | :glob:
9 |
10 | *
11 |
12 | .. doxygengroup:: CLI
--------------------------------------------------------------------------------
/docs/api-reference/config.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_config:
2 |
3 | ESP Configuration
4 | =================
5 |
6 | This is the default configuration of the middleware.
7 | When any of the settings shall be modified, it shall be done in dedicated application config ``esp_config.h`` file.
8 |
9 | .. note::
10 | Check :ref:`getting_started` to create configuration file.
11 |
12 | .. doxygengroup:: ESP_CONFIG
13 | .. doxygengroup:: ESP_CONFIG_DBG
14 | .. doxygengroup:: ESP_CONFIG_OS
15 | .. doxygengroup:: ESP_CONFIG_STD_LIB
16 | .. doxygengroup:: ESP_CONFIG_MODULES
17 | .. doxygengroup:: ESP_CONFIG_MODULES_NETCONN
18 | .. doxygengroup:: ESP_CONFIG_MODULES_MQTT
19 | .. doxygengroup:: ESP_CONFIG_MODULES_CAYENNE
20 | .. doxygengroup:: ESP_CONFIG_APP_HTTP
--------------------------------------------------------------------------------
/docs/api-reference/esp/ap.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_ap:
2 |
3 | Access point
4 | ============
5 |
6 | .. doxygengroup:: ESP_AP
--------------------------------------------------------------------------------
/docs/api-reference/esp/buff.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_buff:
2 |
3 | Ring buffer
4 | ===========
5 |
6 | .. doxygengroup:: ESP_BUFF
--------------------------------------------------------------------------------
/docs/api-reference/esp/conn.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_conn:
2 |
3 | Connections
4 | ===========
5 |
6 | Connections are essential feature of WiFi device and middleware.
7 | It is developed with strong focus on its performance and since it may interact with huge amount of data,
8 | it tries to use zero-copy (when available) feature, to decrease processing time.
9 |
10 | *ESP AT Firmware* by default supports up to ``5`` connections being active at the same time and supports:
11 |
12 | * Up to ``5`` TCP connections active at the same time
13 | * Up to ``5`` UDP connections active at the same time
14 | * Up to ``1`` SSL connection active at a time
15 |
16 | .. note::
17 | Client or server connections are available.
18 | Same API function call are used to send/receive data or close connection.
19 |
20 | Architecture of the connection API is using callback event functions.
21 | This allows maximal optimization in terms of responsiveness on different kind of events.
22 |
23 | Example below shows *bare minimum* implementation to:
24 |
25 | * Start a new connection to remote host
26 | * Send *HTTP GET* request to remote host
27 | * Process received data in event and print number of received bytes
28 |
29 | .. literalinclude:: ../../../snippets/client.c
30 | :language: c
31 | :linenos:
32 | :caption: Client connection minimum example
33 |
34 | Sending data
35 | ^^^^^^^^^^^^
36 |
37 | Receiving data flow is always the same. Whenever new data packet arrives, corresponding event is called to notify application layer.
38 | When it comes to sending data, application may decide between ``2`` options (*this is valid only for non-UDP connections):
39 |
40 | * Write data to temporary transmit buffer
41 | * Execute *send command* for every API function call
42 |
43 | Temporary transmit buffer
44 | *************************
45 |
46 | By calling :cpp:func:`esp_conn_write` on active connection, temporary buffer is allocated and input data are copied to it.
47 | There is always up to ``1`` internal buffer active. When it is full (or if input data length is longer than maximal size),
48 | data are immediately send out and are not written to buffer.
49 |
50 | *ESP AT Firmware* allows (current revision) to transmit up to ``2048`` bytes at a time with single command.
51 | When trying to send more than this, application would need to issue multiple *send commands* on *AT commands level*.
52 |
53 | Write option is used mostly when application needs to write many different small chunks of data.
54 | Temporary buffer hence prevents many *send command* instructions as it is faster to send single command with big buffer,
55 | than many of them with smaller chunks of bytes.
56 |
57 | .. literalinclude:: ../../examples_src/conn_write.c
58 | :language: c
59 | :linenos:
60 | :caption: Write data to connection output buffer
61 |
62 | Transmit packet manually
63 | ************************
64 |
65 | In some cases it is not possible to use temporary buffers,
66 | mostly because of memory constraints.
67 | Application can directly start *send data* instructions on *AT* level by using :cpp:func:`esp_conn_send` or :cpp:func:`esp_conn_sendto` functions.
68 |
69 | .. doxygengroup:: ESP_CONN
--------------------------------------------------------------------------------
/docs/api-reference/esp/debug.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_debug:
2 |
3 | Debug support
4 | =============
5 |
6 | Middleware has extended debugging capabilities.
7 | These consist of different debugging levels and types of debug messages,
8 | allowing to track and catch different types of warnings, severe problems or simply output messages
9 | program flow messages (trace messages).
10 |
11 | Module is highly configurable using library configuration methods.
12 | Application must enable some options to decide what type of messages and for which modules it would like to output messages.
13 |
14 | With default configuration, ``printf`` is used as output function.
15 | This behavior can be changed with :c:macro:`ESP_CF_DBG_OUT` configuration.
16 |
17 | For successful debugging, application must:
18 |
19 | * Enable global debugging by setting :c:macro:`ESP_CFG_DBG` to :c:macro:`ESP_DBG_ON`
20 | * Configure which types of messages to output
21 | * Configure debugging level, from all messages to severe only
22 | * Enable specific modules to debug, by setting its configuration value to :c:macro:`ESP_DBG_ON`
23 |
24 | .. tip::
25 | Check :ref:`api_esp_config` for all modules with debug implementation.
26 |
27 | An example code with config and latter usage:
28 |
29 | .. literalinclude:: ../../examples_src/debug_config.h
30 | :language: c
31 | :linenos:
32 | :caption: Debug configuration setup
33 |
34 | .. literalinclude:: ../../examples_src/debug.c
35 | :language: c
36 | :linenos:
37 | :caption: Debug usage within middleware
38 |
39 | .. doxygengroup:: ESP_DEBUG
--------------------------------------------------------------------------------
/docs/api-reference/esp/dhcp.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_dhcp:
2 |
3 | Dynamic Host Configuration Protocol
4 | ===================================
5 |
6 | .. doxygengroup:: ESP_DHCP
--------------------------------------------------------------------------------
/docs/api-reference/esp/dns.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_dns:
2 |
3 | Domain Name System
4 | ==================
5 |
6 | .. doxygengroup:: ESP_DNS
--------------------------------------------------------------------------------
/docs/api-reference/esp/evt.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_evt:
2 |
3 | Event management
4 | ================
5 |
6 | .. doxygengroup:: ESP_EVT
--------------------------------------------------------------------------------
/docs/api-reference/esp/hostname.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_hostname:
2 |
3 | Hostname
4 | ========
5 |
6 | .. doxygengroup:: ESP_HOSTNAME
--------------------------------------------------------------------------------
/docs/api-reference/esp/index.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp:
2 |
3 | ESP AT Lib
4 | ==========
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 | :glob:
9 |
10 | *
11 |
12 | .. doxygengroup:: ESP
--------------------------------------------------------------------------------
/docs/api-reference/esp/input.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_input:
2 |
3 | Input module
4 | ============
5 |
6 | Input module is used to input received data from *ESP* device to *ESP-AT-Lib* middleware part.
7 | ``2`` processing options are possible:
8 |
9 | * Indirect processing with :cpp:func:`esp_input` (default mode)
10 | * Direct processing with :cpp:func:`esp_input_process`
11 |
12 | .. tip::
13 | Direct or indirect processing mode is select by setting :c:macro:`ESP_CFG_INPUT_USE_PROCESS` configuration value.
14 |
15 | Indirect processing
16 | ^^^^^^^^^^^^^^^^^^^
17 |
18 | With indirect processing mode, every received character from *ESP* physical device is written to
19 | intermediate buffer between low-level driver and *processing* thread.
20 |
21 | Function :cpp:func:`esp_input` is used to write data to buffer, which is later processed
22 | by *processing* thread.
23 |
24 | Indirect processing mode allows embedded systems to write received data to buffer from interrupt context (outside threads).
25 | As a drawback, its performance is decreased as it involves copying every receive character to intermediate buffer,
26 | and may also introduce RAM memory footprint increase.
27 |
28 | Direct processing
29 | ^^^^^^^^^^^^^^^^^
30 |
31 | Direct processing is targeting more advanced host controllers, like STM32 or WIN32 implementation use.
32 | It is developed with DMA support in mind, allowing low-level drivers to skip intermediate data buffer
33 | and process input bytes directly.
34 |
35 | .. note::
36 | When using this mode, function :cpp:func:`esp_input_process` must be used and it may
37 | only be called from thread context. Processing of input bytes is done in low-level
38 | input thread, started by application.
39 |
40 | .. tip::
41 | Check :ref:`um_porting_guide` for implementation examples.
42 |
43 | .. doxygengroup:: ESP_INPUT
--------------------------------------------------------------------------------
/docs/api-reference/esp/mdns.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_:
2 |
3 | Multicast DNS
4 | =============
5 |
6 | .. doxygengroup:: ESP_MDNS
--------------------------------------------------------------------------------
/docs/api-reference/esp/mem.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_mem:
2 |
3 | Memory manager
4 | ==============
5 |
6 | .. doxygengroup:: ESP_MEM
--------------------------------------------------------------------------------
/docs/api-reference/esp/ping.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_ping:
2 |
3 | Ping support
4 | ============
5 |
6 | .. doxygengroup:: ESP_PING
--------------------------------------------------------------------------------
/docs/api-reference/esp/sntp.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_sntp:
2 |
3 | Simple Network Time Protocol
4 | ============================
5 |
6 | ESP has built-in support for *Simple Network Time Protocol (SNTP)*.
7 | It is support through middleware API calls for configuring servers and reading actual date and time.
8 |
9 | .. literalinclude:: ../../../snippets/sntp.c
10 | :language: c
11 | :linenos:
12 | :caption: Minimum SNTP example
13 |
14 | .. doxygengroup:: ESP_SNTP
15 |
--------------------------------------------------------------------------------
/docs/api-reference/esp/sta.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_sta:
2 |
3 | Station API
4 | ===========
5 |
6 | Station API is used to work with *ESP* acting in station mode.
7 | It allows to join other access point, scan for available access points or simply disconnect from it.
8 |
9 | An example below is showing how all examples (coming with this library) scan for access point and then
10 | try to connect to AP from list of preferred one.
11 |
12 | .. literalinclude:: ../../../snippets/station_manager.c
13 | :language: c
14 | :linenos:
15 | :caption: Station manager used with all examples
16 |
17 | .. doxygengroup:: ESP_STA
--------------------------------------------------------------------------------
/docs/api-reference/esp/timeout.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_timeout:
2 |
3 | Timeout manager
4 | ===============
5 |
6 | Timeout manager allows application to call specific function at desired time.
7 | It is used in middleware (and can be used by application too) to poll active connections.
8 |
9 | .. note::
10 | Callback function is called from *processing* thread.
11 | It is not allowed to call any blocking API function from it.
12 |
13 | When application registers timeout, it needs to set timeout, callback function and optional user argument.
14 | When timeout elapses, ESP middleware will call timeout callback.
15 |
16 | This feature can be considered as single-shot software timer.
17 |
18 | .. doxygengroup:: ESP_TIMEOUT
--------------------------------------------------------------------------------
/docs/api-reference/esp/typedefs.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_typedefs:
2 |
3 | Structures and enumerations
4 | ===========================
5 |
6 | .. doxygengroup:: ESP_TYPEDEFS
--------------------------------------------------------------------------------
/docs/api-reference/esp/unicode.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_unicode:
2 |
3 | Unicode
4 | =======
5 |
6 | Unicode decoder block. It can decode sequence of *UTF-8* characters,
7 | between ``1`` and ``4`` bytes long.
8 |
9 | .. note::
10 | This is simple implementation and does not support string encoding.
11 |
12 | .. doxygengroup:: ESP_UNICODE
--------------------------------------------------------------------------------
/docs/api-reference/esp/utils.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_utils:
2 |
3 | Utilities
4 | =========
5 |
6 | Utility functions for various cases.
7 | These function are used across entire middleware and can also be used by application.
8 |
9 | .. doxygengroup:: ESP_UTILS
--------------------------------------------------------------------------------
/docs/api-reference/esp/wps.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_wps:
2 |
3 | Wi-Fi Protected Setup
4 | =====================
5 |
6 | .. doxygengroup:: ESP_WPS
--------------------------------------------------------------------------------
/docs/api-reference/index.rst:
--------------------------------------------------------------------------------
1 | .. _api_reference:
2 |
3 | API reference
4 | =============
5 |
6 | List of all the modules:
7 |
8 | .. toctree::
9 | :maxdepth: 2
10 |
11 | esp/index
12 | config
13 | port/index
14 | apps/index
15 | cli/index
--------------------------------------------------------------------------------
/docs/api-reference/port/index.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_port:
2 |
3 | Platform specific
4 | =================
5 |
6 | List of all the modules:
7 |
8 | .. toctree::
9 | :maxdepth: 2
10 | :glob:
11 |
12 | *
--------------------------------------------------------------------------------
/docs/api-reference/port/ll.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_ll:
2 |
3 | Low-Level functions
4 | ===================
5 |
6 | Low-level module consists of callback-only functions, which are called by middleware
7 | and must be implemented by final application.
8 |
9 | .. tip::
10 | Check :ref:`um_porting_guide` for actual implementation
11 |
12 | .. doxygengroup:: ESP_LL
--------------------------------------------------------------------------------
/docs/api-reference/port/sys.rst:
--------------------------------------------------------------------------------
1 | .. _api_esp_sys:
2 |
3 | System functions
4 | ================
5 |
6 | System functions are bridge between operating system system calls and middleware system calls.
7 | Middleware is tightly coupled with operating system features hence it is important to include OS features directly.
8 |
9 | It includes support for:
10 |
11 | * Thread management, to start/stop threads
12 | * Mutex management for recursive mutexes
13 | * Semaphore management for binary-only semaphores
14 | * Message queues for thread-safe data exchange between threads
15 | * Core system protection for mutual exclusion to access shared resources
16 |
17 | .. tip::
18 | Check :ref:`um_porting_guide` for actual implementation guidelines.
19 |
20 | .. doxygengroup:: ESP_SYS
--------------------------------------------------------------------------------
/docs/examples_src/command_blocking.c:
--------------------------------------------------------------------------------
1 | char hostname[20];
2 |
3 | /* Somewhere in thread function */
4 |
5 | /* Get device hostname in blocking mode */
6 | /* Function returns actual result */
7 | if (esp_hostname_get(hostname, sizeof(hostname), NULL, NULL, 1 /* 1 means blocking call */) == espOK) {
8 | /* At this point we have valid result and parameters from API function */
9 | printf("ESP hostname is %s\r\n", hostname);
10 | } else {
11 | printf("Error reading ESP hostname..\r\n");
12 | }
--------------------------------------------------------------------------------
/docs/examples_src/command_nonblocking.c:
--------------------------------------------------------------------------------
1 | char hostname[20];
2 |
3 | /* Hostname event function, called when esp_hostname_get() function finishes */
4 | void
5 | hostname_fn(espr_t res, void* arg) {
6 | /* Check actual result from device */
7 | if (res == espOK) {
8 | printf("ESP hostname is %s\r\n", hostname);
9 | } else {
10 | printf("Error reading ESP hostname...\r\n");
11 | }
12 | }
13 |
14 | /* Somewhere in thread and/or other ESP event function */
15 |
16 | /* Get device hostname in non-blocking mode */
17 | /* Function now returns if command has been sent to internal message queue */
18 | if (esp_hostname_get(hostname, sizeof(hostname), hostname_fn, NULL, 0 /* 0 means non-blocking call */) == espOK) {
19 | /* At this point application knows that command has been sent to queue */
20 | /* But it does not have yet valid data in "hostname" variable */
21 | printf("ESP hostname get command sent to queue.\r\n");
22 | } else {
23 | /* Error writing message to queue */
24 | printf("Cannot send hostname get command to queue.\r\n");
25 | }
--------------------------------------------------------------------------------
/docs/examples_src/command_nonblocking_bad.c:
--------------------------------------------------------------------------------
1 | char hostname[20];
2 |
3 | /* Hostname event function, called when esp_hostname_get() function finishes */
4 | void
5 | hostname_fn(espr_t res, void* arg) {
6 | /* Check actual result from device */
7 | if (res == espOK) {
8 | printf("ESP hostname is %s\r\n", hostname);
9 | } else {
10 | printf("Error reading ESP hostname...\r\n");
11 | }
12 | }
13 |
14 | /* Check hostname */
15 | void
16 | check_hostname(void) {
17 | char hostname[20];
18 |
19 | /* Somewhere in thread and/or other ESP event function */
20 |
21 | /* Get device hostname in non-blocking mode */
22 | /* Function now returns if command has been sent to internal message queue */
23 | /* Function will use local "hostname" variable and will write to undefined memory */
24 | if (esp_hostname_get(hostname, sizeof(hostname), hostname_fn, NULL, 0 /* 0 means non-blocking call */) == espOK) {
25 | /* At this point application knows that command has been sent to queue */
26 | /* But it does not have yet valid data in "hostname" variable */
27 | printf("ESP hostname get command sent to queue.\r\n");
28 | } else {
29 | /* Error writing message to queue */
30 | printf("Cannot send hostname get command to queue.\r\n");
31 | }
32 | }
--------------------------------------------------------------------------------
/docs/examples_src/config.h:
--------------------------------------------------------------------------------
1 | #ifndef ESP_HDR_CONFIG_H
2 | #define ESP_HDR_CONFIG_H
3 |
4 | /* Rename this file to "esp_config.h" for your application */
5 |
6 | /* Increase default receive buffer length */
7 | #define ESP_RCV_BUFF_SIZE 0x800
8 |
9 | /* After user configuration, call default config to merge config together */
10 | #include "esp/esp_config_default.h"
11 |
12 | #endif /* ESP_HDR_CONFIG_H */
--------------------------------------------------------------------------------
/docs/examples_src/conn_write.c:
--------------------------------------------------------------------------------
1 | size_t rem_len;
2 | esp_conn_p conn;
3 | espr_t res;
4 |
5 | /* ... other tasks to make sure connection is established */
6 |
7 | /* We are connected to server at this point! */
8 | /*
9 | * Call write function to write data to memory
10 | * and do not send immediately unless buffer is full after this write
11 | *
12 | * rem_len will give us response how much bytes
13 | * is available in memory after write
14 | */
15 | res = esp_conn_write(conn, "My string", 9, 0, &rem_len);
16 | if (rem_len == 0) {
17 | printf("No more memory available for next write!\r\n");
18 | }
19 | res = esp_conn_write(conn, "example.com", 11, 0, &rem_len);
20 |
21 | /*
22 | * Data will stay in buffer until buffer is full,
23 | * except if user wants to force send,
24 | * call write function with flush mode enabled
25 | *
26 | * It will send out together 20 bytes
27 | */
28 | esp_conn_write(conn, NULL, 0, 1, NULL);
29 |
--------------------------------------------------------------------------------
/docs/examples_src/debug.c:
--------------------------------------------------------------------------------
1 | #include "esp/esp_debug.h"
2 |
3 | /*
4 | * Print debug message to the screen
5 | * Trace message will be printed as it is enabled in types
6 | * while state message will not be printed.
7 | */
8 | ESP_DEBUGF(MY_DBG_MODULE | ESP_DBG_TYPE_TRACE, "This is trace message on my program\r\n");
9 | ESP_DEBUGF(MY_DBG_MODULE | ESP_DBG_TYPE_STATE, "This is state message on my program\r\n");
10 |
--------------------------------------------------------------------------------
/docs/examples_src/debug_config.h:
--------------------------------------------------------------------------------
1 | /* Modifications of esp_config.h file for configuration */
2 |
3 | /* Enable global debug */
4 | #define ESP_CFG_DBG ESP_DBG_ON
5 |
6 | /*
7 | * Enable debug types.
8 | * Application may use bitwise OR | to use multiple types:
9 | * ESP_DBG_TYPE_TRACE | ESP_DBG_TYPE_STATE
10 | */
11 | #define ESP_CFG_DBG_TYPES_ON ESP_DBG_TYPE_TRACE
12 |
13 | /* Enable debug on custom module */
14 | #define MY_DBG_MODULE ESP_DBG_ON
15 |
--------------------------------------------------------------------------------
/docs/examples_src/evt.c:
--------------------------------------------------------------------------------
1 | /*
2 | * \brief User defined callback function for ESP events
3 | * \param[in] evt: Callback event data
4 | */
5 | espr_t
6 | esp_callback_function(esp_evt_t* evt) {
7 | switch (esp_evt_get_type(evt)) {
8 | case ESP_EVT_RESET: { /* Reset detected on ESP device */
9 | if (esp_evt_reset_is_forced(evt)) { /* Check if forced by user */
10 | printf("Reset forced by user!\r\n");
11 | }
12 | break;
13 | }
14 | default: break;
15 | }
16 | return espOK;
17 | }
--------------------------------------------------------------------------------
/docs/examples_src/mem.c:
--------------------------------------------------------------------------------
1 | /*
2 | * This part should be done in ll initialization function only once on startup
3 | * Check ESP_LL part of library for more info
4 | */
5 |
6 | #if !ESP_CFG_MEM_CUSTOM
7 |
8 | /* We can simply create a big array variable which will be linked to internal memory by linker */
9 | uint8_t mem_int[0x1000];
10 |
11 | /*
12 | * Define memory regions for allocating algorithm,
13 | * make sure regions are in correct order for memory location
14 | */
15 | esp_mem_region_t mem_regions[] = {
16 | { mem_int, sizeof(mem_int) }, /* Set first memory region to internal memory of length 0x1000 bytes */
17 | { (void *)0xC0000000, 0x8000 }, /* External heap memory is located on 0xC0000000 and has 0x8000 bytes of memory */
18 | };
19 |
20 | /* On startup, user must call function to assign memory regions */
21 | esp_mem_assignmemory(mem_regions, ESP_ARRAYSIZE(mem_regions));
22 |
23 | #endif /* !ESP_CFG_MEM_CUSTOM */
--------------------------------------------------------------------------------
/docs/examples_src/pbuf_cat.c:
--------------------------------------------------------------------------------
1 | esp_pbuf_p a, b;
2 |
3 | /* Create 2 pbufs of different sizes */
4 | a = esp_pbuf_new(10);
5 | b = esp_pbuf_new(20);
6 |
7 | /* Link them together with concat operation */
8 | /* Reference on b will stay as is, won't be increased */
9 | esp_pbuf_cat(a, b);
10 |
11 | /*
12 | * Operating with b variable has from now on undefined behavior,
13 | * application shall stop using variable b to access pbuf.
14 | *
15 | * The best way would be to set b reference to NULL
16 | */
17 | b = NULL;
18 |
19 | /*
20 | * When application doesn't need pbufs anymore,
21 | * free a and it will also free b
22 | */
23 | esp_pbuf_free(a);
--------------------------------------------------------------------------------
/docs/examples_src/pbuf_chain.c:
--------------------------------------------------------------------------------
1 | esp_pbuf_p a, b;
2 |
3 | /* Create 2 pbufs of different sizes */
4 | a = esp_pbuf_new(10);
5 | b = esp_pbuf_new(20);
6 |
7 | /* Chain both pbufs together */
8 | /* This will increase reference on b as 2 variables now point to it */
9 | esp_pbuf_chain(a, b);
10 |
11 | /*
12 | * When application does not need a anymore, it may free it
13 |
14 | * This will free only pbuf a, as pbuf b has now 2 references:
15 | * - one from pbuf a
16 | * - one from variable b
17 | */
18 |
19 | /* If application calls this, it will free only first pbuf */
20 | /* As there is link to b pbuf somewhere */
21 | esp_pbuf_free(a);
22 |
23 | /* Reset a variable, not used anymore */
24 | a = NULL;
25 |
26 | /*
27 | * At this point, b is still valid memory block,
28 | * but when application doesn't need it anymore,
29 | * it should free it, otherwise memory leak appears
30 | */
31 | esp_pbuf_free(b);
32 |
33 | /* Reset b variable */
34 | b = NULL;
--------------------------------------------------------------------------------
/docs/examples_src/pbuf_extract.c:
--------------------------------------------------------------------------------
1 | const void* data;
2 | size_t pos, len;
3 | esp_pbuf_p a, b, c;
4 |
5 | const char str_a[] = "This is one long";
6 | const char str_a[] = "string. We want to save";
7 | const char str_a[] = "chain of pbufs to file";
8 |
9 | /* Create pbufs to hold these strings */
10 | a = esp_pbuf_new(strlen(str_a));
11 | b = esp_pbuf_new(strlen(str_b));
12 | c = esp_pbuf_new(strlen(str_c));
13 |
14 | /* Write data to pbufs */
15 | esp_pbuf_take(a, str_a, strlen(str_a), 0);
16 | esp_pbuf_take(b, str_b, strlen(str_b), 0);
17 | esp_pbuf_take(c, str_c, strlen(str_c), 0);
18 |
19 | /* Connect pbufs together */
20 | esp_pbuf_chain(a, b);
21 | esp_pbuf_chain(a, c);
22 |
23 | /*
24 | * pbuf a now contains chain of b and c together
25 | * and at this point application wants to print (or save) data from chained pbuf
26 | *
27 | * Process pbuf by pbuf with code below
28 | */
29 |
30 | /*
31 | * Get linear address of current pbuf at specific offset
32 | * Function will return pointer to memory address at specific position
33 | * and `len` will hold length of data block
34 | */
35 | pos = 0;
36 | while ((data = esp_pbuf_get_linear_addr(a, pos, &len)) != NULL) {
37 | /* Custom process function... */
38 | /* Process data with data pointer and block length */
39 | process_data(data, len);
40 | printf("Str: %.*s", len, data);
41 |
42 | /* Increase offset position for next block */
43 | pos += len;
44 | }
45 |
46 | /* Call free only on a pbuf. Since it is chained, b and c will be freed too */
47 | esp_pbuf_free(a);
48 |
--------------------------------------------------------------------------------
/docs/examples_src/ping.c:
--------------------------------------------------------------------------------
1 | uint32_t time;
2 |
3 | /* Try to ping domain example.com and print time */
4 | if (esp_ping("example.com", &time, NULL, NULL, 1) == espOK) {
5 | printf("Ping successful. Time: %d ms\r\n", (int)time);
6 | }
--------------------------------------------------------------------------------
/docs/examples_src/sntp_basic.c:
--------------------------------------------------------------------------------
1 | esp_datetime_t dt;
2 |
3 | /* Configure SNTP parameters: enable, timezone +1 and use default network servers */
4 | if (esp_sntp_configure(1, 1, NULL, NULL, NULL, NULL, NULL, 1) == espOK) {
5 | /* Try to get time from network servers */
6 | if (esp_sntp_gettime(&dt, NULL, NULL, 1) == espOK) {
7 | printf("We have a date and time: %d.%d.%d: %d:%d:%d\r\n",
8 | (int)dt.date, (int)dt.month, (int)dt.year,
9 | (int)dt.hours, (int)dt.minutes, (int)dt.seconds
10 | );
11 | }
12 | }
--------------------------------------------------------------------------------
/docs/examples_src/sntp_custom_server.c:
--------------------------------------------------------------------------------
1 | /* Set custom NTP servers. You may apply up to 3 servers, all are optional */
2 | esp_sntp_configure(1, 1, "server1.myntp.com", "server2.myntp.com", "server3.myntp.com", NULL, NULL, 1);
--------------------------------------------------------------------------------
/docs/examples_src/sta.c:
--------------------------------------------------------------------------------
1 | size_t i, apf;
2 | esp_ap_t aps[100];
3 |
4 | /* Search for access points around ESP station */
5 | if (esp_sta_list_ap(NULL, aps, ESP_ARRAYSIZE(aps), &apf, NULL, NULL, 1) == espOK) {
6 | for (i = 0; i < apf; i++) {
7 | printf("AP found: %s\r\n", aps[i].ssid);
8 | }
9 | }
--------------------------------------------------------------------------------
/docs/index.rst:
--------------------------------------------------------------------------------
1 | ESP-AT Lib documentation!
2 | =========================
3 |
4 | ESP-AT Lib is generic, platform independent, library for control of *ESP8266* or *ESP32* WiFi-based microcontrollers from *Espressif systems*.
5 | Its objective is to run on master system, while Espressif device runs official AT commands firmware developed and maintained by *Espressif systems*.
6 |
7 | .. image:: static/images/logo.svg
8 | :align: center
9 |
10 | .. rst-class:: center
11 | .. rst-class:: index_links
12 |
13 | :ref:`download_library` · :ref:`getting_started` · `Open Github `_
14 |
15 | Features
16 | ^^^^^^^^
17 |
18 | * Supports latest ESP8266 and ESP32 RTOS-SDK AT commands firmware
19 | * Platform independent and easy to port, written in C99
20 |
21 | * Library is developed under Win32 platform
22 | * Provided examples for ARM Cortex-M or Win32 platforms
23 |
24 | * Allows different configurations to optimize user requirements
25 | * Optimized for systems with operating systems (or RTOS)
26 |
27 | * Currently only OS mode is supported
28 | * ``2`` different threads to process user inputs and received data
29 |
30 | * Producer thread to collect user commands from application threads and to start command execution
31 | * Process thread to process received data from *ESP* device
32 |
33 | * Allows sequential API for connections in client and server mode
34 | * Includes several applications built on top of library
35 |
36 | * HTTP server with dynamic files (file system) support
37 | * MQTT client for MQTT connection
38 | * MQTT client Cayenne API for Cayenne MQTT server
39 |
40 | * Embeds other AT features, such as WPS
41 | * User friendly MIT license
42 |
43 | Requirements
44 | ^^^^^^^^^^^^
45 |
46 | * C compiler
47 | * *ESP8266* or *ESP32* device with running AT-Commands firmware
48 |
49 | Contribute
50 | ^^^^^^^^^^
51 |
52 | Fresh contributions are always welcome. Simple instructions to proceed:
53 |
54 | #. Fork Github repository
55 | #. Respect `C style & coding rules `_ used by the library
56 | #. Create a pull request to ``develop`` branch with new features or bug fixes
57 |
58 | Alternatively you may:
59 |
60 | #. Report a bug
61 | #. Ask for a feature request
62 |
63 | License
64 | ^^^^^^^
65 |
66 | .. literalinclude:: ../LICENSE
67 |
68 | Table of contents
69 | ^^^^^^^^^^^^^^^^^
70 |
71 | .. toctree::
72 | :maxdepth: 2
73 |
74 | self
75 | get-started/index
76 | user-manual/index
77 | api-reference/index
78 | examples/index
79 |
--------------------------------------------------------------------------------
/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=.
11 | set BUILDDIR=_build
12 |
13 | if "%1" == "" goto help
14 |
15 | %SPHINXBUILD% >NUL 2>NUL
16 | if errorlevel 9009 (
17 | echo.
18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19 | echo.installed, then set the SPHINXBUILD environment variable to point
20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
21 | echo.may add the Sphinx directory to PATH.
22 | echo.
23 | echo.If you don't have Sphinx installed, grab it from
24 | echo.http://sphinx-doc.org/
25 | exit /b 1
26 | )
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/docs/mqtt-v3.1.1-os.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/mqtt-v3.1.1-os.pdf
--------------------------------------------------------------------------------
/docs/requirements.txt:
--------------------------------------------------------------------------------
1 | breathe>=4.9.1
2 | colorama
3 | docutils>=0.14
4 | sphinx>=2.0.1
5 | sphinx_rtd_theme
6 | sphinx-tabs
7 | sphinxcontrib-svg2pdfconverter
8 | sphinx-sitemap
9 |
--------------------------------------------------------------------------------
/docs/static/css/common.css:
--------------------------------------------------------------------------------
1 | /* Center aligned text */
2 | .center {
3 | text-align: center;
4 | }
5 |
6 | /* Paragraph with main links on index page */
7 | .index-links {
8 | text-align: center;
9 | margin-top: 10px;
10 | }
11 | .index-links a {
12 | display: inline-block;
13 | border: 1px solid #0E4263;
14 | padding: 5px 20px;
15 | background: #2980B9;
16 | border-radius: 4px;
17 | color: #FFFFFF;
18 | }
19 | .index-links a:hover, .index-links a:active {
20 | background: #0E4263;
21 | }
22 |
23 | .index-links a table thead th {
24 | vertical-align: middle;
25 | }
26 |
27 | table thead th p {
28 | margin: 0;
29 | }
30 |
31 | /* Breathe output changes */
32 | .breathe-sectiondef.container {
33 | background: #f9f9f9;
34 | padding: 10px;
35 | margin-bottom: 10px;
36 | border: 1px solid #efefef;
37 | }
38 | .breathe-sectiondef.container .breathe-sectiondef-title {
39 | background: #2980b9;
40 | color: #FFFFFF;
41 | padding: 4px;
42 | margin: -10px -10px 0 -10px;
43 | }
44 | .breathe-sectiondef.container .function,
45 | .breathe-sectiondef.container .member,
46 | .breathe-sectiondef.container .class,
47 | .breathe-sectiondef.container .type {
48 | border-bottom: 1px solid #efefef;
49 | }
50 | .breathe-sectiondef.container .function:last-child,
51 | .breathe-sectiondef.container .member:last-child,
52 | .breathe-sectiondef.container .class:last-child,
53 | .breathe-sectiondef.container .type:last-child {
54 | border-bottom: none;
55 | margin-bottom: 0;
56 | }
57 |
58 | /*# sourceMappingURL=common.css.map */
59 |
--------------------------------------------------------------------------------
/docs/static/css/custom.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/css/custom.css
--------------------------------------------------------------------------------
/docs/static/images/example_app_arch.xml:
--------------------------------------------------------------------------------
1 | 3Vldc6IwFP01PrYDBCg+KrrbB/sxotv6tIMQhRaMG2LV/fWbSPgMtrZjh41P5p7kxnBuzk0udIAd735idx3cIR9GHU3xdx0w6GiaqgCF/jBknyKGbqbAEoc+H1QATvgXZp4c3YQ+TCoDCUIRCddV0EOrFfRIBXMxRtvqsAWKqv+6dpdQABzPjUT0KfRJkKKWdlPgtzBcBtk/q2Y37YndbDB/kiRwfbQtQWDYATZGiKSteGfDiJGX8ZL6/TjSmy8MwxU5xaH7++lq+vIncofGtu/czrzR68sVn+XNjTb8ge/sKV8v2WckYLRZ+ZDNo3RAfxuEBDpr12O9Wxp2igUkjqil0uYijCIbRQgffMHC8qDnUTwhGL3CUs/cMnSDTcjXADGBu6MPp+aU0b0GUQwJ3tMh3EGzOMt8m6kZ69siaJrCsaAUsBx0+UZZ5nMXXNIGp/Mz1KoCj9Cne4ubCJMALdHKjYYF2q8yXYwZIbTm/L5AQvZcKO6GoCr7cBeSZ+7O2jPWvja4NdiVugb7zFjR533OJmBGyYuZhdvByvxOjnQ/i3TakwlJy2PPiHk/8pRHtMEefIdwjacHFy8heS8wSvNWwjBySfhWXcjZt4UmKG7oPFqaSdOiGdFl9+eYtpasRTuAJsIiQtPuhm4fAXeQfYr7eLNK6JJ6E5YgQxxvKfmsiVFMf4bJGsMkCRcsBvuEwDiRMEEYZi1BmGKCUI2GBJFnkvMniG6bCSJrfypB5EbqleeLIwniYD1CHFLCIP4/swY4NWu0mTSAeEw/TB7GEupQreuw4aC2GmSof5sKLdlVCD46p2WQoS6DDHVBhve/7i5BhDcti7DVk7DQ3awsuw80eG1VVdjtdr8iQ1FUxwV4RrkZMsjNEOQ2sgcSyk1XqnIDestya/XI+6Lc1EJfs06pVJVAbKYMYjMFsTmDcU/G063+Lqh1uWXvMqs1v1iHswK8jo3C+VlD4BvQ8vWmEFjaHJjmmTKeVrtgdMUQmA0hML8tBIZ0t/wr5VpR6pcM5RJKblWKmlsVi25nYPfGMt5A6hf+PP+1lhJvpNNjreo2L6HqVqUou1Wx7u5PJ5OHe6fhvBwOnEsQKGhZoJr4nWLaG08kpNaoVV/5F78StXoDtV9470/N4nvuoa/0VRwM/wE=
--------------------------------------------------------------------------------
/docs/static/images/logo:
--------------------------------------------------------------------------------
1 | 7Zpdc6IwFIZ/jZftEPCrl2pt96Kdccad6e5lhAiZBcLGqNhfvwmEr2CLZpFeFC80eRNOyHkOZ0jiwFoE8TOFkfdKHOQPTMOJB9bjwDQnAPBvIZxSYWiMUsGl2EklUAhr/I6kaEh1jx20q3RkhPgMR1XRJmGIbFbRIKXkWO22JX511Ai6qCasbejX1TfsMC9VpyOj0H8g7HrZyMCQLQHMOkth50GHHEuStRxYC0oIS0tBvEC+8F3ml/S6pw9a8xujKGSXXDB6I4f359flGKMgnG8nyMVPd2Zq5QD9vZywvFl2yjxwQJRh7pAXuEH+iuwwwyTkTRvCGAkG1jzrMPOxKxoYibjqscDnFcCLfOaRMBbEroiR+w3cYfseUlu0MUjZLHST0Yz76YRrKHQKBVhJL0r+5AD4RK25vHE+Noo/9AjI/czjE5EAMXriXeQFpiXRyNgEGdVjQTrXvDLlTIQyutzcdgGAFySDK3hY35kHeFB4gDqPnFmZRy62zmPYzEN4RyQaXgtJiBRXVxwlXLfFvr8gPqHJ1ZYD0XRr5z1LLUbyyT2LnFqiavRryW/nwjjTKPIhw4eq+XOulCOsCOYD59gs5THKc3dmYkf21EbyqnKGUg0NGwzx2HQRqxlKyObT1oc96mFfD9tsC7Zq6Mawxz3s62GreVYbtmroxrAnPexG2OakpTRuTr82jU972NfD1k3jNdgdp/GHHvb1sHXTeA12x2k8SyQ97c9oK6soc6xLWzWkrnpvTRv0tJtf0YyWaNcMdU3b7Gk30wZt0VYNdU37go2ub0+7loCNljJ5vtHWFe1+G00jk+vSVg11TrvfR9PI5Nq0wRfTPgN77HNnzTcV5OO/e3HSNd+SkN3tknO+Ge8AjChOcGXtvOSK3+V6dTf7mdui/2XsBW9aspSZ4b7aFJoS3ZTsQwc5MpyPHmZoHUFbtB4pVE5jlNjeTm1kfx7b4l7lSSlo6yhMXdll4Xjh09D6wQtof38WxZj9kq2i/HuQnHDJ2qPwhJFVTqXKClHMJ4Wo1G6XjPjskqe+6XH7sqSlbuMOdZNWk6FbJ61+Q1hj20iXdi25dE273xG+4Nk2FUjaS0vVUNdLy35LWIO29uuneavXT14t/hyVdi/+YWYt/wE=
--------------------------------------------------------------------------------
/docs/static/images/logo_tm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/logo_tm.png
--------------------------------------------------------------------------------
/docs/static/images/logo_tm_full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/logo_tm_full.png
--------------------------------------------------------------------------------
/docs/static/images/memory_manager_structure.xml:
--------------------------------------------------------------------------------
1 | 7Vvbdps4FP0av3YBsh38mKRp5yHt6mqmazqPMshGE4y8hHybrx8BErejxHQC2ND4IYEjicveh322ZDxB95vjZ463wRfmk3DiWP5xgj5OHMex0FT+SyKnLGLbroqsOfVVrAg80X+JCloquqM+iSsdBWOhoNtq0GNRRDxRiWHO2aHabcXC6lm3eE1A4MnDIYz+RX0R6NuYL4qGPwhdB+rUrnOTNSyx97zmbBep800ctEo/WfMG62OpG40D7LNDKYQeJuieMyayrc3xnoQJuBq2bNynF1rz6+YkEk0GLObZiD0Od0Rfcnph4qTBSG+HJAOsCbo7BFSQpy32ktaD5F/GArEJ5Z4tN1csEopP20n2aRjes5Dx9FjIx8RdeTIeC86eSall7rlkuZIt8BbUXe0JF+RYCqlb+kzYhgh+kl1Uq6vQPVV3DwWVC01AUGLRsVQQq/RZ50cuIJQbCsUXEL35DRBFTq+QugDS72RNWSRjMi7HW+QoCI9wMurp4/fbL1k0FpgL+T8dY1nHeyv7ZK0hidby4otm19JXW+JKAiSqhFSBjlhEaqyoEA7pOpK7noSdyPhdAjeVInOrGjbU95PTGDOgmiOlJHDsy1KK2mB08TKjdsYOjXJGfbKnEhrHepFY+3Vi7d+Z2Kbq1wavtsa5ROw3Fsd0GSb8LUPmPSeEYoEzqpa7hMaYRl65ncZJ0eaEZJ2y7rKwJ30iJrLjU/+D3LhTQ3LOZYn1AhKXQ2xVOraEFsv7kry1qsot8JaDp13THDJnm5iz2xBZ254CRIgvXZHaZVwEbM3kE/lQRGvJXMKHHKn4Wdr+O+nyYZbsRfLKfqoR6U7R9g8R4qRgxTvBZKg47yNj22Y1ceV6xDPWxKU7m86svEWbu1cZjNmOe7lB1XYU8zXR/WxV4hO8XmWakxALuq+6zLc9cDrNigfuayJs+vnReX/tuT5tmOtOKyrlANAeTWJx7aAZSnaHoCEA2p9BqtTpHyKnPAo9rks5jXxZFoV8+OS503YREE5WLFXyXJ/T8VZeryOWdN9jGuKsbOQdV+pIp7woXBlD7rzK0NTqVcKt6SDFoI4aMliWDvN61kwMtJu8fvia+oZ24IMrCO+ycIahvp3dAiDy7uygs1MLN1Vnp4LtObt06C3n+FTqsGVyuhuXjvwtCZQrv1PLoFltXe/cAGS9PqCuIb/YfVHpLjeyOyzyM4eqoarAVbQhVrKebS1cJxt2JevX4NpwKnV1CE1nl60ks/dKcr6S6OWASiWxWq8kzVmD090hiCnI9V7F1IbT3SGsEQDQ+pXQrr9ObAEhZ3HROboDy+6IJbShYJqst17MuIRgDtN91jO733UUu6H7vHbQel09caDn/BEn302ZFzLe9qrAW57XX6hAdk1fm5bteSuAQq/TJAsHCWzTwtVOpkI/VNXENGZ9/fH4OA50ezVODly5H7oOzNB5HUCoMx1ouKo/BmANOmAEtp1MhRZ/VDoA0DXoQIfoQuc5eB24qQLqGABdGPCctoLn/zOlQ8TVtBRowrWdPIUv8I1LBergmt6i6ypptbqMSATyrNMiYKhZTmdmAMFZ1lhUoA6sSQWMwLYiAwjOtkYlAwBdgwx0iC6ccg1dB+bzC5oBBCdZY5GBOq69mgEE51qjUgEAbq9mAM63hi4CN7PzZsC2OzMDcIo1FhWoA2t8O8AEbDsyAOdao5IBgK7p65Xu0IUzrqHrQP19duM3BSZhbUUH9MlGqAMAWJPAdmYHpud+kjJwHQDomr4paAlduVv8GDx7kbL4yT16+A8=
--------------------------------------------------------------------------------
/docs/static/images/memory_manager_structure_freeing.xml:
--------------------------------------------------------------------------------
1 | 7VtLk5s4EP41vqZ4GdvHZHY2e5iktjKb2uxRBhm0g5FLyK/99SuBhIFWZqgJ2EDZBxu6JR5ftz61uuWZ+7A9fWZoF3+hIU5mjhWeZu5vM8dxLNcTP1JyLiS2vVSSiJFQyS6CZ/IfVkJLSfckxFmtIac04WRXFwY0TXHAazLEGD3Wm21oUr/rDkUYCJ4DlEDp3yTksX4Nf3VR/IFJFKtbL51FoVij4CVidJ+q+80cd5N/CvUW6WupF81iFNJjReQ+ztwHRikvjranB5xIcDVsRb/ff6Itn5vhlLfpsPKLHgeU7LF+5PzB+FmDkb8Olh2smfvpGBOOn3cokNqjsL+QxXybiDNbHG5oypU9bUeekyR5oAll+bXcEOHlJhDyjDP6gisaP1ji9UZo4CuotzpgxvGpIlKv9BnTLebsLJoo7VKhe66fHi+mXGkDxBUrOpYSIuU+UXnlC4TiQKH4E0RXANFvOCI0FTLx1A+yacoxS1E+ZvCBCCQd69vHL4Uy44hx8Zt3tayTbRWfQpvgNBLvUFcDiwmYeN0sdbhTmuKGbZQIJSRKxWmA5TMKgQSdiIHxUSm2JAzlbYx+UPeUiis49k0N63ZgV1vjXDHsnzTLyDqR9lsnNHiRBkUcFaZa76UZM5IGVT3JJB8xjItGRXPBWbJNSnlxfRJ+EAefVJfS5oI9ghhnVRHdVK4toEXivYTdOh3CHditBE9PCD60nG2ynN3FkLQtGyCCQ0H46pQyHtOIihH5eJE2nLmCDz4R/qNy/I9s8mEuz1LxZD9Uj/zkovsXc35WsKI9p0J0ue8Tpbt2BLpZBjgwEuh6OffmVqnR89arFszongXl3KuoXxBQhHU72y2EEq9XLc1wgjg51CfQX7OaAwbcV0lsevxovx+6r3stfd3pxNVdANqTiSyGDppzVdAWALS/4pyp8y8sojmFHtNTOUlDMS1yMfjEvXM9jzHDG5ozecnPeX+rnK9TKpsfEElQMW2UDTfqSudyUhiYhZb+bSkchlVjIAOA2lXJwIYhi5EMdDQ5fPiuSgu2DeAbHEJyyr/hsNQL4ntk9VpkpYOoWmTlz2e3iqxsGCSMgUyBr1+XTL12ZDp00K5Koc4cgPY9kwtUc5Dza8mlFiO4A0DnizqgjgHQlQFPrxM8Yb6ujROOEVfTTGbCtRs/hSuAOiMWEdLX709P0wDXlDrrzWmXkyOB0us0CVgQzzLtWAXU7wRQuBiaCgs0gTWxgBHYTmhAX3iqNADQNdBAj+jCCGrsPLCYv80D5TK8cx5wYXQ1FR5oAmtc15qA7cZTYZg1KR4A6Bp4oD90PciyAMXRF51d07Kgt6qz7cFc1b3s3FPZubVpO6k7ew6w7L3u/M6ykmeanvvLjnouQOSeHc0BqWZHPRUW1rKjeoK6QXbUg2HqGLKjTV93TXN6b4k+732h6OBAa1s+6QY0GGbe685vlACvTeFvJQaH6ddN1K5MBjDhN+6685VpAab3BodQs6xkGpau1duwXNx39LWIrLSNapGVZrQbRFb6eUZGpk1fN5Gp0dc7YYM5XNmPIbICoBkotEfQpld3bubuPcPuh/5KTvPpFp4BsG1red146sQrzwBdQ/KsP3R9SJ5j54Fm7t7EA/2VnHxnsjwAgG1by+vGU9/akzdyHgDomvah9YcuzOkBFG8dMfktdtib9uh0tKKCq/D7igqsqPSm3dqKSv834QYrKh/GuWNYUQFXN8xhve31898Xyg4Os5b7Tt+BmTi9/AU911X+6O8+/g8=
--------------------------------------------------------------------------------
/docs/static/images/netconn_client.xml:
--------------------------------------------------------------------------------
1 | 7Vpde9o2FP41XG6PkbBxLglJu4ttT59lW5veCVtgt8KisszHfv0kW7IlWwFG1ZCs5Saco6Ov93wrjOB8vX/L0Cb7jaaYjECQ7kfwbgTAGIBI/JGcQ8OZBkHDWLE8VUId4yH/ByumFqvyFJeWIKeU8HxjMxNaFDjhFg8xRne22JISe9cNWuEB4yFBZMh9n6c8U9xxdNMN/ILzVaa2jsG0GVig5POK0apQ+40AXNafZniN9FrqomWGUrozWPB+BOeMUt58W+/nmEhsNWzNvDdPjLbnZrjg50xgs+TLm/2ff338FP4dLYr72WP68SetvS0iFdb3qE/LDxqh+o5YrhKM4O0uyzl+2KBEju6ETQhextdEUGPxdZkTMqeEMkEXtBBCtykqs3q6HB+eWl1kixnHe4OlbvEW0zXm7CBE1GgYKkSVxY1vFL0z9BcrXmaorlUFUjazatfucBNfFHRuGIFvwGjBlVeMQQ9AaVJxgpNE8EvO6GdsjCzicBIGniCNbEhB4IA0ckEaeIAUDiCdN86e00J6PiJEOpv07qpQ3B7k4p7cxtXGS5miwzoRyVeFIBOBHhb8W4laLvacqYF1nqZyG6cibVWbuowUbWgMwkB8tJw6fHBN9YUetDcZaO8OcSQ4DCc43wpwQIC38nJ+/eQJbH3AGdtwwiAcwgkccEIPcIbfOr7YuM3n2ibtuJMiHC+dcSdKYrxY+kEaXjXuDHPf75jLOqMrN5oIJDCoEl4x/CPu+FGfj7gzHWjvjy7gpE0IWuOylPUfCL5UuBqq76VGINiPQMABrCsCRR6A1ZW5gRNORc2sSMp4Rle0QOS+4/YM0kAN73P+wfj+KEV+DgX1CXN+UICiilPB6tb+ldKNA/ej1v2fK6dmRJf94JjuSlqxRKGhOgMJylFlMkwQFwZpLeTSjJr6juYySz6Z1XVu0EtwxFaYq1mdfmeMoYMhtpEC5ZF9Jr194l4jcUpenaszr+YEnbG1mJxlfzcDx54lNYy9qMzwEgs9Ja/XrVt3PeXWEw9u7e7/pl/t606fdfi2IyYEg5ggqbu9MXR30EQh7tsGEkk0s6ahprt5NaUnPltYGKs+pnFLK0n5CxVnB/FTTRWh5f+hNA/P9CAfpble9+q1eYjjdOIy4RgsYBT5gXp81dq8Pa+zOCd5bbQB2myIqJmVTfOMYZQOVPJ91+gXq9FHja5bLL+lZJcqHs18YAy16eHCMvNYFBtmB49PdmY+0dHFzCe6BHz+hKJPYzjke5RLJ1yK67UdF9qinKAFkdVazW8TjVW7va6sM+7XbedmHS8+NPkmPmSVXtNL+7FjwPsovC6u+s7ysKnDwYBvB7uoJ4OwV+dEVo91Uh7Ecc/GjJ5sODtwd4CnOs0Lmjv92O/Jmtu4b5sHeLH27HwNAcdbn4uzhffu4zJb7r8XROC4LffkITzyvnDaE/pPYg1oXmx5+Fb/jtEEl+XI+u+HTo1FqvNhXaz2HzReaTJ81rdJ9yNG/NUx5cqPGODFPGJMniGKPKFsQXa/hmjcsfvJCbz/Fw==
--------------------------------------------------------------------------------
/docs/static/images/netconn_server_1thread.xml:
--------------------------------------------------------------------------------
1 | 7Vtbc+MmFP41ftwd3SU/buz0MrPd2TadbvOIJWyrkYWLUGz31xcksITAiSLjWyZ5sTiAEN85fPo4KCN3str+jMF6+RtKYDZyrGQ7cqcjx7HtMKI/zLKrLV5o1YYFThPeqDE8pP9BbhTNyjSBhdSQIJSRdC0bY5TnMCaSDWCMNnKzOcrkUddgARXDQwwy1fojTchSzCsYNxW/wHSx5ENHTlhXzED8tMCozPl4I8edV3919QqIe/GJFkuQoE3L5N6P3AlGiNRXq+0EZgxbAVvd76cDtfvnxjAnfTp4aPn41/T3Epfw1+3Xu0Xw52z8yXXr2zyDrIRiHtXTkp1AqJojZHexRu7dZpkS+LAGMavd0JigtiVZZbRk08t5mmUTlCFMyznKaaO7BBTLqjur58NBTOD24ETsPTw07CBaQYJ3tAnv4PscUR5x9piXNy3/Rdy2bLnO9bgR8JhZ7O/d4EYvOHRvgNELTwhjHVhOHFN7QTB6gq2aJJgFfmAI2EAG1rM0wAYaYG3HALCOaQhRTjjd2I4G0iiGekhnke/51h5SBT8Nyr0hdfpCum94DKTq4n6AmD48o1OQZYzBGGWWeUxSlCtw0zkSGVMZK76+NUseZOkip8WYIkeHc+8YYikd8wuvWKVJwobROlF2c9uPES+3vOW6Fv0T7fjDW5d0nW+CZRTPTQEB1IJhDNNnCo5jwWc2ObNr5AC2JuCMOuTiaOB0dKxtAE7/1Nwi4zaZiJiUOScBMJprOSeIIzibm0HaHRq4Rmg8UKD+BgkTbwxuwT50/mVMSgxvgHOCM3LOYNeZ4BxVw0xqzV29GywQx3BNmLKFRcFEtWP9W8JSdeG1MpDbYaA9aK8xkAlwbVXeSOjGGSreA6uHZ2R12/jmZSCt+zBKPB2tR87MDQIzUNuDpaQJWrdVRbLXkmVR/ZAlhiD5YHQzXjOyQHzFGzBZQDE/hMkSLVAOsvvG2sGt5Ta4TcnfzPzZ56VHUZPTB2tVseIjv8E/kJAdRx6UBFFTM+5XhNZvJK06eESqxvDGrkAljkViiCsZAvACimY8KcRQfNH7GGaAUJ0u3f2o3bF9ClfaLUdanx1f8qXkybryXTkzvJQvbVUj/wApk1ZzVO3Ns7TSABYFuEl88qLQ0DciEOxLii6RAPngvyFLZqzhv8D0mqm6fsEY7FoN1ijNSdG683dmaILK8Tqq0+6kvjvt7fC49uJlfKh993k67elFPcMmaPdQ9SOMsUIY3zGK6T5sJGWEkjpHVG0ocrhpUcmErThMSaHqUKxRXrBLkCdi71EJONjwjS4heCsk4/bNLUUmSCb6IJnBJCOc0iYZkfy8gMiylHX2rV5GciKkGvTWt+q938QmTs00O3MTi0SSr6EkX21pjdSVN7tMwnO8inv7cnx6Xzov+fJaXckef7ptzWW644V+XOipXja+Rxmkt3xP/349pIe67Z3QN6qH9Gfwx++QtRGkibSeVHQwHA4FdhP1Tb+qJDqqUSp9XDGUfTrhNShS9Z+X+OfiJDU9OcEQVHq31sCfsvQJVrp4fxrVHEJxISwUsrTRbg4+ZmjLhpwz2zNIMzDLbuf0o/v6d+2er//QwOv/heC4gvR931PZoz6u6R7t7T9GevVUNjiZA146q5Uk7zs+r72MU418I6L1qXqK+4eSILjgCe5xcA/9huR0S+h4LWxMdJxIc7xdVKgqZZjM6K0ywjOpDL3utG49BMLrDQHx2cS1x8DxB61HxIDuFO/1INCd771t73Gu7YbuJOIag8C7HiJ4ZQOq+vKM3DDwZfCS2lHP6I9NkSg5DdftaI+uhKufgfdqQumtuRZlnEDKnbzaXmikgbkWWmz+JaVu3vzfj3v/Pw==
--------------------------------------------------------------------------------
/docs/static/images/netconn_server_concurrency.xml:
--------------------------------------------------------------------------------
1 | 7Vtbc+MmFP41fsyOJCRZftw42bYz2U636XR3+9LBEpbUyMKLUez01xck0AURW4lRHKfJS8IBBHzncK5kAuar3U8ErpPPOELZxLGi3QRcTRzHtoDFfnHKQ0XxgqAixCSNxKCGcJv+i+RMQS3SCG06AynGGU3XXWKI8xyFtEODhOBtd9gSZ91V1zBGPcJtCLM+9Wsa0URQbX/WdPyM0jgRSwfOtOpYwPAuJrjIxXoTByzLn6p7BeW3xEE3CYzwtkUC1xMwJxjT6q/Vbo4yjq2ErZr36ZHeet8E5XTIhN1fbv4lXvs3f3/67Gb2+vLH7PrCEae8h1mB5DnK3dIHiVB5RsS/Yk3A5TZJKbpdw5D3bplMMFpCVxlr2ezPJc6pYLLtiPYcZ5iU3wLzucV+OD3NshY98lAQuYy+oQTfoVZP4CyA77MesVFEKNo9CoFdA8sEFuEVouSBDZETfMELIauuFMJti/NyTNJies1EKKQtrr/dIM7+EKDrGeDi5PufV18KUqBfdjeXsf/HYnYBgGkGtIDNcc4GXUZwk5TT7RrGHmYaZB+F0fO6MNozDYyBBkbgjgWjOx0RxupmO2Gok8/IX/iebwhYVT6tgfJpm5BPZ2xVoEAahEgP6SLwXM8aB1JnKKT1wGMg7V/uW0TY5rk9g1nGTQi3WUUe0hTnPbjZGWkX0y5W4n5rrjzM0jhnzZAhx5YDlxyxlK35UXSs0ijiy2iZ2GVzm49+X6UDIFU6Hyc2b52SdZ4JLdPj3BWkkFEIClF6z8BxLHTPDzemuayxNQFnoCgXRwOno9PaBuD0XombAVGw1OocPwzQYmkGafBcwTWixv0e1L8iyr1nDrfUPuz8RUgLgt51jhnWmdA5fR9mXgU9pW2wYBiiNeWhBdpseFTjWD8KVPRZ+Fo1EFA0UA3aIQ1kAly779500A0zvHkLWn36glrdNh68jBw9HgW1Gj0OV+szE1j3PZLalyw25S+aEASjd41uhmsmlI7cbosbKIqRPB8mNMExzmF23VAV3FpsQ7uUfmv9/Z0P+cB8K9bM2c6+iSllo9X5D6L0QWAPC4oZqVn5BuP1E9VWJT4yW2Y4tNvggoQyNyd8GQpJjGjHSHIY97KfoAxS5qh3Pn4ML7X5M+AdzWAtKzQs0wiC9cFriYLsudpJOeCNh7ZQtCbVMiIbzbSyJedpmK3e5GcyX2Hhs6RBzxT3hUTC7vvaX2HKXbQlLmP8LC19CYsxsMlgi6b0xc/E0bBP6rz109QV0HN+LIJD5hHzJfLSgduFCcxL/ziqYvZtynZYM6D09+alvUS158cXOx+vT2XGYK8vMGHUgjGMmkaX7dFYZ2vSJFPaSkwmm17epsnddJIFW+WqsMCzXPTcQ6PBGstElUITCZm4JB3Pb9rx/OzOHak6z/aaTPu3RBrbE9yS2fi8dPbx8rWy8nFvc5gudF/AvS+nfiQEPrQGrHGa003ry79xQkt1uF3VAdTa+oHxztRTBKzaQSNu9VGOqHkeH1weE3toVNHh4EMR7EbqB0cfnWL2WEZaI5j66r13Mp3UTwfNCYIU1WHHRZbe8VbeZP+bpL9wlbckLWd0ApIm0bzAO77kktPuYZrBRXY+2WbV/APdYw+d+Z8aMP97peXk6dKTVMHqxx8H06X+aAzYVxvruLzv9THDTDVSk9daQfdsrGDfmO113vfZxZEMn/7W6Jzx2Sh+Ws+xAkBJdKhyVG1KzGpE6akOH1CetLn+fodPHe8BS5HkERw+0C8Q/968RhG5rrdSHNa+fRsrpaWH+/iwz5hmGcm9froa6euwYYplqEN9svKO3rhY5y4CI1iSZ4qAfIDximVAX03q50g7D0dE+SHN48nbLcGf5tn9eE7jScu2uvr9gLrt0amTsar0szO92JoXNewM9LE7LYq6eVkgqXIkpePVDhxfztk67kaquZGhb4FN3Eg9M/qh+RXKUJWd0ivVcwHXG1qcNVF30oM7Pakb8/96paLRhnsk3njE7CiRqa+mM6vN9iLmwx9SXzEaCr0dpXbiHQi9D4x/aujNms3/YFbDm390Bdf/AQ==
--------------------------------------------------------------------------------
/docs/static/images/pbuf_block_diagram.xml:
--------------------------------------------------------------------------------
1 | 5Vrdk5owEP9rfGyHACI+9ryrfbheO73p9OMtwiKpSJwY/Ohf3wSCgEHLzHnE2nvw2E02YX+7+WUTHTiT5W7K8Cr+SENIBrYV7gbO/cC2x95YfErFvlAMPbdQzBkJCxWqFM/kNyilpbQZCWHd6MgpTThZNZUBTVMIeEOHGaPbZreIJs1ZV3gOmuI5wImu/UZCHistKv2SDR+AzGM1tW+PioYZDhZzRrNUzTewnSj/K5qXuBxLObqOcUi3NZXzMHAmjFJePC13E0gktCVshd37E62H92aQ8i4GY6+w2OAkU77fZVEETAYPc6zeku9LZHLfQFpbA+duGxMOzyscyNatSAWhi/kyERISjxFNuQousqVMkmRCE8rysZwQgx8FQr/mjC6g1uIFPswi0aL7o1zcAOOwq6mUf1OgS+BsL7qoVttXWKtcPGC/rUW21MW1oLpKh1UyzQ9DV4CKB4XpCXxHGr5fQMALqYBM5m8m/BKTyxYL3SLaVke07Uug7Wto54DYFo0k2hnLPbs9lJHbJ8pjk5wxBD902/D17ZnjeZfB13UNcgYql0wn0rBvEe4+SQMhR4NbwxRCUR8okTIe0zlNcfJQae+aqNcQ/gWc7xXEOONUqKoRHildnYhEgXhZfrTEJvIDCFqpZuYP3aF1LjZrmrHgUHSVJRZmcyj7Wapik56fjSGDBHOyaVZOL8t/pAXkCXY89yRYgHyYKcK5udRHXZnmIqlfsocRKhfzeO35G47GM+ts/nYH2LOMUrnOLabqP0Nw90rlJWmZZQ4zSPfLHEhnjv9s0xy2bZrI3KY5vIbUN3T86XfT1O9Mej9lmqlN+jxlIku/OukbZkNE3i/MHe9MxFx3cq7cOi2YhaSyR4zl/9sjFa/XQlG/VLm6MJghnV7DUH4BccVhMERKfYbh59TxPt2TKaHk8QlRtly4/M1hthdUmK01ZEutWYsG7Aj/Xnv+IYd6O1TS/U6NnAv7UkiFw9/rQs1KipVZLpV2/VWvSB2UmtWrKiENVK9IP7h9XefXEBvMCJ4l8OrnY0CC4EZt2I69kYMvRG+HLDZzavNfvIQ6LY3rP76hi+e6Mv1MSb5BnNrOnKM4FitQWVWhfMcY3te6rWSH9Zl5jvJqfPS971+6l69VJVLxAlVaHSDpmGn6cVRf0PqVwb+3oI/LRv/11rMQq18GFEGpfn3hPPwB
--------------------------------------------------------------------------------
/docs/static/images/pbuf_block_diagram_after_free.xml:
--------------------------------------------------------------------------------
1 | 3VjLjpswFP0atiNjAyHLJp1OF21VdVS1XTpweXQcHDkmj359bTAvORmlmgjSsEjMuX5wz7k+wXHIcn14EnSTfeYxMAej+OCQ9w7G82CuPjVwrAE/8GogFXlcQ24HPOd/wIDIoGUew3bQUXLOZL4ZghEvCojkAKNC8P2wW8LZcNUNTcECniPKbPRHHsvMoG6Tlw58hDzNzNIhntWBFY1eUsHLwqznYJJUVx1e02Yuk+g2ozHf9yDy6JCl4FzWrfVhCUxT29BWj/twJto+t4BCXjJgbhLaUVaa3BdlkoDQ4lFJzVPKY8NMlRvo0cghi32WS3je0EhH96oUFJbJNVN3rmomvJBGXBfr+5yxJWdcVHOR2Icw9hS+lYK/QC8S4hUJAhWx8zEp7kBIOPQgk98T8DVIcVRdTJQ0XJtabLnf95RtsKwnqmcwaoopbafuCFUNw+kZQRCyCP4Gil8oFGe6gEuVmFpdR5A7Nd16hh6+XCJ1NTObpzpRY2/XBF2oCb6KJq6liUU8xMoQzC0XMuMpLyh77NDFUJqeDL9ByqPRgZaSK6ib4RPnm8vkSsIIouiUXKvQ93zURhqHwq/tly0vRdS6rMlXUpFC0w/5Nagzf1VDAYzKfDe0yrcJgi1BvsBBVplEL6AbK+NKd2dH7qV2dJ3SJxP6vVonOF3R8Wy+qozmCgR74aR+792M309E97hW7t+Cc0zD9MjOEVpMV4xgxBNd2KWoUrtDg/ZGpdl+IR+b5omqeVSaXfsV8CTNaq2FXqsaXdTOkhe6R0b19/1VezDmr6Vrv/jdmgwT7YZxZfAtCt9w/oFDLn/22r90lwf/vzgZuYFz5UOQGfqV51Uhn9t2BD1g1Lv84Yz1Sc1M0in7Tgh67HXb6A7b88viubVsf7p/7a8a9RN0ZdZSdGHlBZYBfN9Wp5EdFTldMe0F9un8mhscXOW0s1PVNA9mhF7JZ9sNPcLLm7rt/kGsVen+pSWPfwE=
--------------------------------------------------------------------------------
/docs/static/images/pbuf_cat_vs_chain_1.xml:
--------------------------------------------------------------------------------
1 | 3VhLj5swEP41XFdgwuvYpNntoa2qRlXbo4EJ0DgYGZOQ/vra2LyWbBRVeexuDsj+ZuxhvhmPhxj2Yls/MVykX2gMxEBmXBv2RwOhwA3EUwIHBTjuTAEJy2IFWT2wyv6CBk2NVlkM5UiRU0p4VozBiOY5RHyEYcbofqy2pmRstcAJTIBVhMkU/ZnFPNWo1folBZ8gS1Jt2keeEoQ42iSMVrm2ZyB73fyUeIvbvbSjZYpjuh9A9tKwF4xSrkbbegFEUtvSptY9viDt3ptBzs9ZELhqxQ6TSvs+r9ZrYDJ4mGP9lvzQMtP4BnK1adjzfZpxWBU4ktK9SAWBpXxLxMwSwzXNuQ6uheQ8I2RBCWXNXnbsgB/PBF5yRjcwkPgotF1XSKb+aBd3wDjUA0j79wR0C5wdhIqWIl9zrXMRzfR8P4hsG490ENRWD+tkSrqte0LFQHP6Ar/ehN/vIOiFXFAm87cSfgnjUmJa75FtdCbb6BJsBxO2v0LNG5+iDchBqLP7/RFt3pBoqzV2l7oh7LhRdIzg2AtC07wOwfYt64bVFoNXUDjuRPctC4dlotdQOe7E9G0rhzehEGLRfOkpZTylCc0xWfbofEzygFCoM/5rMP4tVR4cMfsDnB8017jiVED93p8pLc4MiR/B8ZCEvjNzzE7S9onoVJBKWrGo63V9BUr3T8aNAcE8241702NB0Eu/0awpDm28veDBNwNH3D/q6YwvDutZWDlmCXC9SR/ZD4zhw0CtkArlCbOOedTO4//pi4F6gz7NOorOzDx/csZ/lM2NtcMswyGBq5dSsERz4B3LpsD1bHyh1qA7vHdpDaxpa3DJE/8GzrXuQtU5enbBXO6wn19xp13xNO+nMXr7eX/Ni01M+690VY36f0Ls5T8=
--------------------------------------------------------------------------------
/docs/static/images/pbuf_cat_vs_chain_2.xml:
--------------------------------------------------------------------------------
1 | 3VhLj9owEP41ua7shLyOXfbRQ1tVRVXbo0mGJMXEyDg8+utrkwlJMCC0y4J2OQT7m7En883DVhxvOFs/SzbPv4oUuOOSdO14D47rUhq4+s8gmxoJwrAGMlmkqNQCo+IfIEgQrYoUFj1FJQRXxbwPJqIsIVE9jEkpVn21ieB9q3OWgQWMEsZt9FeRqnznV9wKPkOR5Wg6ctG/MUummRRVifYc15tsf7V4xpq90NFFzlKx6kDeo+MNpRCqHs3WQ+CG24a2et3TEenuvSWU6pwFcVCvWDJeoe/31WQC0gSPKYZvqTYNM1vfwKwmjne/ygsFozlLjHSlc0FjuZpxPaN6OBGlwuBS18wLzoeCC7ndy0t9iNKBxhdKiil0JJE79oJAS2x/0MUlSAXrDoT+PYOYgZIbrYJSN0KuMRfdAc5Xncg28cg7QW30GCZTttu6JVQPkNMj/IYWvz9A0wulpszkb6X90saNhNCPyLZ7JtvuBdimlFp0W5xCqksdp0KqXGSiZPyxRe/7rHcY/gtKbZBiVimhoXaHL0LMj0SiZrzpJAdiM4kSSJJDsRlH/sAnp2KzEJVM0LcY+5NiMoNGjSAHxvGTIZTAmSqW/R74quyPrXB8g7Xa+pFMwQzG2G0+XuKTayZ+Y+wmfVzbCQ5nbxrGY3Iye88neDC4YR+nxO4st2rkZ9BtdujgwyEhO7zpfQfuCq+PyVW7fdPYbttebpT9120v4SWPUVgX6ndn/Meo3Pnv4YClJLr0YYpLv4ti20Ga4ySM7yIS+/qQqp9+P/x0L6z1iY+btJH9JCXbdNTmRmFxwqxPDtp5epm+HtRv0KbZjqIzMy+yavznYnusLZks2JjDm/dboPoGER7KnTgIPXah+8OueG9S4NS+P1yy4t9BXV/n5vyiohzspQYNTxflvv7li9K+19tFaSfQ+yvK/Us9Dd6uKPW0/e5TR6X9uOY9/gc=
--------------------------------------------------------------------------------
/docs/static/images/pbuf_cat_vs_chain_3.xml:
--------------------------------------------------------------------------------
1 | 3VhLc5swEP41XDMSb46Nm6SHttNpptP2KMMaaGTkkYUf/fWVzGLAcjyehNiTcmCkb1cS++1DOzjeZL55kGxRfBEZcMcl2cbxPjquG1Nfvw2wbQA/QiCXZdZAtAMey7+AIEG0LjNYDhSVEFyViyGYiqqCVA0wJqVYD9Vmgg9PXbAcLOAxZdxGf5aZKhClYdIJPkGZF3h07EaNYMrSp1yKusLzHNeb7Z5GPGftXmjosmCZWPcg787xJlII1YzmmwlwQ21LW7Pu/hnp/rslVOqcBUnYrFgxXqPtt/VsBtI4jymGX6m2LTM728CsJo53uy5KBY8LlhrpWoeCxgo153pG9XAmKoXOpa6Zl5xPBBdyt5eXBRBnvsaXSoon6Elid+qFoZbY9qCJK5AKNj0I7XsAMQclt1oFpW6MXGMsuj7O1z3Ptv4oek5t9RgGU77fuiNUD5DTZ/iNLH6/g6YXKk2Zid9a26UPNxJC/0e23TPZdkdgm1Jq0W1xCplOdZwKqQqRi4rxuw69HbLeY/gPKLVFilmthIa6HT4LsTjPE7M4hTQ95olpHPgB2Uva2uOe8s1S1DJF2xKsT4rJHFo1ghwYw0+6UAJnqlwNa+Croj+x3PEVNmpnR/oEZjDFavP/BT65ZOC3h12ljutzwuPxnEXJlJBxCPb9K9ZxSuzK8nwht4vOhek2O/TwyYSQPd7WviO9wut9ctFq3/J83fJypei/bHmJxrxGYVOqX73xb6NyE7yHC5aSeOzLFJd+E+WugrTXSZTcxCQJ9CXVvIOh++mBW5sbHzfpPPtBSrbtqS2MwvLEsQE5es79y/T1oPmCLsz2FJ0ZebGV4z+Wu2ttxWTJphzevHEGqjuI6Fg0JWHksZH6h33yXiXBqd0/jJnx7yCvL9M5vygp/YPQoNHppDzUHz8p7b7eTsq3bYIuk5SHTT0N3y4p9bT779N4pfu35t39Aw==
--------------------------------------------------------------------------------
/docs/static/images/system_structure.xml:
--------------------------------------------------------------------------------
1 | 3ZZNj5swEIZ/DcdKYO8S59ik6fawlSrRqmfHHsBag5FxQuivrw3mq+xue1haqTkg+x3PmHk8jBPgY3F70LTKPysOMkAhvwX4Q4AQucf26YS2F+5I3AuZFryXoklIxA/wYujVi+BQLxYapaQR1VJkqiyBmYVGtVbNclmq5HLXimawEhJG5Vr9LrjJvRrF+8nwCUSW+60J2vWGM2VPmVaX0u8XIJx2v95c0CGWT7TOKVfNTMKnAB+1UqYfFbcjSId2wNb7fXzBOr63htL8icPen8uVyovP/VsN2mGsKikYNUKV/lVNO+DpEgQXIgzwocmFgaSizFkbWw9Wy00h7Syyw1RIeVRS6c7X4UCMWb02Wj3BzIIJDqOd81Cl8TURWSKHdVI+zytoA7eZ5JN8AFWA0a1d4q0o9MCHgvTTZjrdcUk+O9hhHfUFlY2RJ6h24Lm+wHi3YnxKvljh/Vf7eBTnAMXS7nc4W+5x5kaF4FxCYzN+U/acAklfZ78Ba/I3WZMV66StDRRrxumlZK666zcub4h/U94bII7QmnG0GeP9ivGjat5JuHaXwDZc+T0Qfrc1V/wvuY6BZ2CHshVD1drOQVAcD7qNOZqsp3Kd+zkfjJ73+PWjqPK2tl2/u8zhKtj/0H+ieLsGZKfTZd3ZZn+I8Okn
--------------------------------------------------------------------------------
/docs/static/images/update_process_step_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/update_process_step_1.png
--------------------------------------------------------------------------------
/docs/static/images/update_process_step_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/update_process_step_2.png
--------------------------------------------------------------------------------
/docs/static/images/update_process_step_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/update_process_step_4.png
--------------------------------------------------------------------------------
/docs/static/images/update_process_step_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/update_process_step_5.png
--------------------------------------------------------------------------------
/docs/static/images/update_process_step_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/update_process_step_6.png
--------------------------------------------------------------------------------
/docs/static/images/update_process_step_6_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/docs/static/images/update_process_step_6_test.png
--------------------------------------------------------------------------------
/docs/user-manual/architecture.rst:
--------------------------------------------------------------------------------
1 | .. _um_arch:
2 |
3 | Architecture
4 | ============
5 |
6 | Architecture of the library consists of ``4`` layers.
7 |
8 | .. figure:: ../static/images/system_structure.svg
9 | :align: center
10 | :alt: ESP-AT layer architecture overview
11 |
12 | ESP-AT layer architecture overview
13 |
14 | Application layer
15 | ^^^^^^^^^^^^^^^^^
16 |
17 | *User layer* is the highest layer of the final application.
18 | This is the part where API functions are called to execute some command.
19 |
20 | Middleware layer
21 | ^^^^^^^^^^^^^^^^
22 |
23 | Middleware part is actively developed and shall not be modified by customer by any means.
24 | If there is a necessity to do it, often it means that developer of the application uses it wrongly.
25 | This part is platform independent and does not use any specific compiler features for proper operation.
26 |
27 | .. note::
28 | There is no compiler specific features implemented in this layer.
29 |
30 | System & low-level layer
31 | ^^^^^^^^^^^^^^^^^^^^^^^^
32 |
33 | Application needs to fully implement this part and resolve it with care.
34 | Functions are related to actual implementation with *ESP* device and are highly
35 | architecture oriented. Some examples for `WIN32` and `ARM Cortex-M` are included with library.
36 |
37 | .. tip::
38 | Check :ref:`um_porting_guide` for detailed instructions and examples.
39 |
40 | System functions
41 | ****************
42 |
43 | System functions are bridge between operating system running on embedded system and ESP-AT Library.
44 | Functions need to provide:
45 |
46 | * Thread management
47 | * Binary semaphore management
48 | * Recursive mutex management
49 | * Message queue management
50 | * Current time status information
51 |
52 | .. tip::
53 | System function prototypes are available in :ref:`api_esp_sys` section.
54 |
55 | Low-level implementation
56 | ************************
57 |
58 | Low-Level, or *ESP_LL*, is part, dedicated for communication between *ESP-AT* middleware and *ESP* physical device.
59 | Application needs to implement output function to send necessary *AT command* instruction aswell as implement
60 | *input module* to send received data from *ESP* device to *ESP-AT* middleware.
61 |
62 | Application must also assure memory assignment for :ref:`api_esp_mem` when default allocation is used.
63 |
64 | .. tip::
65 | Low level, input module & memory function prototypes are available in
66 | :ref:`api_esp_ll`, :ref:`api_esp_input` and :ref:`api_esp_mem` respectfully.
67 |
68 | ESP physical device
69 | ^^^^^^^^^^^^^^^^^^^
70 |
71 | .. toctree::
72 | :maxdepth: 2
--------------------------------------------------------------------------------
/docs/user-manual/blocking-nonblocking.rst:
--------------------------------------------------------------------------------
1 | .. _um_blocking_nonblocking:
2 |
3 | Blocking or non-blocking API calls
4 | ==================================
5 |
6 | API functions often allow application to set ``blocking`` parameter indicating if function shall be blocking or non-blocking.
7 |
8 | Blocking mode
9 | ^^^^^^^^^^^^^
10 |
11 | When the function is called in blocking mode ``blocking = 1``, application thread gets suspended until response from *ESP* device is received.
12 | If there is a queue of multiple commands, thread may wait a while before receiving data.
13 |
14 | When API function returns, application has valid response data and can react immediately.
15 |
16 | * Linear programming model may be used
17 | * Application may use multiple threads for real-time execution to prevent system stalling when running function call
18 |
19 | .. warning::
20 | Due to internal architecture, it is not allowed to call API functions in *blocking mode* from events or callbacks.
21 | Any attempt to do so will result in function returning error.
22 |
23 | Example code:
24 |
25 | .. literalinclude:: ../examples_src/command_blocking.c
26 | :language: c
27 | :linenos:
28 | :caption: Blocking command example
29 |
30 | Non-blocking mode
31 | ^^^^^^^^^^^^^^^^^
32 |
33 | If the API function is called in non-blocking mode, function will return immediately with status indicating if command request has been successfully sent to internal command queue.
34 | Response has to be processed in event callback function.
35 |
36 | .. warning::
37 | Due to internal architecture, it is only allowed to call API functions in *non-blocking mode* from events or callbacks.
38 | Any attempt to do so will result in function returning error.
39 |
40 | Example code:
41 |
42 | .. literalinclude:: ../examples_src/command_nonblocking.c
43 | :language: c
44 | :linenos:
45 | :caption: Non-blocking command example
46 |
47 | .. warning::
48 | When using non-blocking API calls, do not use local variables as parameter.
49 | This may introduce *undefined behavior* and *memory corruption* if application function returns before command is executed.
50 |
51 | Example of a bad code:
52 |
53 | .. literalinclude:: ../examples_src/command_nonblocking_bad.c
54 | :language: c
55 | :linenos:
56 | :caption: Example of bad usage of non-blocking command
57 |
58 | .. toctree::
59 | :maxdepth: 2
60 | :glob:
--------------------------------------------------------------------------------
/docs/user-manual/index.rst:
--------------------------------------------------------------------------------
1 | .. _um:
2 |
3 | User manual
4 | ===========
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 |
9 | overview
10 | architecture
11 | inter-thread-comm
12 | events-cb-fn
13 | blocking-nonblocking
14 | porting-guide
15 |
--------------------------------------------------------------------------------
/docs/user-manual/overview.rst:
--------------------------------------------------------------------------------
1 | .. _um_overview:
2 |
3 | Overview
4 | ========
5 |
6 | WiFi devices (focus on *ESP8266* and *ESP32*) from *Espressif Systems* are low-cost and very useful for embedded projects.
7 | These are classic microcontrollers without embedded flash memory. Application needs to assure external Quad-SPI flash to execute code from it directly.
8 |
9 | *Espressif* offers SDK to program these microcontrollers directly and run code from there.
10 | It is called *RTOS-based SDK*, written in C language, and allows customers to program MCU starting with ``main`` function.
11 | These devices have some basic peripherals, such as GPIO, ADC, SPI, I2C, UART, etc. Pretty basic though.
12 |
13 | Wifi connectivity is often part of bigger system with more powerful MCU.
14 | There is usually bigger MCU + Wifi transceiver (usually module) aside with UART/SPI communication.
15 | MCU handles application, such as display & graphics, runs operating systems, drives motor and has additional external memories.
16 |
17 | .. figure:: ../static/images/example_app_arch.svg
18 | :align: center
19 | :alt: Typical application example with access to WiFi
20 |
21 | Typical application example with access to WiFi
22 |
23 | *Espressif* is not only developing *RTOS SDK* firmware, it also develops *AT Slave firmware* based on *RTOS-SDK*.
24 | This is a special application, which is running on *ESP* device and allows host MCU to send *AT commands* and get response for it.
25 | Now it is time to use *ESP-AT Lib* you are reading this manual for.
26 |
27 | *ESP-AT Lib* has been developed to allow customers to:
28 |
29 | * Develop on single (host MCU) architecture at the same time and do not care about *Espressif* arch
30 | * Shorten time to market
31 |
32 | Customers using *ESP-AT Lib* do not need to take care about proper command for specific task,
33 | they can call API functions, such as :cpp:func:`esp_sta_join` to join WiFi network instead.
34 | Library will take the necessary steps in order to send right command to device via low-level driver (usually UART) and
35 | process incoming response from device before it will notify application layer if it was successfuly or not.
36 |
37 | .. note::
38 | *ESP-AT Lib* offers efficient communication between host MCU at one side and *Espressif* wifi transceiver on another side.
39 |
40 | To summarize:
41 |
42 | * *ESP* device runs official *AT* firmware, provided by *Espressif systems*
43 | * Host MCU runs custom application, together with *ESP-AT Lib* library
44 | * Host MCU communicates with *ESP* device with UART or similar interface.
45 |
46 | .. toctree::
47 | :maxdepth: 2
48 | :glob:
--------------------------------------------------------------------------------
/examples/stm32/client_rtos_stm32l496g_discovery/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_PING 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/client_rtos_stm32l496g_discovery/inc/stm32l4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f7xx_it.h
4 | * @brief This file contains the headers of the interrupt handlers.
5 | ******************************************************************************
6 | *
7 | * COPYRIGHT(c) 2018 STMicroelectronics
8 | *
9 | * Redistribution and use in source and binary forms, with or without modification,
10 | * are permitted provided that the following conditions are met:
11 | * 1. Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
17 | * may be used to endorse or promote products derived from this software
18 | * without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | *
31 | ******************************************************************************
32 | */
33 |
34 | /* Define to prevent recursive inclusion -------------------------------------*/
35 | #ifndef __STM32F7xx_IT_H
36 | #define __STM32F7xx_IT_H
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | /* Includes ------------------------------------------------------------------*/
43 | #include "main.h"
44 | /* Exported types ------------------------------------------------------------*/
45 | /* Exported constants --------------------------------------------------------*/
46 | /* Exported macro ------------------------------------------------------------*/
47 | /* Exported functions ------------------------------------------------------- */
48 |
49 | void NMI_Handler(void);
50 | void HardFault_Handler(void);
51 | void MemManage_Handler(void);
52 | void BusFault_Handler(void);
53 | void UsageFault_Handler(void);
54 | void SVC_Handler(void);
55 | void DebugMon_Handler(void);
56 | void PendSV_Handler(void);
57 | void SysTick_Handler(void);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __STM32F7xx_IT_H */
64 |
65 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
66 |
--------------------------------------------------------------------------------
/examples/stm32/device_present_rtos_stm32f429zi_nucleo/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_PING 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/device_present_rtos_stm32f429zi_nucleo/inc/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f7xx_it.h
4 | * @brief This file contains the headers of the interrupt handlers.
5 | ******************************************************************************
6 | *
7 | * COPYRIGHT(c) 2018 STMicroelectronics
8 | *
9 | * Redistribution and use in source and binary forms, with or without modification,
10 | * are permitted provided that the following conditions are met:
11 | * 1. Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
17 | * may be used to endorse or promote products derived from this software
18 | * without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | *
31 | ******************************************************************************
32 | */
33 |
34 | /* Define to prevent recursive inclusion -------------------------------------*/
35 | #ifndef __STM32F7xx_IT_H
36 | #define __STM32F7xx_IT_H
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | /* Includes ------------------------------------------------------------------*/
43 | #include "main.h"
44 | /* Exported types ------------------------------------------------------------*/
45 | /* Exported constants --------------------------------------------------------*/
46 | /* Exported macro ------------------------------------------------------------*/
47 | /* Exported functions ------------------------------------------------------- */
48 |
49 | void NMI_Handler(void);
50 | void HardFault_Handler(void);
51 | void MemManage_Handler(void);
52 | void BusFault_Handler(void);
53 | void UsageFault_Handler(void);
54 | void SVC_Handler(void);
55 | void DebugMon_Handler(void);
56 | void PendSV_Handler(void);
57 | void SysTick_Handler(void);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __STM32F7xx_IT_H */
64 |
65 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
66 |
--------------------------------------------------------------------------------
/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/mqtt_client_api_rtos_stm32f429zi_nucleo/inc/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f7xx_it.h
4 | * @brief This file contains the headers of the interrupt handlers.
5 | ******************************************************************************
6 | *
7 | * COPYRIGHT(c) 2018 STMicroelectronics
8 | *
9 | * Redistribution and use in source and binary forms, with or without modification,
10 | * are permitted provided that the following conditions are met:
11 | * 1. Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
17 | * may be used to endorse or promote products derived from this software
18 | * without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | *
31 | ******************************************************************************
32 | */
33 |
34 | /* Define to prevent recursive inclusion -------------------------------------*/
35 | #ifndef __STM32F7xx_IT_H
36 | #define __STM32F7xx_IT_H
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | /* Includes ------------------------------------------------------------------*/
43 | #include "main.h"
44 | /* Exported types ------------------------------------------------------------*/
45 | /* Exported constants --------------------------------------------------------*/
46 | /* Exported macro ------------------------------------------------------------*/
47 | /* Exported functions ------------------------------------------------------- */
48 |
49 | void NMI_Handler(void);
50 | void HardFault_Handler(void);
51 | void MemManage_Handler(void);
52 | void BusFault_Handler(void);
53 | void UsageFault_Handler(void);
54 | void SVC_Handler(void);
55 | void DebugMon_Handler(void);
56 | void PendSV_Handler(void);
57 | void SysTick_Handler(void);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __STM32F7xx_IT_H */
64 |
65 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
66 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_client_rtos_stm32f429zi_nucleo/inc/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f7xx_it.h
4 | * @brief This file contains the headers of the interrupt handlers.
5 | ******************************************************************************
6 | *
7 | * COPYRIGHT(c) 2018 STMicroelectronics
8 | *
9 | * Redistribution and use in source and binary forms, with or without modification,
10 | * are permitted provided that the following conditions are met:
11 | * 1. Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
17 | * may be used to endorse or promote products derived from this software
18 | * without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | *
31 | ******************************************************************************
32 | */
33 |
34 | /* Define to prevent recursive inclusion -------------------------------------*/
35 | #ifndef __STM32F7xx_IT_H
36 | #define __STM32F7xx_IT_H
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | /* Includes ------------------------------------------------------------------*/
43 | #include "main.h"
44 | /* Exported types ------------------------------------------------------------*/
45 | /* Exported constants --------------------------------------------------------*/
46 | /* Exported macro ------------------------------------------------------------*/
47 | /* Exported functions ------------------------------------------------------- */
48 |
49 | void NMI_Handler(void);
50 | void HardFault_Handler(void);
51 | void MemManage_Handler(void);
52 | void BusFault_Handler(void);
53 | void UsageFault_Handler(void);
54 | void SVC_Handler(void);
55 | void DebugMon_Handler(void);
56 | void PendSV_Handler(void);
57 | void SysTick_Handler(void);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __STM32F7xx_IT_H */
64 |
65 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
66 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_client_rtos_stm32l496g_discovery/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_server_rtos_stm32f723e_discovery/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_server_rtos_stm32f769i_discovery/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_server_rtos_stm32l432kc_nucleo/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_server_rtos_stm32l432kc_nucleo/inc/stm32l4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f7xx_it.h
4 | * @brief This file contains the headers of the interrupt handlers.
5 | ******************************************************************************
6 | *
7 | * COPYRIGHT(c) 2018 STMicroelectronics
8 | *
9 | * Redistribution and use in source and binary forms, with or without modification,
10 | * are permitted provided that the following conditions are met:
11 | * 1. Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
17 | * may be used to endorse or promote products derived from this software
18 | * without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | *
31 | ******************************************************************************
32 | */
33 |
34 | /* Define to prevent recursive inclusion -------------------------------------*/
35 | #ifndef __STM32F7xx_IT_H
36 | #define __STM32F7xx_IT_H
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | /* Includes ------------------------------------------------------------------*/
43 | #include "main.h"
44 | /* Exported types ------------------------------------------------------------*/
45 | /* Exported constants --------------------------------------------------------*/
46 | /* Exported macro ------------------------------------------------------------*/
47 | /* Exported functions ------------------------------------------------------- */
48 |
49 | void NMI_Handler(void);
50 | void HardFault_Handler(void);
51 | void MemManage_Handler(void);
52 | void BusFault_Handler(void);
53 | void UsageFault_Handler(void);
54 | void SVC_Handler(void);
55 | void DebugMon_Handler(void);
56 | void PendSV_Handler(void);
57 | void SysTick_Handler(void);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __STM32F7xx_IT_H */
64 |
65 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
66 |
--------------------------------------------------------------------------------
/examples/stm32/netconn_server_rtos_stm32l496g_discovery/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/server_echo_rtos_stm32l496g_discovery/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_PING 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/stm32/telnet_cli_server_rtos_stm32l432kc_nucleo/inc/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* Include default configuration setup */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/win32/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/examples/win32/README.md
--------------------------------------------------------------------------------
/examples/win32/access_point_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | /* After user configuration, call default config to merge config together */
42 | #include "esp/esp_config_default.h"
43 |
44 | #endif /* ESP_HDR_CONFIG_H */
45 |
--------------------------------------------------------------------------------
/examples/win32/client_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | /* After user configuration, call default config to merge config together */
42 | #include "esp/esp_config_default.h"
43 |
44 | #endif /* ESP_HDR_CONFIG_H */
45 |
--------------------------------------------------------------------------------
/examples/win32/dns_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_DNS 1
42 |
43 | /* After user configuration, call default config to merge config together */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/win32/mqtt_client_api_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | /* After user configuration, call default config to merge config together */
42 | #include "esp/esp_config_default.h"
43 |
44 | #endif /* ESP_HDR_CONFIG_H */
45 |
--------------------------------------------------------------------------------
/examples/win32/mqtt_client_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_PING 1
42 |
43 | /* After user configuration, call default config to merge config together */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/win32/netconn_client_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* After user configuration, call default config to merge config together */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/win32/netconn_server_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_NETCONN 1
42 |
43 | /* After user configuration, call default config to merge config together */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/examples/win32/server_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | /* After user configuration, call default config to merge config together */
42 | #include "esp/esp_config_default.h"
43 |
44 | #endif /* ESP_HDR_CONFIG_H */
45 |
--------------------------------------------------------------------------------
/examples/win32/sntp_rtos/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_INPUT_USE_PROCESS 1
40 |
41 | #define ESP_CFG_SNTP 1
42 |
43 | /* After user configuration, call default config to merge config together */
44 | #include "esp/esp_config_default.h"
45 |
46 | #endif /* ESP_HDR_CONFIG_H */
47 |
--------------------------------------------------------------------------------
/extras/arduino-link-create.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal EnableExtensions
3 | setlocal EnableDelayedExpansion
4 |
5 | :: Change current directory for 'Run As Admin'
6 | cd %~dp0
7 |
8 | setlocal
9 |
10 | cd ..\src
11 | if not exist esp mkdir esp
12 | for %%i in (..\esp_at_lib\src\esp\*.c) do (
13 | call :GetFileName fname "%%i"
14 | call :FileLink esp\!fname! "..\%%i"
15 | )
16 |
17 | for %%i in (..\esp_at_lib\src\include\esp\*.h) do (
18 | call :GetFileName fname "%%i"
19 | call :FileLink esp\!fname! "..\%%i"
20 | )
21 |
22 | if not exist cli mkdir cli
23 | for %%i in (..\esp_at_lib\src\cli\*.c) do (
24 | call :GetFileName fname "%%i"
25 | call :FileLink cli\!fname! "..\%%i"
26 | )
27 |
28 | for %%i in (..\esp_at_lib\src\include\cli\*.h) do (
29 | call :GetFileName fname "%%i"
30 | call :FileLink cli\!fname! "..\%%i"
31 | )
32 |
33 | if not exist system mkdir system
34 | for %%i in (..\esp_at_lib\src\system\esp_sys_freertos_os.c) do (
35 | call :GetFileName fname "%%i"
36 | call :FileLink system\!fname! "..\%%i"
37 | )
38 | call :FileLink esp_sys_port.h ..\esp_at_lib\src\include\system\port\freertos\esp_sys_port.h
39 |
40 | call :FileLink system\esp_ll.h "..\..\esp_at_lib\src\include\system\esp_ll.h"
41 | call :FileLink system\esp_sys.h "..\..\esp_at_lib\src\include\system\esp_sys.h"
42 |
43 | call :FileLink station_manager.h "..\snippets\include\station_manager.h"
44 | :: call :FileLink station_manager.c "..\snippets\station_manager.c"
45 |
46 | if not exist api mkdir api
47 | for %%i in (..\esp_at_lib\src\api\esp_netconn.c) do (
48 | call :GetFileName fname "%%i"
49 | call :FileLink api\!fname! "..\%%i"
50 | )
51 |
52 | goto :eof
53 |
54 | :GetFileName
55 | REM --Get the file name in the path
56 | setlocal
57 | set filename=%~nx2
58 | (
59 | endlocal & REM -- RETURN VALUES
60 | if "%~1" neq "" (
61 | set %~1=%filename%
62 | )
63 | )
64 | goto :eof
65 |
66 | :FileLink
67 | REM --Make a file linkage, could be mklink or copy directly.
68 | setlocal
69 | set link=%~1
70 | set tar=%~2
71 |
72 | :: mklink %link% %tar%
73 |
74 | :: up link
75 | :: or
76 | :: below copy
77 |
78 | set linkpath=%~p1
79 | set linkname=%~nx1
80 | cd %linkpath%
81 | echo copy %tar% %linkname%
82 | copy %tar% %linkname%
83 | (
84 | endlocal & REM -- RETURN VALUES
85 | )
86 | goto :eof
87 |
--------------------------------------------------------------------------------
/extras/arduino-link-remove.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal EnableExtensions
3 | setlocal EnableDelayedExpansion
4 |
5 | :: Change current directory for 'Run As Admin'
6 | cd %~dp0
7 |
8 | setlocal
9 |
10 | cd ..\src
11 | if not exist esp mkdir esp
12 | for %%i in (..\esp_at_lib\src\esp\*.c) do (
13 | call :GetFileName fname "%%i"
14 | del esp\!fname!
15 | )
16 |
17 | for %%i in (..\esp_at_lib\src\include\esp\*.h) do (
18 | call :GetFileName fname "%%i"
19 | del esp\!fname!
20 | )
21 |
22 | if not exist cli mkdir cli
23 | for %%i in (..\esp_at_lib\src\cli\*.c) do (
24 | call :GetFileName fname "%%i"
25 | del cli\!fname!
26 | )
27 |
28 | for %%i in (..\esp_at_lib\src\include\cli\*.h) do (
29 | call :GetFileName fname "%%i"
30 | del cli\!fname!
31 | )
32 |
33 | for %%i in (..\esp_at_lib\src\system\esp_sys_*_os.c) do (
34 | call :GetFileName fname "%%i"
35 | del system\!fname!
36 | )
37 | del esp_sys_port.h
38 |
39 |
40 | del system\esp_ll.h
41 | del system\esp_sys.h
42 | del system\esp_sys_*_os.h
43 |
44 | del station_manager.h
45 | :- del station_manager.c
46 |
47 | for %%i in (..\esp_at_lib\src\api\esp_netconn.c) do (
48 | call :GetFileName fname "%%i"
49 | del api\!fname!
50 | )
51 |
52 | goto :eof
53 |
54 | :GetFileName
55 | REM --Get the file name in the path
56 | setlocal
57 | set filename=%~nx2
58 | (
59 | endlocal & REM -- RETURN VALUES
60 | if "%~1" neq "" (
61 | set %~1=%filename%
62 | )
63 | )
64 | goto :eof
65 |
--------------------------------------------------------------------------------
/library.properties:
--------------------------------------------------------------------------------
1 | name=esp-at-lib
2 | version=1.0
3 | author=Peter Yang
4 | maintainer=Peter Yang
5 | sentence=Seeed library for communication with WiFi & BLE through AT interface.
6 | paragraph=Seeed library for communication with WiFi & BLE through AT interface.
7 | category=Communication
8 | url=https://github.com/Seeed-Studio/esp-at-lib.git
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/snippets/dns.c:
--------------------------------------------------------------------------------
1 | #include "dns.h"
2 | #include "esp/esp.h"
3 |
4 | /* Host to resolve */
5 | #define DNS_HOST1 "example.com"
6 | #define DNS_HOST2 "example.net"
7 |
8 | /**
9 | * \brief Variable to hold result of DNS resolver
10 | */
11 | static esp_ip_t ip;
12 |
13 | /**
14 | * \brief Event callback function for API call,
15 | * called when API command finished with execution
16 | */
17 | static void
18 | dns_resolve_evt(espr_t res, void* arg) {
19 | /* Check result of command */
20 | if (res == espOK) {
21 | /* DNS resolver has IP address */
22 | printf("DNS record for %s (from API callback): %d.%d.%d.%d\r\n",
23 | (const char *)arg, (int)ip.ip[0], (int)ip.ip[1], (int)ip.ip[2], (int)ip.ip[3]);
24 | }
25 | }
26 |
27 | /**
28 | * \brief Start DNS resolver
29 | */
30 | void
31 | dns_start(void) {
32 | /* Use DNS protocol to get IP address of domain name */
33 |
34 | /* Get IP with non-blocking mode */
35 | if (esp_dns_gethostbyname(DNS_HOST2, &ip, dns_resolve_evt, DNS_HOST2, 0) == espOK) {
36 | printf("Request for DNS record for " DNS_HOST2 " has started\r\n");
37 | } else {
38 | printf("Could not start command for DNS\r\n");
39 | }
40 |
41 | /* Get IP with blocking mode */
42 | if (esp_dns_gethostbyname(DNS_HOST1, &ip, dns_resolve_evt, DNS_HOST1, 1) == espOK) {
43 | printf("DNS record for " DNS_HOST1 " (from lin code): %d.%d.%d.%d\r\n",
44 | (int)ip.ip[0], (int)ip.ip[1], (int)ip.ip[2], (int)ip.ip[3]);
45 | } else {
46 | printf("Could not retrieve IP address for " DNS_HOST1 "\r\n");
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/snippets/include/client.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_CLIENT_H
2 | #define SNIPPET_HDR_CLIENT_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void client_connect(void);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/include/dns.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_DNS_H
2 | #define SNIPPET_HDR_DNS_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void dns_start(void);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/include/http_server.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_HTTP_SERVER_H
2 | #define SNIPPET_HDR_HTTP_SERVER_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | #include "esp/esp.h"
9 |
10 | espr_t http_server_start(void);
11 |
12 | #ifdef __cplusplus
13 | }
14 | #endif
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/snippets/include/mqtt_client.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_MQTT_CLIENT_H
2 | #define SNIPPET_HDR_MQTT_CLIENT_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void mqtt_client_thread(void const* arg);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/include/mqtt_client_api.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_MQTT_CLIENT_API_H
2 | #define SNIPPET_HDR_MQTT_CLIENT_API_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void mqtt_client_api_thread(void const* arg);
9 | void mqtt_client_api_cayenne_thread(void const* arg);
10 |
11 | #ifdef __cplusplus
12 | }
13 | #endif
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/snippets/include/netconn_client.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_NETCONN_CLIENT_H
2 | #define SNIPPET_HDR_NETCONN_CLIENT_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void netconn_client_thread(void const* arg);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/include/netconn_server.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_NETCONN_SERVER_H
2 | #define SNIPPET_HDR_NETCONN_SERVER_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void netconn_server_thread(void const* arg);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/include/netconn_server_1thread.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_NETCONN_SERVER_1THREAD_H
2 | #define SNIPPET_HDR_NETCONN_SERVER_1THREAD_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void netconn_server_1thread_thread(void* arg);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/include/sntp.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_SNTP_H
2 | #define SNIPPET_HDR_SNTP_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void sntp_gettime(void);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/include/station_manager.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_STATION_MANAGER_H
2 | #define SNIPPET_HDR_STATION_MANAGER_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | #include
9 | #include "esp/esp.h"
10 |
11 | /**
12 | * \brief Lookup table for preferred SSIDs with password for auto connect feature
13 | */
14 | typedef struct {
15 | const char* ssid;
16 | const char* pass;
17 | } ap_entry_t;
18 |
19 | espr_t connect_to_preferred_access_point(uint8_t unlimited);
20 | void start_access_point_scan_and_connect_procedure(void);
21 |
22 | #ifdef __cplusplus
23 | }
24 | #endif
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/snippets/include/telnet_server.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_TELNET_SERVER_H
2 | #define SNIPPET_HDR_TELNET_SERVER_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void telnet_server_thread(void const* arg);
9 |
10 | #ifdef __cplusplus
11 | }
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/snippets/netconn_server_1thread.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Netconn server example is based on single thread
3 | * and it listens for single client only on port 23
4 | */
5 | #include "netconn_server_1thread.h"
6 | #include "esp/esp.h"
7 |
8 | /**
9 | * \brief Basic thread for netconn server to test connections
10 | * \param[in] arg: User argument
11 | */
12 | void
13 | netconn_server_1thread_thread(void* arg) {
14 | espr_t res;
15 | esp_netconn_p server, client;
16 | esp_pbuf_p p;
17 |
18 | /* Create netconn for server */
19 | server = esp_netconn_new(ESP_NETCONN_TYPE_TCP);
20 | if (server == NULL) {
21 | printf("Cannot create server netconn!\r\n");
22 | }
23 |
24 | /* Bind it to port 23 */
25 | res = esp_netconn_bind(server, 23);
26 | if (res != espOK) {
27 | printf("Cannot bind server\r\n");
28 | goto out;
29 | }
30 |
31 | /* Start listening for incoming connections with maximal 1 client */
32 | res = esp_netconn_listen_with_max_conn(server, 1);
33 | if (res != espOK) {
34 | goto out;
35 | }
36 |
37 | /* Unlimited loop */
38 | while (1) {
39 | /* Accept new client */
40 | res = esp_netconn_accept(server, &client);
41 | if (res != espOK) {
42 | break;
43 | }
44 | printf("New client accepted!\r\n");
45 | while (1) {
46 | /* Receive data */
47 | res = esp_netconn_receive(client, &p);
48 | if (res == espOK) {
49 | printf("Data received!\r\n");
50 | esp_pbuf_free(p);
51 | } else {
52 | printf("Netconn receive returned: %d\r\n", (int)res);
53 | if (res == espCLOSED) {
54 | printf("Connection closed by client\r\n");
55 | break;
56 | }
57 | }
58 | }
59 | /* Delete client */
60 | if (client != NULL) {
61 | esp_netconn_delete(client);
62 | client = NULL;
63 | }
64 | }
65 | /* Delete client */
66 | if (client != NULL) {
67 | esp_netconn_delete(client);
68 | client = NULL;
69 | }
70 |
71 | out:
72 | printf("Terminating netconn thread!\r\n");
73 | if (server != NULL) {
74 | esp_netconn_delete(server);
75 | }
76 | esp_sys_thread_terminate(NULL);
77 | }
78 |
--------------------------------------------------------------------------------
/snippets/sntp.c:
--------------------------------------------------------------------------------
1 | #include "sntp.h"
2 | #include "esp/esp.h"
3 |
4 | /**
5 | * \brief Run SNTP
6 | */
7 | void
8 | sntp_gettime(void) {
9 | esp_datetime_t dt;
10 |
11 | /* Enable SNTP with default configuration for NTP servers */
12 | if (esp_sntp_configure(1, 1, NULL, NULL, NULL, NULL, NULL, 1) == espOK) {
13 | esp_delay(5000);
14 |
15 | /* Get actual time and print it */
16 | if (esp_sntp_gettime(&dt, NULL, NULL, 1) == espOK) {
17 | printf("Date & time: %d.%d.%d, %d:%d:%d\r\n",
18 | (int)dt.date, (int)dt.month, (int)dt.year,
19 | (int)dt.hours, (int)dt.minutes, (int)dt.seconds);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/cli/cli_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file cli_config.h
3 | * \brief Command line interface configuration file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2019 Miha CESNIK
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * Author: Miha CESNIK <>
30 | * Version: $_version_$
31 | */
32 | #ifndef __CLI_CONFIG_H
33 | #define __CLI_CONFIG_H
34 |
35 | #ifdef __cplusplus
36 | extern "C" {
37 | #endif
38 |
39 | /**
40 | * \ingroup CLI
41 | * \defgroup CLI_CONFIG Configuration
42 | * \brief Default CLI configuration
43 | * \{
44 | *
45 | * Configuration for command line interface (CLI).
46 | */
47 |
48 | /**
49 | * \brief CLI promet, printed on every NL
50 | */
51 | #ifndef CLI_PROMPT
52 | #define CLI_PROMPT "> "
53 | #endif
54 |
55 | /**
56 | * \brief CLI NL, default is NL and CR
57 | */
58 | #ifndef CLI_NL
59 | #define CLI_NL "\r\n"
60 | #endif
61 |
62 | /**
63 | * \brief Max CLI command length
64 | */
65 | #ifndef CLI_MAX_CMD_LENGTH
66 | #define CLI_MAX_CMD_LENGTH 256
67 | #endif
68 |
69 | /**
70 | * \brief Max sotred CLI commands to history
71 | */
72 | #ifndef CLI_CMD_HISTORY
73 | #define CLI_CMD_HISTORY 10
74 | #endif
75 |
76 |
77 | /**
78 | * \brief Max CLI arguments in a single command
79 | */
80 | #ifndef CLI_MAX_NUM_OF_ARGS
81 | #define CLI_MAX_NUM_OF_ARGS 16
82 | #endif
83 |
84 | /**
85 | * \brief Max modules for CLI
86 | */
87 | #ifndef CLI_MAX_MODULES
88 | #define CLI_MAX_MODULES 16
89 | #endif
90 |
91 | /**
92 | * \}
93 | */
94 |
95 | #ifdef __cplusplus
96 | }
97 | #endif
98 |
99 | #endif /* __CLI_CONFIG_H */
100 |
--------------------------------------------------------------------------------
/src/cli/cli_input.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file cli_input.h
3 | * \brief Command line interface helper funcions for paring input data
4 | */
5 |
6 | /*
7 | * Copyright (c) 2019 Miha CESNIK
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * Author: Miha CESNIK <>
30 | * Version: $_version_$
31 | */
32 | #ifndef __CLI_INPUT_H
33 | #define __CLI_INPUT_H
34 |
35 | #ifdef __cplusplus
36 | extern "C" {
37 | #endif
38 |
39 | /**
40 | * \ingroup CLI
41 | * \defgroup CLI_INPUT Input
42 | * \brief Command line interface helper funcions for paring input data
43 | * \{
44 | *
45 | * Functions to parse incoming data for command line interface (CLI).
46 | */
47 |
48 | void cli_in_data(cli_printf cliprintf, char ch);
49 |
50 | /**
51 | * \}
52 | */
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 | #endif /* __CLI_INPUT_H */
59 |
--------------------------------------------------------------------------------
/src/esp/esp_cli.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_cli.h
3 | * \brief Esp CLI commands
4 | */
5 |
6 | /*
7 | * Copyright (c) 2019 Miha CESNIK
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * Author: Miha CESNIK <>
30 | * Version: $_version_$
31 | */
32 | #ifndef ESP_HDR_CLI_H
33 | #define ESP_HDR_CLI_H
34 |
35 | #ifdef __cplusplus
36 | extern "C" {
37 | #endif
38 |
39 | /**
40 | * \ingroup ESP
41 | * \defgroup ESP_CLI Command line interface
42 | * \brief Command line interface
43 | * \{
44 | */
45 |
46 | #include "esp/esp.h"
47 |
48 | void esp_cli_register_commands(void);
49 |
50 | /**
51 | * \}
52 | */
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 | #endif /* ESP_HDR_CLI_H */
59 |
60 |
--------------------------------------------------------------------------------
/src/esp/esp_config_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config_template.h
3 | * \brief Template config file
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* Rename this file to "esp_config.h" for your application */
38 |
39 | /*
40 | * Open "include/esp/esp_config_default.h" and
41 | * copy & replace here settings you want to change values
42 | */
43 |
44 | /* After user configuration, call default config to merge config together */
45 | #include "esp/esp_config_default.h"
46 |
47 | #endif /* ESP_HDR_CONFIG_H */
48 |
--------------------------------------------------------------------------------
/src/esp/esp_debug.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_debug.c
3 | * \brief Debugging inside ESP stack
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #include "esp/esp_private.h"
35 | #include "esp/esp_debug.h"
36 | #include "esp/esp.h"
37 |
38 | #if ESP_CFG_DBG || __DOXYGEN__
39 |
40 | const char *
41 | espi_dbg_msg_to_string(esp_cmd_t cmd) {
42 | static char tmp_arr[100];
43 | if (cmd) {
44 | sprintf(tmp_arr, "%d", (int)cmd);
45 | return tmp_arr;
46 | }
47 | return "";
48 | }
49 |
50 | #endif /* ESP_CFG_DBG || __DOXYGEN__ */
51 |
--------------------------------------------------------------------------------
/src/esp/esp_dhcp.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_dhcp.c
3 | * \brief DHCP API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #include "esp/esp_private.h"
35 | #include "esp/esp_dhcp.h"
36 | #include "esp/esp_mem.h"
37 |
38 | /**
39 | * \brief Configure DHCP settings for station or access point (or both)
40 | *
41 | * Configuration changes will be saved in the NVS area of ESP device.
42 | *
43 | * \param[in] sta: Set to `1` to affect station DHCP configuration, set to `0` to keep current setup
44 | * \param[in] ap: Set to `1` to affect access point DHCP configuration, set to `0` to keep current setup
45 | * \param[in] en: Set to `1` to enable DHCP, or `0` to disable (static IP)
46 | * \param[in] evt_fn: Callback function called when command has finished. Set to `NULL` when not used
47 | * \param[in] evt_arg: Custom argument for event callback function
48 | * \param[in] blocking: Status whether command should be blocking or not
49 | * \return \ref espOK on success, member of \ref espr_t enumeration otherwise
50 | */
51 | espr_t
52 | esp_dhcp_configure(uint8_t sta, uint8_t ap, uint8_t en,
53 | const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking) {
54 | ESP_MSG_VAR_DEFINE(msg);
55 |
56 | ESP_MSG_VAR_ALLOC(msg, blocking);
57 | ESP_MSG_VAR_SET_EVT(msg, evt_fn, evt_arg);
58 | ESP_MSG_VAR_REF(msg).cmd_def = ESP_CMD_WIFI_CWDHCP_SET;
59 | ESP_MSG_VAR_REF(msg).msg.wifi_cwdhcp.sta = sta;
60 | ESP_MSG_VAR_REF(msg).msg.wifi_cwdhcp.ap = ap;
61 | ESP_MSG_VAR_REF(msg).msg.wifi_cwdhcp.en = en;
62 |
63 | return espi_send_msg_to_producer_mbox(&ESP_MSG_VAR_REF(msg), espi_initiate_cmd, 1000);
64 | }
65 |
--------------------------------------------------------------------------------
/src/esp/esp_dhcp.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_dhcp.h
3 | * \brief DHCP API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_DHCP_H
35 | #define ESP_HDR_DHCP_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_DHCP DHCP
46 | * \brief DHCP config
47 | * \{
48 | */
49 |
50 | espr_t esp_dhcp_configure(uint8_t sta, uint8_t ap, uint8_t en, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
51 |
52 | /**
53 | * \}
54 | */
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif /* ESP_HDR_DHCP_H */
61 |
--------------------------------------------------------------------------------
/src/esp/esp_dns.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_dns.h
3 | * \brief DNS API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_DNS_H
35 | #define ESP_HDR_DNS_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_DNS Domain name server
46 | * \brief Domain name server
47 | * \{
48 | */
49 |
50 | espr_t esp_dns_gethostbyname(const char* host, esp_ip_t* const ip, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
51 | espr_t esp_dns_get_config(esp_ip_t* s1, esp_ip_t* s2, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
52 | espr_t esp_dns_set_config(uint8_t en, const char* s1, const char* s2, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
53 |
54 | /**
55 | * \}
56 | */
57 |
58 | #ifdef __cplusplus
59 | }
60 | #endif
61 |
62 | #endif /* ESP_HDR_DNS_H */
63 |
--------------------------------------------------------------------------------
/src/esp/esp_hostname.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_hostname.h
3 | * \brief Hostname API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_HOSTNAME_H
35 | #define ESP_HDR_HOSTNAME_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_HOSTNAME Hostname API
46 | * \brief Hostname API
47 | * \{
48 | */
49 |
50 | espr_t esp_hostname_set(const char* hostname, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
51 | espr_t esp_hostname_get(char* hostname, size_t size, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
52 |
53 | /**
54 | * \}
55 | */
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 |
61 | #endif /* ESP_HDR_HOSTNAME_H */
62 |
--------------------------------------------------------------------------------
/src/esp/esp_includes.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_includes.h
3 | * \brief All main includes
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_INCLUDES_H
35 | #define ESP_HDR_INCLUDES_H
36 |
37 | #ifdef __cplusplus
38 | // don't nest extern "C"
39 | // extern "C" {
40 | #endif /* __cplusplus */
41 |
42 | #include "esp_config.h"
43 | #include "esp/esp_typedefs.h"
44 | #include "esp/esp_buff.h"
45 | #include "esp/esp_input.h"
46 | #include "esp/esp_evt.h"
47 | #include "esp/esp_debug.h"
48 | #include "esp/esp_utils.h"
49 | #include "esp/esp_pbuf.h"
50 | #include "esp/esp_conn.h"
51 | #include "system/esp_sys.h"
52 |
53 | #if ESP_CFG_MODE_STATION || __DOXYGEN__
54 | #include "esp/esp_sta.h"
55 | #endif /* ESP_CFG_MODE_STATION || __DOXYGEN__ */
56 | #if ESP_CFG_MODE_ACCESS_POINT || __DOXYGEN__
57 | #include "esp/esp_ap.h"
58 | #endif /* ESP_CFG_MODE_ACCESS_POINT || __DOXYGEN__ */
59 | #if ESP_CFG_NETCONN || __DOXYGEN__
60 | #include "esp/esp_netconn.h"
61 | #endif /* ESP_CFG_NETCONN || __DOXYGEN__ */
62 | #if ESP_CFG_PING || __DOXYGEN__
63 | #include "esp/esp_ping.h"
64 | #endif /* ESP_CFG_PING || __DOXYGEN__ */
65 | #if ESP_CFG_WPS || __DOXYGEN__
66 | #include "esp/esp_wps.h"
67 | #endif /* ESP_CFG_WPS || __DOXYGEN__ */
68 | #if ESP_CFG_SNTP || __DOXYGEN__
69 | #include "esp/esp_sntp.h"
70 | #endif /* ESP_CFG_SNTP || __DOXYGEN__ */
71 | #if ESP_CFG_HOSTNAME || __DOXYGEN__
72 | #include "esp/esp_hostname.h"
73 | #endif /* ESP_CFG_HOSTNAME || __DOXYGEN__ */
74 | #if ESP_CFG_DNS || __DOXYGEN__
75 | #include "esp/esp_dns.h"
76 | #endif /* ESP_CFG_DNS || __DOXYGEN__ */
77 | #if ESP_CFG_SMART || __DOXYGEN__
78 | #include "esp/esp_smart.h"
79 | #endif /* ESP_CFG_SMART || __DOXYGEN__ */
80 | #include "esp/esp_dhcp.h"
81 |
82 | #ifdef __cplusplus
83 | // }
84 | #endif /* __cplusplus */
85 |
86 | #endif /* ESP_HDR_INCLUDES_H */
87 |
--------------------------------------------------------------------------------
/src/esp/esp_input.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_input.h
3 | * \brief Initialization process
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_INPUT_H
35 | #define ESP_HDR_INPUT_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif /* __cplusplus */
40 |
41 | #include
42 | #include "esp/esp.h"
43 |
44 | /**
45 | * \ingroup ESP
46 | * \defgroup ESP_INPUT Input processing
47 | * \brief Input function for received data
48 | * \{
49 | */
50 |
51 | espr_t esp_input(const void* data, size_t len);
52 | espr_t esp_input_process(const void* data, size_t len);
53 |
54 | /**
55 | * \}
56 | */
57 |
58 | #ifdef __cplusplus
59 | }
60 | #endif /* __cplusplus */
61 |
62 | #endif /* ESP_HDR_INPUT_H */
63 |
--------------------------------------------------------------------------------
/src/esp/esp_int.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_int.h
3 | * \brief Internal functions
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_INT_H
35 | #define ESP_HDR_INT_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif /* __cplusplus */
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 |
45 | #endif /* ESP_HDR_INT_H */
46 |
--------------------------------------------------------------------------------
/src/esp/esp_mdns.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_mdns.c
3 | * \brief mDNS API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #include "esp/esp_private.h"
35 | #include "esp/esp_mdns.h"
36 | #include "esp/esp_mem.h"
37 |
38 | #if ESP_CFG_MDNS || __DOXYGEN__
39 |
40 | /**
41 | * \brief Configure mDNS parameters with hostname and server
42 | * \param[in] en: Status to enable `1` or disable `0` mDNS function
43 | * \param[in] host: mDNS host name
44 | * \param[in] server: mDNS server name
45 | * \param[in] port: mDNS server port number
46 | * \param[in] evt_fn: Callback function called when command has finished. Set to `NULL` when not used
47 | * \param[in] evt_arg: Custom argument for event callback function
48 | * \param[in] blocking: Status whether command should be blocking or not
49 | * \return \ref espOK on success, member of \ref espr_t enumeration otherwise
50 | */
51 | espr_t
52 | esp_mdns_configure(uint8_t en, const char* host, const char* server, esp_port_t port,
53 | const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking) {
54 | ESP_MSG_VAR_DEFINE(msg);
55 |
56 | if (en) {
57 | ESP_ASSERT("host != NULL", host != NULL);
58 | ESP_ASSERT("server != NULL", server != NULL);
59 | ESP_ASSERT("port > 0", port > 0);
60 | }
61 |
62 | ESP_MSG_VAR_ALLOC(msg, blocking);
63 | ESP_MSG_VAR_SET_EVT(msg, evt_fn, evt_arg);
64 | ESP_MSG_VAR_REF(msg).cmd_def = ESP_CMD_WIFI_MDNS;
65 | ESP_MSG_VAR_REF(msg).msg.mdns.en = en;
66 | ESP_MSG_VAR_REF(msg).msg.mdns.host = host;
67 | ESP_MSG_VAR_REF(msg).msg.mdns.server = server;
68 | ESP_MSG_VAR_REF(msg).msg.mdns.port = port;
69 |
70 | return espi_send_msg_to_producer_mbox(&ESP_MSG_VAR_REF(msg), espi_initiate_cmd, 1000);
71 | }
72 |
73 | #endif /* ESP_CFG_MDNS || __DOXYGEN__ */
74 |
--------------------------------------------------------------------------------
/src/esp/esp_mdns.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_mdns.h
3 | * \brief mDNS API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_MDNS_H
35 | #define ESP_HDR_MDNS_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_MDNS mDNS API
46 | * \brief mDNS function
47 | * \{
48 | */
49 |
50 | espr_t esp_mdns_configure(uint8_t en, const char* host, const char* server, esp_port_t port, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
51 |
52 | /**
53 | * \}
54 | */
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif /* ESP_HDR_MDNS_H */
61 |
--------------------------------------------------------------------------------
/src/esp/esp_mem.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_mem.h
3 | * \brief Memory manager
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_MEM_H
35 | #define ESP_HDR_MEM_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif /* __cplusplus */
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_MEM Memory manager
46 | * \brief Dynamic memory manager
47 | * \{
48 | */
49 |
50 | #if !ESP_CFG_MEM_CUSTOM || __DOXYGEN__
51 |
52 | /**
53 | * \brief Single memory region descriptor
54 | */
55 | typedef struct {
56 | void* start_addr; /*!< Start address of region */
57 | size_t size; /*!< Size in units of bytes of region */
58 | } esp_mem_region_t;
59 |
60 | uint8_t esp_mem_assignmemory(const esp_mem_region_t* regions, size_t size);
61 |
62 | #endif /* !ESP_CFG_MEM_CUSTOM || __DOXYGEN__ */
63 |
64 | void* esp_mem_malloc(size_t size);
65 | void* esp_mem_realloc(void* ptr, size_t size);
66 | void* esp_mem_calloc(size_t num, size_t size);
67 | void esp_mem_free(void* ptr);
68 | uint8_t esp_mem_free_s(void** ptr);
69 |
70 | /**
71 | * \}
72 | */
73 |
74 | #ifdef __cplusplus
75 | }
76 | #endif /* __cplusplus */
77 |
78 | #endif /* ESP_HDR_MEM_H */
79 |
--------------------------------------------------------------------------------
/src/esp/esp_parser.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_parser.h
3 | * \brief Parser of AT responses
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_PARSER_H
35 | #define ESP_HDR_PARSER_H
36 |
37 | #if defined(__cplusplus)
38 | extern "C" {
39 | #endif /* defined(__cplusplus) */
40 |
41 | #include "esp/esp.h"
42 |
43 | int32_t espi_parse_number(const char** str);
44 | uint8_t espi_parse_string(const char** src, char* dst, size_t dst_len, uint8_t trim);
45 | uint8_t espi_parse_ip(const char** src, esp_ip_t* ip);
46 | uint8_t espi_parse_mac(const char** src, esp_mac_t* mac);
47 |
48 | espr_t espi_parse_cipstatus(const char* str);
49 | espr_t espi_parse_ipd(const char* str);
50 | espr_t espi_parse_ciprecvdata(const char* str);
51 | espr_t espi_parse_ciprecvlen(const char* str);
52 |
53 | uint8_t espi_parse_cwlap(const char* str, esp_msg_t* msg);
54 | uint8_t espi_parse_cwjap(const char* str, esp_msg_t* msg);
55 | uint8_t espi_parse_cwlif(const char* str, esp_msg_t* msg);
56 | uint8_t espi_parse_cipdomain(const char* src, esp_msg_t* msg);
57 | uint8_t espi_parse_cipsntptime(const char* str, esp_msg_t* msg);
58 | uint8_t espi_parse_ping_time(const char* str, esp_msg_t* msg);
59 | uint8_t espi_parse_hostname(const char* str, esp_msg_t* msg);
60 | uint8_t espi_parse_link_conn(const char* str);
61 |
62 | uint8_t espi_parse_at_sdk_version(const char* str, esp_sw_version_t* version_out);
63 |
64 | uint8_t espi_parse_ap_conn_disconn_sta(const char* str, uint8_t is_conn);
65 | uint8_t espi_parse_ap_ip_sta(const char* str);
66 | uint8_t espi_parse_cwsap(const char* str, esp_msg_t* msg);
67 |
68 | uint8_t espi_parse_cwdhcp(const char* str);
69 |
70 | #if defined(__cplusplus)
71 | }
72 | #endif /* defined(__cplusplus) */
73 |
74 | #endif /* ESP_HDR_PARSER_H */
75 |
--------------------------------------------------------------------------------
/src/esp/esp_ping.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_ping.c
3 | * \brief Ping API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #include "esp/esp_private.h"
35 | #include "esp/esp_ping.h"
36 | #include "esp/esp_mem.h"
37 |
38 | #if ESP_CFG_PING || __DOXYGEN__
39 |
40 | /**
41 | * \brief Ping server and get response time from it
42 | * \param[in] host: Host name to ping
43 | * \param[out] time: Pointer to output variable to save ping time in units of milliseconds
44 | * \param[in] evt_fn: Callback function called when command has finished. Set to `NULL` when not used
45 | * \param[in] evt_arg: Custom argument for event callback function
46 | * \param[in] blocking: Status whether command should be blocking or not
47 | * \return \ref espOK on success, member of \ref espr_t enumeration otherwise
48 | */
49 | espr_t
50 | esp_ping(const char* host, uint32_t* time,
51 | const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking) {
52 | ESP_MSG_VAR_DEFINE(msg);
53 |
54 | ESP_ASSERT("host != NULL", host != NULL);
55 |
56 | ESP_MSG_VAR_ALLOC(msg, blocking);
57 | ESP_MSG_VAR_SET_EVT(msg, evt_fn, evt_arg);
58 | ESP_MSG_VAR_REF(msg).cmd_def = ESP_CMD_TCPIP_PING;
59 | ESP_MSG_VAR_REF(msg).msg.tcpip_ping.host = host;
60 | ESP_MSG_VAR_REF(msg).msg.tcpip_ping.time_out = time;
61 |
62 | return espi_send_msg_to_producer_mbox(&ESP_MSG_VAR_REF(msg), espi_initiate_cmd, 30000);
63 | }
64 |
65 | #endif /* ESP_CFG_PING || __DOXYGEN__ */
66 |
--------------------------------------------------------------------------------
/src/esp/esp_ping.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_ping.h
3 | * \brief Ping API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_PING_H
35 | #define ESP_HDR_PING_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_PING PING
46 | * \brief Ping server and get response time
47 | * \{
48 | */
49 |
50 | espr_t esp_ping(const char* host, uint32_t* time, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
51 |
52 | /**
53 | * \}
54 | */
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif /* ESP_HDR_PING_H */
61 |
--------------------------------------------------------------------------------
/src/esp/esp_smart.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_smart.c
3 | * \brief SMART API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | * Copyright (c) 2020 Seeed Technology
9 | *
10 | * Permission is hereby granted, free of charge, to any person
11 | * obtaining a copy of this software and associated documentation
12 | * files (the "Software"), to deal in the Software without restriction,
13 | * including without limitation the rights to use, copy, modify, merge,
14 | * publish, distribute, sublicense, and/or sell copies of the Software,
15 | * and to permit persons to whom the Software is furnished to do so,
16 | * subject to the following conditions:
17 | *
18 | * The above copyright notice and this permission notice shall be
19 | * included in all copies or substantial portions of the Software.
20 | *
21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
24 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 | * OTHER DEALINGS IN THE SOFTWARE.
29 | *
30 | * This file is part of ESP-AT library.
31 | *
32 | * Author: Tilen MAJERLE
33 | * Version: $_version_$
34 | */
35 | #include "esp/esp_private.h"
36 | #include "esp/esp_smart.h"
37 | #include "esp/esp_mem.h"
38 |
39 | #if ESP_CFG_SMART || __DOXYGEN__
40 |
41 | /**
42 | * \brief Configure SMART function on ESP device
43 | * \param[in] en: Set to `1` to start SMART or `0` to stop SMART
44 | * \param[in] evt_fn: Callback function called when command has finished. Set to `NULL` when not used
45 | * \param[in] evt_arg: Custom argument for event callback function
46 | * \param[in] blocking: Status whether command should be blocking or not
47 | * \return \ref espOK on success, member of \ref espr_t enumeration otherwise
48 | */
49 | espr_t
50 | esp_smart_configure(uint8_t en,
51 | const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking) {
52 | ESP_MSG_VAR_DEFINE(msg);
53 |
54 | ESP_MSG_VAR_ALLOC(msg, blocking);
55 | ESP_MSG_VAR_SET_EVT(msg, evt_fn, evt_arg);
56 | ESP_MSG_VAR_REF(msg).cmd_def = en? ESP_CMD_WIFI_SMART_START: ESP_CMD_WIFI_SMART_STOP;
57 |
58 | return espi_send_msg_to_producer_mbox(&ESP_MSG_VAR_REF(msg), espi_initiate_cmd, 10000);
59 | }
60 |
61 | #endif /* ESP_CFG_SMART || __DOXYGEN__ */
62 |
--------------------------------------------------------------------------------
/src/esp/esp_smart.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_smart.h
3 | * \brief Smart API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | * Copyright (c) 2020 Seeed Technology
9 | *
10 | * Permission is hereby granted, free of charge, to any person
11 | * obtaining a copy of this software and associated documentation
12 | * files (the "Software"), to deal in the Software without restriction,
13 | * including without limitation the rights to use, copy, modify, merge,
14 | * publish, distribute, sublicense, and/or sell copies of the Software,
15 | * and to permit persons to whom the Software is furnished to do so,
16 | * subject to the following conditions:
17 | *
18 | * The above copyright notice and this permission notice shall be
19 | * included in all copies or substantial portions of the Software.
20 | *
21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
24 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 | * OTHER DEALINGS IN THE SOFTWARE.
29 | *
30 | * This file is part of ESP-AT library.
31 | *
32 | * Author: Tilen MAJERLE
33 | * Version: $_version_$
34 | */
35 | #ifndef ESP_HDR_SMART_H
36 | #define ESP_HDR_SMART_H
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | #include "esp/esp.h"
43 |
44 | /**
45 | * \ingroup ESP
46 | * \defgroup ESP_SMART
47 | * \brief SMART function on ESP device
48 | * \{
49 | */
50 |
51 | espr_t esp_smart_configure(uint8_t en, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
52 |
53 | /**
54 | * \}
55 | */
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 |
61 | #endif /* ESP_HDR_SMART_H */
62 |
--------------------------------------------------------------------------------
/src/esp/esp_sntp.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_sntp.h
3 | * \brief SNTP API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_SNTP_H
35 | #define ESP_HDR_SNTP_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_SNTP Simple network time protocol
46 | * \brief Simple network time protocol supported by AT commands
47 | * \{
48 | */
49 |
50 | espr_t esp_sntp_configure(uint8_t en, int8_t tz, const char* h1, const char* h2, const char* h3, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
51 | espr_t esp_sntp_gettime(esp_datetime_t* dt, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
52 |
53 | /**
54 | * \}
55 | */
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 |
61 | #endif /* ESP_HDR_SNTP_H */
62 |
--------------------------------------------------------------------------------
/src/esp/esp_threads.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_threads.h
3 | * \brief OS threads implementations
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_THREADS_H
35 | #define ESP_HDR_THREADS_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif /* __cplusplus */
40 |
41 | #include "esp/esp.h"
42 |
43 | void esp_thread_produce(void* const arg);
44 | void esp_thread_process(void* const arg);
45 |
46 | #ifdef __cplusplus
47 | }
48 | #endif /* __cplusplus */
49 |
50 | #endif /* ESP_HDR_THREADS_H */
51 |
--------------------------------------------------------------------------------
/src/esp/esp_timeout.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_timeout.h
3 | * \brief Timeout manager
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_TIMEOUT_H
35 | #define ESP_HDR_TIMEOUT_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_TIMEOUT Timeout manager
46 | * \brief Timeout manager
47 | * \{
48 | */
49 |
50 | espr_t esp_timeout_add(uint32_t time, esp_timeout_fn fn, void* arg);
51 | espr_t esp_timeout_remove(esp_timeout_fn fn);
52 |
53 | /**
54 | * \}
55 | */
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 |
61 | #endif /* ESP_HDR_TIMEOUT_H */
62 |
--------------------------------------------------------------------------------
/src/esp/esp_unicode.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_unicode.h
3 | * \brief Unicode support
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_UNICODE_H
35 | #define ESP_HDR_UNICODE_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_UNICODE Unicode manager
46 | * \brief Unicode support manager
47 | * \{
48 | */
49 |
50 | espr_t espi_unicode_decode(esp_unicode_t* uni, uint8_t ch);
51 |
52 | /**
53 | * \}
54 | */
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif /* ESP_HDR_UNICODE_H */
61 |
--------------------------------------------------------------------------------
/src/esp/esp_wps.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_wps.c
3 | * \brief WPS API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #include "esp/esp_private.h"
35 | #include "esp/esp_wps.h"
36 | #include "esp/esp_mem.h"
37 |
38 | #if ESP_CFG_WPS || __DOXYGEN__
39 |
40 | /**
41 | * \brief Configure WPS function on ESP device
42 | * \param[in] en: Set to `1` to enable WPS or `0` to disable WPS
43 | * \param[in] evt_fn: Callback function called when command has finished. Set to `NULL` when not used
44 | * \param[in] evt_arg: Custom argument for event callback function
45 | * \param[in] blocking: Status whether command should be blocking or not
46 | * \return \ref espOK on success, member of \ref espr_t enumeration otherwise
47 | */
48 | espr_t
49 | esp_wps_configure(uint8_t en,
50 | const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking) {
51 | ESP_MSG_VAR_DEFINE(msg);
52 |
53 | ESP_MSG_VAR_ALLOC(msg, blocking);
54 | ESP_MSG_VAR_SET_EVT(msg, evt_fn, evt_arg);
55 | ESP_MSG_VAR_REF(msg).cmd_def = ESP_CMD_WIFI_WPS;
56 | ESP_MSG_VAR_REF(msg).msg.wps_cfg.en = en;
57 |
58 | return espi_send_msg_to_producer_mbox(&ESP_MSG_VAR_REF(msg), espi_initiate_cmd, 10000);
59 | }
60 |
61 | #endif /* ESP_CFG_WPS || __DOXYGEN__ */
62 |
--------------------------------------------------------------------------------
/src/esp/esp_wps.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_wps.h
3 | * \brief WPS API
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_WPS_H
35 | #define ESP_HDR_WPS_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \ingroup ESP
45 | * \defgroup ESP_WPS WPS
46 | * \brief WPS function on ESP device
47 | * \{
48 | */
49 |
50 | espr_t esp_wps_configure(uint8_t en, const esp_api_cmd_evt_fn evt_fn, void* const evt_arg, const uint32_t blocking);
51 |
52 | /**
53 | * \}
54 | */
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif /* ESP_HDR_WPS_H */
61 |
--------------------------------------------------------------------------------
/src/esp_at_lib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | * Copyright (C) 2019 Seeed Technology Co.,Ltd.
4 | */
5 | #ifndef _ESP_AT_LIB_H_
6 | #define _ESP_AT_LIB_H_
7 |
8 | #include
9 |
10 | #include
11 | #include
12 |
13 | extern
14 | #ifdef __cplusplus
15 | "C"
16 | #endif
17 | size_t get_free_heap(void);
18 |
19 | #endif//_ESP_AT_LIB_H_
20 |
--------------------------------------------------------------------------------
/src/esp_config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_config.h
3 | * \brief Configuration for ESP
4 | */
5 |
6 | /*
7 | * Copyright (c) 2019 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_CONFIG_H
35 | #define ESP_HDR_CONFIG_H
36 |
37 | /* User specific config */
38 | #define ESP_CFG_AT_ECHO 1
39 | #define ESP_CFG_SYS_PORT ESP_SYS_PORT_CMSIS_OS
40 | #define ESP_CFG_INPUT_USE_PROCESS 1
41 |
42 | #define ESP_CFG_PING 1
43 |
44 | #define ESP_CFG_NETCONN 1
45 |
46 | #define ESP_CFG_DNS 1
47 |
48 | #define ESP_CFG_RESET_ON_INIT 1
49 | #define ESP_CFG_RESET_DELAY_DEFAULT 0
50 |
51 | #define ESP_CFG_RESTORE_ON_INIT 0
52 |
53 | #define ESP_CFG_SMART 1
54 |
55 | #define ESP_CFG_WPS 1
56 |
57 | #define ESP_CFG_MDNS 1
58 |
59 | #define ESP_CFG_SNTP 1
60 |
61 | #define ESP_CFG_DBG ESP_DBG_ON
62 | #define ESP_CFG_DBG_OUT(fmt, ...) do { xprintf(fmt, ## __VA_ARGS__); } while (0)
63 | extern
64 | #ifdef __cplusplus
65 | "C"
66 | #endif
67 | int xprintf( const char * format, ... );
68 |
69 | #ifndef __cplusplus
70 | // #define printf xprintf
71 | #endif
72 | // The log console port
73 | // #define Serial Serial1
74 |
75 | // Communication port selection between UART/SPI.
76 | #define ESP_CFG_USE_SPI 1
77 |
78 | // esp communication SPI port
79 | #define ARDUINO_SPI_PIN_DIR (RTL8720D_GPIO0)
80 | #define ARDUINO_SPI_PIN_EXIST_DATA (IRQ0)
81 | #define ARDUINO_SPI_TO_ESPAT (RTL8720D_SPI)
82 | #define ARDUINO_SPI_PIN_CS (RTL8720D_SS_PIN)
83 |
84 | /* Include default configuration setup */
85 | #include "esp/esp_config_default.h"
86 |
87 | #endif /* ESP_HDR_CONFIG_H */
88 |
--------------------------------------------------------------------------------
/src/esp_ll_spi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | * Copyright (C) 2019 Seeed Technology Co.,Ltd.
4 | */
5 | #ifndef _ESP_LL_SPI_H_
6 | #define _ESP_LL_SPI_H_
7 |
8 | #include
9 | #include
10 | #include "SPI.h"
11 |
12 | int at_spi_begin(void);
13 | int at_spi_write(const uint8_t* buf, uint16_t len, int loop_wait = 500);
14 | int at_spi_read(uint8_t* buf, uint16_t len, int loop_wait = 500);
15 |
16 | #endif//_ESP_LL_SPI_H_
17 |
--------------------------------------------------------------------------------
/src/esp_sys_port.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_sys_port.h
3 | * \brief FreeRTOS native port
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Author: Adrian Carpenter (FreeRTOS port)
33 | * Version: $_version_$
34 | */
35 | #ifndef ESP_HDR_SYSTEM_PORT_H
36 | #define ESP_HDR_SYSTEM_PORT_H
37 |
38 | #include
39 | #include
40 |
41 | #include "esp_config.h"
42 | #include "FreeRTOS.h"
43 | #include "task.h"
44 | #include "semphr.h"
45 |
46 | #ifdef __cplusplus
47 | extern "C" {
48 | #endif /* __cplusplus */
49 |
50 | #if ESP_CFG_OS && !__DOXYGEN__
51 |
52 | typedef SemaphoreHandle_t esp_sys_mutex_t;
53 | typedef SemaphoreHandle_t esp_sys_sem_t;
54 | typedef QueueHandle_t esp_sys_mbox_t;
55 | typedef TaskHandle_t esp_sys_thread_t;
56 | typedef UBaseType_t esp_sys_thread_prio_t;
57 |
58 | #define ESP_SYS_MUTEX_NULL ((SemaphoreHandle_t)0)
59 | #define ESP_SYS_SEM_NULL ((SemaphoreHandle_t)0)
60 | #define ESP_SYS_MBOX_NULL ((QueueHandle_t)0)
61 | #define ESP_SYS_TIMEOUT ((TickType_t)portMAX_DELAY)
62 | #define ESP_SYS_THREAD_PRIO (configMAX_PRIORITIES - 1)
63 | #define ESP_SYS_THREAD_SS (1024)
64 |
65 | #endif /* ESP_CFG_OS && !__DOXYGEN__ */
66 |
67 | #ifdef __cplusplus
68 | }
69 | #endif /* __cplusplus */
70 |
71 | #endif /* ESP_HDR_SYSTEM_PORT_H */
72 |
--------------------------------------------------------------------------------
/src/station_manager.h:
--------------------------------------------------------------------------------
1 | #ifndef SNIPPET_HDR_STATION_MANAGER_H
2 | #define SNIPPET_HDR_STATION_MANAGER_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | #include
9 | #include "esp/esp.h"
10 |
11 | /**
12 | * \brief Lookup table for preferred SSIDs with password for auto connect feature
13 | */
14 | typedef struct {
15 | const char* ssid;
16 | const char* pass;
17 | } ap_entry_t;
18 |
19 | espr_t connect_to_preferred_access_point(uint8_t unlimited);
20 | void start_access_point_scan_and_connect_procedure(void);
21 |
22 | #ifdef __cplusplus
23 | }
24 | #endif
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/src/system/esp_ll.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file esp_ll.h
3 | * \brief Low-level communication implementation
4 | */
5 |
6 | /*
7 | * Copyright (c) 2020 Tilen MAJERLE
8 | *
9 | * Permission is hereby granted, free of charge, to any person
10 | * obtaining a copy of this software and associated documentation
11 | * files (the "Software"), to deal in the Software without restriction,
12 | * including without limitation the rights to use, copy, modify, merge,
13 | * publish, distribute, sublicense, and/or sell copies of the Software,
14 | * and to permit persons to whom the Software is furnished to do so,
15 | * subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be
18 | * included in all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23 | * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | * OTHER DEALINGS IN THE SOFTWARE.
28 | *
29 | * This file is part of ESP-AT library.
30 | *
31 | * Author: Tilen MAJERLE
32 | * Version: $_version_$
33 | */
34 | #ifndef ESP_HDR_LL_H
35 | #define ESP_HDR_LL_H
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif /* __cplusplus */
40 |
41 | #include "esp/esp.h"
42 |
43 | /**
44 | * \defgroup ESP_LL Low-level functions
45 | * \brief Low-level communication functions
46 | * \{
47 | */
48 |
49 | espr_t esp_ll_init(esp_ll_t* ll);
50 | espr_t esp_ll_deinit(esp_ll_t* ll);
51 |
52 | /**
53 | * \}
54 | */
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif /* __cplusplus */
59 |
60 | #endif /* ESP_HDR_LL_H */
61 |
--------------------------------------------------------------------------------
/www/css/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: red;
3 | }
4 |
--------------------------------------------------------------------------------
/www/img/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Studio/esp-at-lib/2f081fa061cc5217c7de79961f1be2ac65a35163/www/img/icon.png
--------------------------------------------------------------------------------
/www/index.shtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |