Skip to content

Commit

Permalink
Rename files to lwesp_* and rename folders to lwesp_*
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Jul 7, 2020
1 parent c3028a9 commit e503727
Show file tree
Hide file tree
Showing 152 changed files with 499 additions and 499 deletions.
2 changes: 1 addition & 1 deletion dev/VisualStudio/esp_at_lib_dev.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.452
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esp_at_lib_dev", "esp_at_lib_dev.vcxproj", "{5D881BA7-6232-4F33-B72F-0BB5DFF2A575}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwesp_dev", "lwesp_dev.vcxproj", "{5D881BA7-6232-4F33-B72F-0BB5DFF2A575}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
76 changes: 38 additions & 38 deletions dev/VisualStudio/esp_at_lib_dev.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>.;..\..\esp_at_lib\src\include\system\port\win32;..\..\esp_at_Lib\src\include;..\..\snippets\include;..\..\..\lwmem\lwmem\src\include;$(IncludePath)</IncludePath>
<IncludePath>.;..\..\lwesp\src\include\system\port\win32;..\..\lwesp\src\include;..\..\snippets\include;..\..\..\lwmem\lwmem\src\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
Expand Down Expand Up @@ -139,18 +139,18 @@
<ItemGroup>
<ClCompile Include="..\..\..\lwmem\lwmem\src\lwmem\lwmem.c" />
<ClCompile Include="..\..\..\lwmem\lwmem\src\system\lwmem_sys_win32.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\apps\cayenne\esp_cayenne.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\apps\cayenne\esp_cayenne_evt.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\apps\mqtt\esp_mqtt_client_api.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\cli\cli.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\cli\cli_input.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_cli.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_dhcp.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_dns.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_hostname.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_ping.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_utils.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\system\esp_mem_lwmem.c" />
<ClCompile Include="..\..\lwesp\src\apps\cayenne\esp_cayenne.c" />
<ClCompile Include="..\..\lwesp\src\apps\cayenne\esp_cayenne_evt.c" />
<ClCompile Include="..\..\lwesp\src\apps\mqtt\esp_mqtt_client_api.c" />
<ClCompile Include="..\..\lwesp\src\cli\cli.c" />
<ClCompile Include="..\..\lwesp\src\cli\cli_input.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_cli.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_dhcp.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_dns.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_hostname.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_ping.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_utils.c" />
<ClCompile Include="..\..\lwesp\src\system\esp_mem_lwmem.c" />
<ClCompile Include="..\..\snippets\client.c" />
<ClCompile Include="..\..\snippets\dns.c" />
<ClCompile Include="..\..\snippets\http_server.c" />
Expand All @@ -162,33 +162,33 @@
<ClCompile Include="..\..\snippets\netconn_server_1thread.c" />
<ClCompile Include="..\..\snippets\sntp.c" />
<ClCompile Include="..\..\snippets\station_manager.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\api\esp_netconn.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\apps\http_server\esp_http_server.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\apps\http_server\esp_http_server_fs.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\apps\http_server\esp_http_server_fs_win32.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\apps\mqtt\esp_mqtt_client.c">
<ClCompile Include="..\..\lwesp\src\api\esp_netconn.c" />
<ClCompile Include="..\..\lwesp\src\apps\http_server\esp_http_server.c" />
<ClCompile Include="..\..\lwesp\src\apps\http_server\esp_http_server_fs.c" />
<ClCompile Include="..\..\lwesp\src\apps\http_server\esp_http_server_fs_win32.c" />
<ClCompile Include="..\..\lwesp\src\apps\mqtt\esp_mqtt_client.c">
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
</ClCompile>
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_ap.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_buff.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_conn.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_debug.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_evt.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_input.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_int.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_mdns.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_mem.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_parser.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_pbuf.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_sntp.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_sta.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_threads.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_timeout.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_unicode.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\esp\esp_wps.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\system\esp_ll_win32.c" />
<ClCompile Include="..\..\ESP_AT_Lib\src\system\esp_sys_win32.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_ap.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_buff.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_conn.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_debug.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_evt.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_input.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_int.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_mdns.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_mem.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_parser.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_pbuf.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_sntp.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_sta.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_threads.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_timeout.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_unicode.c" />
<ClCompile Include="..\..\lwesp\src\esp\esp_wps.c" />
<ClCompile Include="..\..\lwesp\src\system\esp_ll_win32.c" />
<ClCompile Include="..\..\lwesp\src\system\esp_sys_win32.c" />
<ClCompile Include="..\..\snippets\telnet_server.c" />
<ClCompile Include="main.c" />
</ItemGroup>
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ WIN32
Examples for *WIN32* are prepared as `Visual Studio Community <https://visualstudio.microsoft.com/vs/community/>`_ projects.
You can directly open project in the IDE, compile & debug.

Application opens *COM* port, set in the low-level driver.
Application opens *COM* port, set in the low-level driver.
External USB to UART converter (FTDI-like device) is necessary in order to connect to *ESP* device.

.. note::
*ESP* device is connected with *USB to UART converter* only by *RX* and *TX* pins.

Device driver is located in ``/esp_at_lib/src/system/esp_ll_win32.c``
Device driver is located in ``/lwesp/src/system/esp_ll_win32.c``

STM32
*****
Expand Down Expand Up @@ -69,7 +69,7 @@ Pins to connect with ESP device:
* *CHPD*: `CH_PD` pin of ESP8266, connected to MCU, configured as output at MCU side

.. note::
*GP0*, *GP2*, *CH_PD* pins are not always necessary for *ESP* device to work properly.
*GP0*, *GP2*, *CH_PD* pins are not always necessary for *ESP* device to work properly.
When not used, these pins must be tied to fixed values as explained in *ESP* datasheet.

Other pins are for your information and are used for debugging purposes on board.
Expand Down
14 changes: 7 additions & 7 deletions docs/get-started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ Add library to project

At this point it is assumed that you have successfully download library, either cloned it or from releases page.

* Copy ``esp_at_lib`` folder to your project
* Add ``esp_at_lib/src/include`` folder to *include path* of your toolchain
* Add port architecture ``esp_at_lib/src/include/system/port/_arch_`` folder to *include path* of your toolchain
* Add source files from ``esp_at_lib/src/`` folder to toolchain build
* Add source files from ``esp_at_lib/src/system/`` folder to toolchain build for arch port
* Copy ``esp_at_lib/src/include/esp/esp_opts_template.h`` to project folder and rename it to ``esp_opts.h``
* Copy ``lwesp`` folder to your project
* Add ``lwesp/src/include`` folder to *include path* of your toolchain
* Add port architecture ``lwesp/src/include/system/port/_arch_`` folder to *include path* of your toolchain
* Add source files from ``lwesp/src/`` folder to toolchain build
* Add source files from ``lwesp/src/system/`` folder to toolchain build for arch port
* Copy ``lwesp/src/include/esp/esp_opts_template.h`` to project folder and rename it to ``esp_opts.h``
* Build the project

Configuration file
Expand All @@ -67,7 +67,7 @@ This file shall be named ``esp_opts.h`` and its default template looks like the
.. tip::
Check :ref:`api_esp_opt` section for possible configuration settings

.. literalinclude:: ../../esp_at_lib/src/include/esp/esp_opts_template.h
.. literalinclude:: ../../lwesp/src/include/esp/esp_opts_template.h
:language: c
:linenos:
:caption: Template options file
12 changes: 6 additions & 6 deletions docs/user-manual/events-cb-fn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and it can be called from one of these ``3`` threads:

- *Producing thread*
- *Processing thread*
- *Input thread*, when :c:macro:`ESP_CFG_INPUT_USE_PROCESS` is enabled and :cpp:func:`esp_input_process` function is called
- *Input thread*, when :c:macro:`ESP_CFG_INPUT_USE_PROCESS` is enabled and :cpp:func:`esp_input_process` function is called

.. tip::
Check :ref:`um_inter_thread_comm` for more details about *Producing* and *Processing* thread.
Expand All @@ -43,23 +43,23 @@ it is possible to do so by using :cpp:func:`esp_evt_register` function to regist
custom, event function.

.. tip::
Implementation of :ref:`api_app_netconn` leverages :cpp:func:`esp_evt_register` to
Implementation of :ref:`api_app_netconn` leverages :cpp:func:`esp_evt_register` to
receive event when station disconnected from wifi access point.
Check its source file for actual implementation.

.. literalinclude:: ../../esp_at_lib/src/api/esp_netconn.c
.. literalinclude:: ../../lwesp/src/api/esp_netconn.c
:language: c
:linenos:
:caption: Netconn API module actual implementation

Connection specific event
^^^^^^^^^^^^^^^^^^^^^^^^^

This events are subset of global event callback.
This events are subset of global event callback.
They work exactly the same way as global, but only receive events related to connections.

.. tip::
Connection related events start with ``ESP_EVT_CONN_*``, such as :c:member:`ESP_EVT_CONN_RECV`.
Connection related events start with ``ESP_EVT_CONN_*``, such as :c:member:`ESP_EVT_CONN_RECV`.
Check :ref:`api_esp_evt` for list of all connection events.

Connection events callback function is set for ``2`` cases:
Expand All @@ -86,7 +86,7 @@ has optional ``2`` parameters for API call event:
* Custom user parameter for callback function

Below is an example code for DNS resolver.
It uses custom API callback function with custom argument,
It uses custom API callback function with custom argument,
used to distinguis domain name (when multiple domains are to be resolved).

.. literalinclude:: ../../snippets/dns.c
Expand Down
16 changes: 8 additions & 8 deletions docs/user-manual/porting-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ An example code is provided latter section of this page for WIN32 and STM32.
Steps to follow
***************

* Copy ``esp_at_lib/src/system/esp_sys_template.c`` to the same folder and rename it to application port, eg. ``esp_sys_win32.c``
* Copy ``lwesp/src/system/esp_sys_template.c`` to the same folder and rename it to application port, eg. ``esp_sys_win32.c``
* Open newly created file and implement all system functions
* Copy folder ``esp_at_lib/src/include/system/port/template/*`` to the same folder and rename *folder name* to application port, eg. ``cmsis_os``
* Copy folder ``lwesp/src/include/system/port/template/*`` to the same folder and rename *folder name* to application port, eg. ``cmsis_os``
* Open ``esp_sys_port.h`` file from newly created folder and implement all *typedefs* and *macros* for specific target
* Add source file to compiler sources and add path to header file to include paths in compiler options

Expand All @@ -86,7 +86,7 @@ Notes:
* Memory manager has been assigned to ``1`` region of ``ESP_MEM_SIZE`` size
* It sets *send* and *reset* callback functions for *ESP-AT* library

.. literalinclude:: ../../esp_at_lib/src/system/esp_ll_win32.c
.. literalinclude:: ../../lwesp/src/system/esp_ll_win32.c
:language: c
:linenos:
:caption: Actual implementation of low-level driver for WIN32
Expand All @@ -104,33 +104,33 @@ Notes:
* Memory manager has been assigned to ``1`` region of ``ESP_MEM_SIZE`` size
* It sets *send* and *reset* callback functions for *ESP-AT* library

.. literalinclude:: ../../esp_at_lib/src/system/esp_ll_stm32.c
.. literalinclude:: ../../lwesp/src/system/esp_ll_stm32.c
:language: c
:linenos:
:caption: Actual implementation of low-level driver for STM32

Example: System functions for WIN32
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../esp_at_lib/src/include/system/port/win32/esp_sys_port.h
.. literalinclude:: ../../lwesp/src/include/system/port/win32/esp_sys_port.h
:language: c
:linenos:
:caption: Actual header implementation of system functions for WIN32

.. literalinclude:: ../../esp_at_lib/src/system/esp_sys_win32.c
.. literalinclude:: ../../lwesp/src/system/esp_sys_win32.c
:language: c
:linenos:
:caption: Actual implementation of system functions for WIN32

Example: System functions for CMSIS-OS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: ../../esp_at_lib/src/include/system/port/cmsis_os/esp_sys_port.h
.. literalinclude:: ../../lwesp/src/include/system/port/cmsis_os/esp_sys_port.h
:language: c
:linenos:
:caption: Actual header implementation of system functions for CMSIS-OS based operating systems

.. literalinclude:: ../../esp_at_lib/src/system/esp_sys_cmsis_os.c
.. literalinclude:: ../../lwesp/src/system/esp_sys_cmsis_os.c
:language: c
:linenos:
:caption: Actual implementation of system functions for CMSIS-OS based operating systems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<listOptionValue builtIn="false" value="../../../../../third_party/embedded-libs/st_hal/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../../../../../third_party/embedded-libs"/>
<listOptionValue builtIn="false" value="../../inc"/>
<listOptionValue builtIn="false" value="../../../../../esp_at_lib/src/include"/>
<listOptionValue builtIn="false" value="../../../../../esp_at_lib/src/include/system/port/cmsis_os"/>
<listOptionValue builtIn="false" value="../../../../../lwesp/src/include"/>
<listOptionValue builtIn="false" value="../../../../../lwesp/src/include/system/port/cmsis_os"/>
<listOptionValue builtIn="false" value="../../../../../third_party/embedded-libs/FreeRTOS/portable/GCC/ARM_CM4F"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1677160666" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
Expand Down
Loading

0 comments on commit e503727

Please sign in to comment.