├── .cproject
├── .gitmodules
├── .project
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── LICENSE
├── Makefile
├── README.md
├── main
├── CMakeLists.txt
├── app_main.c
├── axfcs.c
├── axmodem.c
├── build
│ └── CMakeFiles
│ │ ├── 3.10.2
│ │ ├── CMakeCCompiler.cmake
│ │ ├── CMakeCXXCompiler.cmake
│ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ ├── CMakeSystem.cmake
│ │ ├── CompilerIdC
│ │ │ ├── CMakeCCompilerId.c
│ │ │ └── a.out
│ │ └── CompilerIdCXX
│ │ │ ├── CMakeCXXCompilerId.cpp
│ │ │ └── a.out
│ │ ├── CMakeOutput.log
│ │ ├── cmake.check_cache
│ │ ├── feature_tests.bin
│ │ ├── feature_tests.c
│ │ └── feature_tests.cxx
├── component.mk
├── igate
│ ├── digipeat.c
│ ├── digipeat.h
│ ├── igate.c
│ ├── igate.h
│ ├── tnc2.c
│ └── tnc2.h
├── include
│ ├── ac101.h
│ ├── axfcs.h
│ ├── axmodem.h
│ └── kbuf.h
└── kbuf.c
└── sdkconfig
/.cproject:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "components/esp-dsp"]
2 | path = components/esp-dsp
3 | url = https://github.com/espressif/esp-dsp.git
4 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | axmodem-3
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.core.cBuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 |
16 | org.eclipse.cdt.core.cnature
17 | org.eclipse.cdt.core.ccnature
18 | com.espressif.idf.core.idfNature
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # The following lines of boilerplate have to be in your project's CMakeLists
2 | # in this exact order for cmake to work correctly
3 | cmake_minimum_required(VERSION 3.5)
4 |
5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6 | project(axmodem-3)
7 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at . All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a
3 | # project subdirectory.
4 | #
5 |
6 | PROJECT_NAME := axmodem-3
7 |
8 | include $(IDF_PATH)/make/project.mk
9 |
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ESP-TNC: Science Fair Project DSP TNC
2 |
3 | Supports Ai Thinker ESP32 AudioKit V2.1 with ESP32-A1S (AC101 codec); minor refactoring and enhancement could support Espressif Lyra board. Not yet tested on AI Thinker ESP32 AudioKit V2.2 board but I expect it will just work.
4 |
5 | This is an ESP-IDF v4.0 project. To get started, clone, cd into clone, do 'git submodule update --init', then 'idf.py build'
6 |
7 | Notes:
8 |
9 | Audio in/out is on the right channel (I'd started with left, but then Espressif fixed a bug that swapped the I2S channels and I didn't care to re-wire my prototype).
10 |
11 | Update these lines in app_main.c for your WiFi configuration:
12 |
13 | #define DEFAULT_SSID "SSID"
14 |
15 | #define DEFAULT_PWD "PASSWORD"
16 |
17 | TCP KISS is at port 8001
18 |
19 | Decode performance is best with audio input level 'hot' on received packets from discriminator output (not de-emphasized audio) (in open-squelch operation, ignore non-packet noise level, it will clip, that's fine). Some clipping on received packets is to be expected.
20 |
21 | PTT is IO_23, active high. Sorry about hiding that in the codec initialization.
22 |
23 | IO_22 is high during receive modem processing for measurement. There's a bit of a pipeline of audio samples from the ESP-IDF DMA code.
24 |
25 |
26 |
--------------------------------------------------------------------------------
/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(
2 | SRCS "app_main.c" "kbuf.c" "axmodem.c" "axfcs.c"
3 | "igate/tnc2.c" "igate/igate.c" "igate/digipeat.c"
4 | INCLUDE_DIRS "." "include" )
5 |
--------------------------------------------------------------------------------
/main/app_main.c:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All rights reserved.
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | #include "freertos/FreeRTOS.h"
28 | #include "freertos/task.h"
29 | #include "freertos/event_groups.h"
30 | #include "esp_task.h"
31 | #include "esp_spi_flash.h"
32 | #include "esp_err.h"
33 | #include "esp_log.h"
34 | #include "esp_partition.h"
35 | #include "esp_wifi.h"
36 | #include "esp_event.h"
37 | #include "driver/i2c.h"
38 | #include "driver/i2s.h"
39 | #include "driver/adc.h"
40 | #include "esp_adc_cal.h"
41 | #include "nvs_flash.h"
42 |
43 | #include "lwip/apps/sntp.h"
44 |
45 | #include "driver/sdmmc_host.h"
46 | #include "sdmmc_cmd.h"
47 | #include "esp_vfs_fat.h"
48 |
49 | #include "axmodem.h"
50 | #include "ac101.h"
51 | #include "igate/igate.h"
52 |
53 | #include
54 |
55 | #include "driver/uart.h"
56 |
57 | static const char* TAG = "axmodem_main";
58 |
59 | /*
60 | * XXX:
61 | */
62 | void dspOutProcess(void *x);
63 |
64 | /*
65 | * local data
66 | */
67 | #define DISK_BUFFERS (3 * SAMPLE_RATE / DSP_BLOCK_LEN / 4) // 750mS of buffer
68 | #define NEXT_BUFFER(x) ((x) + 1 >= DISK_BUFFERS ? (x) + 1 - DISK_BUFFERS : (x) + 1)
69 |
70 | static int16_t rxBuffer[DMA_BLOCK_LEN * 2];
71 | static float inBuffer[DSP_BLOCK_LEN];
72 |
73 | #ifdef DISK_LOG
74 | static int16_t diskBuffers[DISK_BUFFERS][DSP_BLOCK_LEN];
75 | static uint16_t diskIn, diskOut;
76 | SemaphoreHandle_t diskMutex;
77 | #endif
78 |
79 | /*
80 | * CODEC access
81 | * XXX: wrap interface over this for portability
82 | * XXX: liberally lifted from esp-adf
83 | */
84 |
85 | static const char *ES_TAG = "AC101_DRIVER";
86 |
87 | #define AC_ASSERT(a, format, b, ...) \
88 | if ((a) != 0) { \
89 | ESP_LOGE(ES_TAG, format, ##__VA_ARGS__); \
90 | return b;\
91 | }
92 |
93 |
94 | /*
95 | *
96 | */
97 | static i2c_config_t es_i2c_cfg = {
98 | .mode = I2C_MODE_MASTER,
99 | .sda_io_num = 33,
100 | .scl_io_num = 32,
101 | .sda_pullup_en = GPIO_PULLUP_ENABLE,
102 | .scl_pullup_en = GPIO_PULLUP_ENABLE,
103 | .master.clk_speed = 100000
104 | };
105 |
106 | /*
107 | *
108 | */
109 | static void
110 | i2c_init()
111 | {
112 | /*
113 | * XXX: pins specific to board
114 | */
115 |
116 | ESP_ERROR_CHECK(i2c_param_config(I2C_NUM_0, &es_i2c_cfg));
117 | ESP_ERROR_CHECK(i2c_driver_install(I2C_NUM_0, es_i2c_cfg.mode, 0, 0, 0));
118 | }
119 |
120 |
121 | /*
122 | * XXX:
123 | */
124 | static void
125 | i2c_example_master_read_slave(uint8_t DevAddr,
126 | uint8_t reg,uint8_t* data_rd, size_t size)
127 | {
128 | if (size == 0) {
129 | return;
130 | }
131 | i2c_cmd_handle_t cmd = i2c_cmd_link_create();
132 | ESP_ERROR_CHECK(i2c_master_start(cmd));
133 | ESP_ERROR_CHECK(i2c_master_write_byte(cmd, ( DevAddr << 1 ) | WRITE_BIT, ACK_CHECK_EN));
134 | ESP_ERROR_CHECK(i2c_master_write_byte(cmd, reg, ACK_CHECK_EN));
135 | ESP_ERROR_CHECK(i2c_master_start(cmd));
136 | ESP_ERROR_CHECK(i2c_master_write_byte(cmd, ( DevAddr << 1 ) | READ_BIT, ACK_CHECK_EN)); //check or not
137 | ESP_ERROR_CHECK(i2c_master_read(cmd, data_rd, size, ACK_VAL));
138 | ESP_ERROR_CHECK(i2c_master_stop(cmd));
139 | ESP_ERROR_CHECK(i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS));
140 | i2c_cmd_link_delete(cmd);
141 | }
142 |
143 | static void
144 | AC101_Write_Reg(uint8_t reg, uint16_t val)
145 | {
146 | i2c_cmd_handle_t cmd = i2c_cmd_link_create();
147 | uint8_t send_buff[4];
148 |
149 | send_buff[0] = (AC101_ADDR << 1);
150 | send_buff[1] = reg;
151 | send_buff[2] = (val>>8) & 0xff;
152 | send_buff[3] = val & 0xff;
153 |
154 | ESP_ERROR_CHECK(i2c_master_start(cmd));
155 | ESP_ERROR_CHECK(i2c_master_write(cmd, send_buff, 4, ACK_CHECK_EN));
156 | ESP_ERROR_CHECK(i2c_master_stop(cmd));
157 | ESP_ERROR_CHECK(i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_RATE_MS));
158 | i2c_cmd_link_delete(cmd);
159 | }
160 |
161 | static uint16_t
162 | AC101_Read_Reg(uint8_t reg) {
163 | uint16_t val = 0;
164 | uint8_t data_rd[2];
165 |
166 | i2c_example_master_read_slave(AC101_ADDR,reg, data_rd, 2);
167 | val = (data_rd[0] << 8) + data_rd[1];
168 | return val;
169 | }
170 |
171 | /*
172 | * I2S configuration
173 | */
174 | static const i2s_config_t i2s_config = {
175 | .mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_RX,
176 | .sample_rate = SAMPLE_RATE * 4,
177 | .bits_per_sample = 16,
178 | .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
179 | .communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB,
180 | .intr_alloc_flags = 0,
181 | .dma_buf_count = 4,
182 | .dma_buf_len = DMA_BLOCK_LEN * 2, //
183 | .use_apll = true
184 | };
185 |
186 | static const i2s_pin_config_t i2s_pin_config = {
187 | .bck_io_num = GPIO_NUM_27,
188 | .ws_io_num = GPIO_NUM_26,
189 | .data_out_num = GPIO_NUM_25,
190 | .data_in_num = GPIO_NUM_35
191 | };
192 |
193 | /*
194 | *
195 | */
196 | static int
197 | codecStart()
198 | {
199 | gpio_config_t io_conf;
200 | esp_err_t rv;
201 |
202 | // init i2c
203 | i2c_init();
204 |
205 |
206 | AC101_Write_Reg(CHIP_AUDIO_RS, 0x123);
207 | /* XXX: 20mS reset delay; is this long enough? */
208 | vTaskDelay(20 / portTICK_PERIOD_MS);
209 | printf("chip ID: %x\n", AC101_Read_Reg(CHIP_AUDIO_RS));
210 |
211 | AC101_Write_Reg(SPKOUT_CTRL, 0xe880);
212 |
213 | //Enable the PLL from 32 * 48kHz BCLK source
214 | AC101_Write_Reg(PLL_CTRL1, 0x014f);
215 | AC101_Write_Reg(PLL_CTRL2, 0x8300);
216 | AC101_Write_Reg(SYSCLK_CTRL, 0xab08);
217 | AC101_Write_Reg(MOD_CLK_ENA, 0x800c);
218 | AC101_Write_Reg(MOD_RST_CTRL, 0x800c);
219 |
220 | // AC101_Write_Reg(I2S_SR_CTRL, 0x8000); // 48ks/s
221 | AC101_Write_Reg(I2S_SR_CTRL, 0x2000); // 12ks/s
222 |
223 | //AIF config
224 | AC101_Write_Reg(I2S1LCK_CTRL, 0x8850); //BCLK/LRCK
225 | AC101_Write_Reg(I2S1_SDOUT_CTRL, 0xc000); //
226 | AC101_Write_Reg(I2S1_SDIN_CTRL, 0xc000);
227 | AC101_Write_Reg(I2S1_MXR_SRC, 0x2200); //
228 |
229 | AC101_Write_Reg(ADC_SRCBST_CTRL, 0xccc4);
230 | // AC101_Write_Reg(ADC_SRC, 0x2020);
231 | AC101_Write_Reg(ADC_SRC, 0x0408);
232 | AC101_Write_Reg(ADC_DIG_CTRL, 0x8000);
233 |
234 | /* ADC gain */
235 | // AC101_Write_Reg(ADC_APC_CTRL, 0xbbc0); // L, R: +0dB
236 | AC101_Write_Reg(ADC_APC_CTRL, 0xffc0); // L, R: +6dB
237 |
238 | /* ADC volume: what does this do? */
239 | AC101_Write_Reg(ADC_VOL_CTRL, 0xa0a0); // L, R: +0dB
240 |
241 | //Path Configuration
242 | AC101_Write_Reg(DAC_MXR_SRC, 0xcc00);
243 | AC101_Write_Reg(DAC_DIG_CTRL, 0x8000);
244 | AC101_Write_Reg(OMIXER_SR, 0x0081);
245 | AC101_Write_Reg(OMIXER_DACA_CTRL, 0xf080);//}
246 |
247 | //I2S1_SDOUT_CTRL
248 | AC101_Write_Reg(MOD_CLK_ENA, 0x800c);
249 | AC101_Write_Reg(MOD_RST_CTRL, 0x800c);
250 |
251 | //* Enable Headphoe output
252 | AC101_Write_Reg(OMIXER_DACA_CTRL, 0xff80);
253 | AC101_Write_Reg(HPOUT_CTRL, 0xc3c1);
254 | AC101_Write_Reg(HPOUT_CTRL, 0xcb00);
255 | vTaskDelay(100 / portTICK_PERIOD_MS);
256 | AC101_Write_Reg(HPOUT_CTRL, 0xfbc0); // XXX:
257 |
258 | //* Enable Speaker output
259 | AC101_Write_Reg(SPKOUT_CTRL, 0xeabd);
260 | vTaskDelay(10 / portTICK_PERIOD_MS);
261 |
262 |
263 | // no need to configure MCLK output pin
264 | // XXX:
265 | #if 0
266 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);
267 | WRITE_PERI_REG(PIN_CTRL, 0xFFF0);
268 | #endif
269 |
270 | // configure i2s
271 | ESP_ERROR_CHECK(i2s_driver_install(I2S_NUM_0, &i2s_config, 0, NULL));
272 | ESP_ERROR_CHECK(i2s_set_pin(I2S_NUM_0, &i2s_pin_config));
273 |
274 | /*
275 | * Specific to A1S board
276 | */
277 | memset(&io_conf, 0, sizeof(io_conf));
278 | io_conf.intr_type = GPIO_PIN_INTR_DISABLE;
279 | io_conf.mode = GPIO_MODE_OUTPUT;
280 | io_conf.pin_bit_mask = BIT(GPIO_NUM_21) |
281 | BIT(GPIO_NUM_22) | BIT(GPIO_NUM_23);
282 | io_conf.pull_down_en = 0;
283 | io_conf.pull_up_en = 0;
284 | ESP_ERROR_CHECK(gpio_config(&io_conf));
285 |
286 | ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_21, 1));
287 | ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_22, 1));
288 | ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_23, 0)); // PTT
289 |
290 | return (ESP_OK);
291 | }
292 |
293 |
294 | /*
295 | *
296 | */
297 |
298 | #define DEFAULT_SSID "SSID"
299 | #define DEFAULT_PWD "PASSWORD"
300 | #define DEFAULT_PS_MODE WIFI_PS_NONE
301 |
302 | // #define IP4_CONNECTED_BIT BIT0
303 | // #define IP6_CONNECTED_BIT BIT1
304 | #define WIFI_CONNECTED_BIT BIT2
305 | #define EXAMPLE_ESP_MAXIMUM_RETRY 10
306 |
307 | static EventGroupHandle_t s_wifi_event_group;
308 | static int s_retry_num = 0;
309 |
310 | /*
311 | * Use system default event loop
312 | */
313 | static void
314 | event_handler(void* arg, esp_event_base_t event_base,
315 | int32_t event_id, void* event_data)
316 | {
317 | //ESP_LOGI(TAG, "EVT: %d\n", event->event_id);
318 |
319 | if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
320 | esp_wifi_connect();
321 | } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
322 | if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY) {
323 | esp_wifi_connect();
324 | xEventGroupClearBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
325 | s_retry_num++;
326 | ESP_LOGI(TAG, "retry to connect to the AP");
327 | }
328 | ESP_LOGI(TAG,"connect to the AP fail");
329 | } else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
330 | ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;
331 | ESP_LOGI(TAG, "got ip:%s",
332 | ip4addr_ntoa(&event->ip_info.ip));
333 | s_retry_num = 0;
334 | xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
335 | }
336 | }
337 |
338 | /*
339 | *
340 | */
341 | static void
342 | networkStart()
343 | {
344 | wifi_config_t wifi_config = {
345 | .sta = {
346 | .ssid = DEFAULT_SSID,
347 | .password = DEFAULT_PWD
348 | },
349 | };
350 |
351 | tcpip_adapter_init();
352 |
353 | s_wifi_event_group = xEventGroupCreate();
354 |
355 | ESP_ERROR_CHECK(esp_event_loop_create_default());
356 | ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT,
357 | ESP_EVENT_ANY_ID, &event_handler, NULL));
358 | ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT,
359 | IP_EVENT_STA_GOT_IP, &event_handler, NULL));
360 |
361 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
362 | ESP_ERROR_CHECK(esp_wifi_init(&cfg));
363 | ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
364 |
365 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
366 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config));
367 | ESP_ERROR_CHECK(esp_wifi_start());
368 |
369 | ESP_LOGI(TAG, "esp_wifi_set_ps().");
370 | esp_wifi_set_ps(DEFAULT_PS_MODE);
371 |
372 | /* start SNTP */
373 | // Set timezone to Eastern Standard Time and print local time
374 | setenv("TZ", "PST+8PDT,M3.2.0/2,M11.1.0/2", 1);
375 | tzset();
376 |
377 | ESP_LOGI(TAG, "Initializing SNTP");
378 | sntp_setoperatingmode(SNTP_OPMODE_POLL);
379 | sntp_setservername(0, "pool.ntp.org");
380 | sntp_init();
381 | }
382 |
383 | #ifdef DISK_LOG
384 | /*
385 | * create an audio file
386 | */
387 | static int
388 | createRawFile()
389 | {
390 | time_t now = 0;
391 | struct tm timeinfo = { 0 };
392 | static char nameBuf[40];
393 |
394 | time(&now);
395 | localtime_r(&now, &timeinfo);
396 | snprintf(nameBuf, sizeof (nameBuf), "/sdcard/raw_%4.4d%2.2d%2.2d_%2.2d%2.2d%2.2d.wav",
397 | timeinfo.tm_year + 1900, timeinfo.tm_mon, timeinfo.tm_mday,
398 | timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec);
399 | printf("rawf: %s\n", nameBuf);
400 | return (creat(nameBuf, 0x666));
401 | }
402 |
403 | static TaskHandle_t diskWriteTaskHandle;
404 | static int logFile;
405 | static uint32_t dcount;
406 | volatile static TickType_t maxWrite = 0;
407 | volatile static TickType_t avgWrite = 0;
408 |
409 | /*
410 | * Disk write task
411 | */
412 | IRAM_ATTR static void
413 | diskWriteTask(void *x)
414 | {
415 | TickType_t t1, t2;
416 | uint32_t count;
417 | uint16_t diskIndex;
418 |
419 | while (true) {
420 | count = ulTaskNotifyTake(pdFALSE, portMAX_DELAY);
421 |
422 | xSemaphoreTake(diskMutex, portMAX_DELAY);
423 | if (diskOut == diskIn) {
424 | // buffer is empty, nothing to do
425 | xSemaphoreGive(diskMutex);
426 | continue;
427 | }
428 | diskIndex = diskOut;
429 | xSemaphoreGive(diskMutex);
430 |
431 | t1 = xTaskGetTickCount();
432 |
433 | /* capture 10 minutes of audio per file */
434 | if (dcount++ < (12000 * 60 / DSP_BLOCK_LEN)) {
435 | if (logFile > 2) {
436 | write(logFile, &diskBuffers[diskIndex][0], DSP_BLOCK_LEN * sizeof (int16_t));
437 | }
438 | } else {
439 | dcount = 0;
440 | close(logFile);
441 | logFile = createRawFile();
442 | if (logFile > 2) {
443 | write(logFile, &diskBuffers[diskIndex][0], DSP_BLOCK_LEN * sizeof (int16_t));
444 | }
445 | avgWrite /= (12000 * 60 / DSP_BLOCK_LEN);
446 | printf("maxWrite: %u %u (no sync)\n", maxWrite, avgWrite);
447 | maxWrite = avgWrite = 0;
448 | }
449 |
450 | t2 = xTaskGetTickCount();
451 | t2 -= t1;
452 | if (t2 > maxWrite) {
453 | maxWrite = t2;
454 | }
455 | avgWrite += t2;
456 |
457 | /* free up the disk buffer */
458 | xSemaphoreTake(diskMutex, portMAX_DELAY);
459 | diskOut = NEXT_BUFFER(diskOut);
460 | xSemaphoreGive(diskMutex);
461 |
462 | // XXX: do an fsync() here?
463 | }
464 |
465 | }
466 | #endif
467 |
468 | /*
469 | * DSP processing
470 | */
471 | static TaskHandle_t dspInTaskHandle, dspOutTaskHandle;
472 | static float inputGain = 4.0f;
473 |
474 | //volatile uint64_t dspCycles;
475 | //
476 | /*
477 | *
478 | */
479 | IRAM_ATTR static void
480 | dspInProcess(void *x)
481 | {
482 | size_t bytes_read;
483 | int16_t *diskp;
484 |
485 | /*
486 | *
487 | */
488 | while (1) {
489 | (void)i2s_read(I2S_NUM_0, (char *)rxBuffer, sizeof (rxBuffer),
490 | &bytes_read, 1000);
491 |
492 | if (bytes_read != sizeof (rxBuffer)) {
493 | ESP_LOGE("CODEC", "short codec read: %d", bytes_read);
494 | }
495 |
496 | #ifdef DISK_LOG
497 | /*
498 | * Get disk buffer if available
499 | */
500 | xSemaphoreTake(diskMutex, portMAX_DELAY);
501 | /* check for full buffer */
502 | if (NEXT_BUFFER(diskIn) == diskOut) {
503 | // full
504 | diskp = NULL;
505 | } else {
506 | // room available
507 | diskp = &diskBuffers[diskIn][0];
508 | // handle the wrap case
509 | diskIn = NEXT_BUFFER(diskIn);
510 | }
511 | xSemaphoreGive(diskMutex);
512 |
513 | if (!diskp) {
514 | puts("disk overflow");
515 | }
516 | #endif
517 | /*
518 | * separate right-channel input; note that inBuffer &
519 | * outBuffer are sized to DSP_BLOCK_LEN * 1 channel,
520 | *
521 | * XXX: frames are 4x stereo samples; is there a way to
522 | * reduce this 1x stereo sample?
523 | *
524 | * One sample is : [R, L] * 4
525 | * even samples are R, odd are L
526 | */
527 | for (int i = 0; i < DSP_BLOCK_LEN; i++) {
528 | /* process samples into float for DSP */
529 | // inBuffer[i] = ((float)rxBuffer[i * 8 + 0]) / 32767.0;
530 | inBuffer[i] = ((float)rxBuffer[i * 8 + 0]) * (float)(1.0 / 32767.0);
531 |
532 | #ifdef DISK_LOG
533 | /* process samples into diskBuffer */
534 | if (diskp) {
535 | diskp[i] = rxBuffer[i * 8 + 0];
536 | }
537 | #endif
538 |
539 | /* XXX: gain + clip */
540 | inBuffer[i] *= inputGain;
541 | if (inBuffer[i] >= 1.0f) {
542 | inBuffer[i] = 0.9999f;
543 | } else if (inBuffer[i] <= -1.0f) {
544 | inBuffer[i] = -0.9999f;
545 | }
546 | }
547 |
548 | gpio_set_level(GPIO_NUM_22, 0);
549 | modemProcessInput(inBuffer);
550 | gpio_set_level(GPIO_NUM_22, 1);
551 |
552 | #ifdef DISK_LOG
553 | // wake up disk writer
554 | if (diskp) {
555 | xTaskNotifyGive(diskWriteTaskHandle);
556 | }
557 | #endif
558 | }
559 | }
560 |
561 | #ifdef DISK_LOG
562 | #include
563 |
564 | #define SD_USE_MMC
565 |
566 | /*
567 | *
568 | */
569 | void
570 | sdcardInitialize()
571 | {
572 | esp_err_t ret;
573 |
574 | #ifdef SD_USE_MMC
575 | sdmmc_host_t host = SDMMC_HOST_DEFAULT();
576 | sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
577 | #else
578 | sdmmc_host_t host = SDSPI_HOST_DEFAULT();
579 | sdspi_slot_config_t slot_config = SDSPI_SLOT_CONFIG_DEFAULT();
580 | #endif
581 |
582 | esp_vfs_fat_sdmmc_mount_config_t mount_config = {
583 | .format_if_mount_failed = false,
584 | .max_files = 5,
585 | .allocation_unit_size = 16 * 1024
586 | };
587 | FATFS *out_fs;
588 | sdmmc_card_t *card;
589 |
590 | // slot_config.gpio_cd = 34;
591 |
592 | #ifdef SD_USE_MMC
593 | /* XXX: */
594 | // PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, FUNC_MTDI_HS2_DATA2);
595 |
596 | // To use 1-line SD mode, uncomment the following line:
597 | slot_config.width = 1;
598 |
599 | // GPIOs 15, 2, 4, 12, 13 should have external 10k pull-ups.
600 | // Internal pull-ups are not sufficient. However, enabling internal pull-ups
601 | // does make a difference some boards, so we do that here.
602 |
603 | gpio_set_pull_mode(15, GPIO_PULLUP_ONLY); // CMD, needed in 4- and 1- line modes
604 | gpio_set_pull_mode(2, GPIO_PULLUP_ONLY); // D0, needed in 4- and 1-line modes
605 | gpio_set_pull_mode(4, GPIO_PULLUP_ONLY); // D1, needed in 4-line mode only
606 | gpio_set_pull_mode(12, GPIO_PULLUP_ONLY); // D2, needed in 4-line mode only
607 | gpio_set_pull_mode(13, GPIO_PULLUP_ONLY); // D3, needed in 4- and 1-line modes
608 |
609 | // host.max_freq_khz = SDMMC_FREQ_PROBING;
610 | host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
611 | host.flags = SDMMC_HOST_FLAG_4BIT | \
612 | SDMMC_HOST_FLAG_1BIT | \
613 | SDMMC_HOST_FLAG_DDR;
614 | #else
615 |
616 | #define PIN_NUM_MISO 2
617 | #define PIN_NUM_MOSI 15
618 | #define PIN_NUM_CLK 14
619 | #define PIN_NUM_CS 13
620 |
621 | ESP_LOGI(TAG, "Using SPI peripheral");
622 |
623 | slot_config.gpio_miso = PIN_NUM_MISO;
624 | slot_config.gpio_mosi = PIN_NUM_MOSI;
625 | slot_config.gpio_sck = PIN_NUM_CLK;
626 | slot_config.gpio_cs = PIN_NUM_CS;
627 | // This initializes the slot without card detect (CD) and write protect (WP) signals.
628 | // Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals.
629 | #endif
630 |
631 | ret = esp_vfs_fat_sdmmc_mount("/sdcard", &host, &slot_config, &mount_config, &card);
632 |
633 | if (ret != ESP_OK) {
634 | if (ret == ESP_FAIL) {
635 | ESP_LOGE(TAG, "Failed to mount filesystem. "
636 | "If you want the card to be formatted, set format_if_mount_failed = true.");
637 | } else {
638 | ESP_LOGE(TAG, "Failed to initialize the card (%s). "
639 | "Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret));
640 | }
641 | return;
642 | }
643 |
644 | // Card has been initialized, print its properties
645 | sdmmc_card_print_info(stdout, card);
646 | logFile = createRawFile();
647 | printf("logFile: %d\n", logFile);
648 | }
649 | #endif
650 |
651 | /*
652 | *
653 | */
654 | esp_err_t
655 | app_main(void)
656 | {
657 | esp_err_t err;
658 |
659 | const uart_config_t uart_config = {
660 | .baud_rate = 115200,
661 | .data_bits = UART_DATA_8_BITS,
662 | .parity = UART_PARITY_DISABLE,
663 | .stop_bits = UART_STOP_BITS_1,
664 | .flow_ctrl = UART_HW_FLOWCTRL_DISABLE
665 | };
666 |
667 | esp_log_level_set("*", ESP_LOG_INFO);
668 |
669 | /*
670 | * XXX: config UART0
671 | */
672 | (void)uart_param_config(UART_NUM_0, &uart_config);
673 | (void)uart_driver_install(UART_NUM_0,
674 | 2048, // RX buffer size
675 | 2048, // TX buffer size
676 | 0, // evt queue size
677 | NULL, // evt qeueue handle
678 | 0); // irq flags
679 |
680 | #ifdef DISK_LOG
681 | /*
682 | * Initialize network, codec, modem
683 | */
684 | diskMutex = xSemaphoreCreateMutex();
685 | #endif
686 |
687 | /* initialize NVS */
688 | err = nvs_flash_init();
689 | if (err == ESP_ERR_NVS_NO_FREE_PAGES ||
690 | err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
691 | // Erase and retry NVS init
692 | ESP_ERROR_CHECK(nvs_flash_erase());
693 | err = nvs_flash_init();
694 | }
695 | ESP_ERROR_CHECK( err );
696 |
697 | /*
698 | *
699 | */
700 | networkStart();
701 | // XXX: give the network a little time
702 | vTaskDelay(5000 / portTICK_PERIOD_MS);
703 |
704 | codecStart();
705 | modemInitialize();
706 |
707 | #if DISK_LOG
708 | /*
709 | *
710 | */
711 | sdcardInitialize();
712 |
713 | /*
714 | * Disk write task for audio logging
715 | */
716 | err = xTaskCreate(diskWriteTask, "diskWrite",
717 | ESP_TASK_MAIN_STACK,
718 | ( void * ) 1,
719 | ESP_TASK_PRIO_MAX - 2,
720 | &diskWriteTaskHandle);
721 | #endif
722 |
723 | /*
724 | * DSP processing tasks
725 | * Separate tasks for input and output processing
726 | * XXX: check for err return
727 | */
728 | err = xTaskCreate(dspInProcess, "dspIn",
729 | ESP_TASK_MAIN_STACK,
730 | ( void * ) 1,
731 | ESP_TASK_PRIO_MAX - 1,
732 | &dspInTaskHandle);
733 |
734 | err = xTaskCreate(dspOutProcess, "dspOut",
735 | ESP_TASK_MAIN_STACK,
736 | ( void * ) 1,
737 | ESP_TASK_PRIO_MAX - 1,
738 | &dspOutTaskHandle);
739 |
740 | /*
741 | * Start iGate
742 | */
743 | igateStart();
744 |
745 | /*
746 | * All done; return and be deleted
747 | */
748 | return (ESP_OK);
749 | }
750 |
751 |
752 |
--------------------------------------------------------------------------------
/main/axfcs.c:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #include
23 | #include "axfcs.h"
24 |
25 | /*
26 | * FCS lookup table lifted from https://tools.ietf.org/rfc/rfc1549.txt
27 | */
28 | static const uint16_t fcstab[256] = {
29 | 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
30 | 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
31 | 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
32 | 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
33 | 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
34 | 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
35 | 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
36 | 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
37 | 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
38 | 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
39 | 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
40 | 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
41 | 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
42 | 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
43 | 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
44 | 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
45 | 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
46 | 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
47 | 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
48 | 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
49 | 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
50 | 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
51 | 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
52 | 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
53 | 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
54 | 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
55 | 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
56 | 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
57 | 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
58 | 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
59 | 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
60 | 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
61 | };
62 |
63 | /*
64 | *
65 | */
66 | void
67 | fcs_update(uint16_t *fcs, uint8_t v)
68 | {
69 | *fcs = (*fcs >> 8) ^ fcstab[(*fcs ^ v) & 0xff];
70 | }
71 |
72 | /*
73 | *
74 | */
75 | uint16_t
76 | fcs_value(uint8_t *data, uint16_t len)
77 | {
78 | uint16_t fcs = 0xffff;
79 |
80 | while (len-- > 0) {
81 | fcs_update(&fcs, *data++);
82 | }
83 |
84 | return (~fcs);
85 | }
86 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/usr/bin/cc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "GNU")
4 | set(CMAKE_C_COMPILER_VERSION "7.4.0")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
12 |
13 | set(CMAKE_C_PLATFORM_ID "Linux")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_SIMULATE_VERSION "")
16 |
17 |
18 |
19 | set(CMAKE_AR "/usr/bin/ar")
20 | set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-7")
21 | set(CMAKE_RANLIB "/usr/bin/ranlib")
22 | set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-7")
23 | set(CMAKE_LINKER "/usr/bin/ld")
24 | set(CMAKE_COMPILER_IS_GNUCC 1)
25 | set(CMAKE_C_COMPILER_LOADED 1)
26 | set(CMAKE_C_COMPILER_WORKS TRUE)
27 | set(CMAKE_C_ABI_COMPILED TRUE)
28 | set(CMAKE_COMPILER_IS_MINGW )
29 | set(CMAKE_COMPILER_IS_CYGWIN )
30 | if(CMAKE_COMPILER_IS_CYGWIN)
31 | set(CYGWIN 1)
32 | set(UNIX 1)
33 | endif()
34 |
35 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
36 |
37 | if(CMAKE_COMPILER_IS_MINGW)
38 | set(MINGW 1)
39 | endif()
40 | set(CMAKE_C_COMPILER_ID_RUN 1)
41 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
42 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
43 | set(CMAKE_C_LINKER_PREFERENCE 10)
44 |
45 | # Save compiler ABI information.
46 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
47 | set(CMAKE_C_COMPILER_ABI "ELF")
48 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
49 |
50 | if(CMAKE_C_SIZEOF_DATA_PTR)
51 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
52 | endif()
53 |
54 | if(CMAKE_C_COMPILER_ABI)
55 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
56 | endif()
57 |
58 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
59 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
60 | endif()
61 |
62 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
63 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
64 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
65 | endif()
66 |
67 |
68 |
69 |
70 |
71 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
72 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
73 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
74 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "GNU")
4 | set(CMAKE_CXX_COMPILER_VERSION "7.4.0")
5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_CXX_COMPILER_WRAPPER "")
7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17")
9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
13 |
14 | set(CMAKE_CXX_PLATFORM_ID "Linux")
15 | set(CMAKE_CXX_SIMULATE_ID "")
16 | set(CMAKE_CXX_SIMULATE_VERSION "")
17 |
18 |
19 |
20 | set(CMAKE_AR "/usr/bin/ar")
21 | set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-7")
22 | set(CMAKE_RANLIB "/usr/bin/ranlib")
23 | set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-7")
24 | set(CMAKE_LINKER "/usr/bin/ld")
25 | set(CMAKE_COMPILER_IS_GNUCXX 1)
26 | set(CMAKE_CXX_COMPILER_LOADED 1)
27 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
28 | set(CMAKE_CXX_ABI_COMPILED TRUE)
29 | set(CMAKE_COMPILER_IS_MINGW )
30 | set(CMAKE_COMPILER_IS_CYGWIN )
31 | if(CMAKE_COMPILER_IS_CYGWIN)
32 | set(CYGWIN 1)
33 | set(UNIX 1)
34 | endif()
35 |
36 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
37 |
38 | if(CMAKE_COMPILER_IS_MINGW)
39 | set(MINGW 1)
40 | endif()
41 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
42 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
43 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
44 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
45 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
46 |
47 | # Save compiler ABI information.
48 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
49 | set(CMAKE_CXX_COMPILER_ABI "ELF")
50 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
51 |
52 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
53 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
54 | endif()
55 |
56 | if(CMAKE_CXX_COMPILER_ABI)
57 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
58 | endif()
59 |
60 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
61 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
62 | endif()
63 |
64 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
65 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
66 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
67 | endif()
68 |
69 |
70 |
71 |
72 |
73 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
74 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
75 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
76 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Linux-4.4.0-18362-Microsoft")
2 | set(CMAKE_HOST_SYSTEM_NAME "Linux")
3 | set(CMAKE_HOST_SYSTEM_VERSION "4.4.0-18362-Microsoft")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Linux-4.4.0-18362-Microsoft")
9 | set(CMAKE_SYSTEM_NAME "Linux")
10 | set(CMAKE_SYSTEM_VERSION "4.4.0-18362-Microsoft")
11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CompilerIdC/CMakeCCompilerId.c:
--------------------------------------------------------------------------------
1 | #ifdef __cplusplus
2 | # error "A C++ compiler has been selected for C."
3 | #endif
4 |
5 | #if defined(__18CXX)
6 | # define ID_VOID_MAIN
7 | #endif
8 | #if defined(__CLASSIC_C__)
9 | /* cv-qualifiers did not exist in K&R C */
10 | # define const
11 | # define volatile
12 | #endif
13 |
14 |
15 | /* Version number components: V=Version, R=Revision, P=Patch
16 | Version date components: YYYY=Year, MM=Month, DD=Day */
17 |
18 | #if defined(__INTEL_COMPILER) || defined(__ICC)
19 | # define COMPILER_ID "Intel"
20 | # if defined(_MSC_VER)
21 | # define SIMULATE_ID "MSVC"
22 | # endif
23 | /* __INTEL_COMPILER = VRP */
24 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
25 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
26 | # if defined(__INTEL_COMPILER_UPDATE)
27 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
28 | # else
29 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
30 | # endif
31 | # if defined(__INTEL_COMPILER_BUILD_DATE)
32 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
33 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
34 | # endif
35 | # if defined(_MSC_VER)
36 | /* _MSC_VER = VVRR */
37 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
38 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
39 | # endif
40 |
41 | #elif defined(__PATHCC__)
42 | # define COMPILER_ID "PathScale"
43 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
44 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
45 | # if defined(__PATHCC_PATCHLEVEL__)
46 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
47 | # endif
48 |
49 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
50 | # define COMPILER_ID "Embarcadero"
51 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
52 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
53 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
54 |
55 | #elif defined(__BORLANDC__)
56 | # define COMPILER_ID "Borland"
57 | /* __BORLANDC__ = 0xVRR */
58 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
59 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
60 |
61 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200
62 | # define COMPILER_ID "Watcom"
63 | /* __WATCOMC__ = VVRR */
64 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
65 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
66 | # if (__WATCOMC__ % 10) > 0
67 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
68 | # endif
69 |
70 | #elif defined(__WATCOMC__)
71 | # define COMPILER_ID "OpenWatcom"
72 | /* __WATCOMC__ = VVRP + 1100 */
73 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
74 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
75 | # if (__WATCOMC__ % 10) > 0
76 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
77 | # endif
78 |
79 | #elif defined(__SUNPRO_C)
80 | # define COMPILER_ID "SunPro"
81 | # if __SUNPRO_C >= 0x5100
82 | /* __SUNPRO_C = 0xVRRP */
83 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
84 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
85 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
86 | # else
87 | /* __SUNPRO_CC = 0xVRP */
88 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
89 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
90 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
91 | # endif
92 |
93 | #elif defined(__HP_cc)
94 | # define COMPILER_ID "HP"
95 | /* __HP_cc = VVRRPP */
96 | # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
97 | # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
98 | # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
99 |
100 | #elif defined(__DECC)
101 | # define COMPILER_ID "Compaq"
102 | /* __DECC_VER = VVRRTPPPP */
103 | # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
104 | # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
105 | # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
106 |
107 | #elif defined(__IBMC__) && defined(__COMPILER_VER__)
108 | # define COMPILER_ID "zOS"
109 | /* __IBMC__ = VRP */
110 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
111 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
112 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
113 |
114 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
115 | # define COMPILER_ID "XL"
116 | /* __IBMC__ = VRP */
117 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
118 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
119 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
120 |
121 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
122 | # define COMPILER_ID "VisualAge"
123 | /* __IBMC__ = VRP */
124 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
125 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
126 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
127 |
128 | #elif defined(__PGI)
129 | # define COMPILER_ID "PGI"
130 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
131 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
132 | # if defined(__PGIC_PATCHLEVEL__)
133 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
134 | # endif
135 |
136 | #elif defined(_CRAYC)
137 | # define COMPILER_ID "Cray"
138 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
139 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
140 |
141 | #elif defined(__TI_COMPILER_VERSION__)
142 | # define COMPILER_ID "TI"
143 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
144 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
145 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
146 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
147 |
148 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
149 | # define COMPILER_ID "Fujitsu"
150 |
151 | #elif defined(__TINYC__)
152 | # define COMPILER_ID "TinyCC"
153 |
154 | #elif defined(__BCC__)
155 | # define COMPILER_ID "Bruce"
156 |
157 | #elif defined(__SCO_VERSION__)
158 | # define COMPILER_ID "SCO"
159 |
160 | #elif defined(__clang__) && defined(__apple_build_version__)
161 | # define COMPILER_ID "AppleClang"
162 | # if defined(_MSC_VER)
163 | # define SIMULATE_ID "MSVC"
164 | # endif
165 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
166 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
167 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
168 | # if defined(_MSC_VER)
169 | /* _MSC_VER = VVRR */
170 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
171 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
172 | # endif
173 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
174 |
175 | #elif defined(__clang__)
176 | # define COMPILER_ID "Clang"
177 | # if defined(_MSC_VER)
178 | # define SIMULATE_ID "MSVC"
179 | # endif
180 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
181 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
182 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
183 | # if defined(_MSC_VER)
184 | /* _MSC_VER = VVRR */
185 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
186 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
187 | # endif
188 |
189 | #elif defined(__GNUC__)
190 | # define COMPILER_ID "GNU"
191 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__)
192 | # if defined(__GNUC_MINOR__)
193 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
194 | # endif
195 | # if defined(__GNUC_PATCHLEVEL__)
196 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
197 | # endif
198 |
199 | #elif defined(_MSC_VER)
200 | # define COMPILER_ID "MSVC"
201 | /* _MSC_VER = VVRR */
202 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
203 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
204 | # if defined(_MSC_FULL_VER)
205 | # if _MSC_VER >= 1400
206 | /* _MSC_FULL_VER = VVRRPPPPP */
207 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
208 | # else
209 | /* _MSC_FULL_VER = VVRRPPPP */
210 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
211 | # endif
212 | # endif
213 | # if defined(_MSC_BUILD)
214 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
215 | # endif
216 |
217 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
218 | # define COMPILER_ID "ADSP"
219 | #if defined(__VISUALDSPVERSION__)
220 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
221 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
222 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
223 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
224 | #endif
225 |
226 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
227 | # define COMPILER_ID "IAR"
228 | # if defined(__VER__)
229 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
230 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
231 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
232 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
233 | # endif
234 |
235 | #elif defined(__ARMCC_VERSION)
236 | # define COMPILER_ID "ARMCC"
237 | #if __ARMCC_VERSION >= 1000000
238 | /* __ARMCC_VERSION = VRRPPPP */
239 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
240 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
241 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
242 | #else
243 | /* __ARMCC_VERSION = VRPPPP */
244 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
245 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
246 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
247 | #endif
248 |
249 |
250 | #elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
251 | # define COMPILER_ID "SDCC"
252 | # if defined(__SDCC_VERSION_MAJOR)
253 | # define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
254 | # define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
255 | # define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
256 | # else
257 | /* SDCC = VRP */
258 | # define COMPILER_VERSION_MAJOR DEC(SDCC/100)
259 | # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
260 | # define COMPILER_VERSION_PATCH DEC(SDCC % 10)
261 | # endif
262 |
263 | #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
264 | # define COMPILER_ID "MIPSpro"
265 | # if defined(_SGI_COMPILER_VERSION)
266 | /* _SGI_COMPILER_VERSION = VRP */
267 | # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
268 | # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
269 | # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10)
270 | # else
271 | /* _COMPILER_VERSION = VRP */
272 | # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
273 | # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
274 | # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10)
275 | # endif
276 |
277 |
278 | /* These compilers are either not known or too old to define an
279 | identification macro. Try to identify the platform and guess that
280 | it is the native compiler. */
281 | #elif defined(__sgi)
282 | # define COMPILER_ID "MIPSpro"
283 |
284 | #elif defined(__hpux) || defined(__hpua)
285 | # define COMPILER_ID "HP"
286 |
287 | #else /* unknown compiler */
288 | # define COMPILER_ID ""
289 | #endif
290 |
291 | /* Construct the string literal in pieces to prevent the source from
292 | getting matched. Store it in a pointer rather than an array
293 | because some compilers will just produce instructions to fill the
294 | array rather than assigning a pointer to a static array. */
295 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
296 | #ifdef SIMULATE_ID
297 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
298 | #endif
299 |
300 | #ifdef __QNXNTO__
301 | char const* qnxnto = "INFO" ":" "qnxnto[]";
302 | #endif
303 |
304 | #if defined(__CRAYXE) || defined(__CRAYXC)
305 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
306 | #endif
307 |
308 | #define STRINGIFY_HELPER(X) #X
309 | #define STRINGIFY(X) STRINGIFY_HELPER(X)
310 |
311 | /* Identify known platforms by name. */
312 | #if defined(__linux) || defined(__linux__) || defined(linux)
313 | # define PLATFORM_ID "Linux"
314 |
315 | #elif defined(__CYGWIN__)
316 | # define PLATFORM_ID "Cygwin"
317 |
318 | #elif defined(__MINGW32__)
319 | # define PLATFORM_ID "MinGW"
320 |
321 | #elif defined(__APPLE__)
322 | # define PLATFORM_ID "Darwin"
323 |
324 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
325 | # define PLATFORM_ID "Windows"
326 |
327 | #elif defined(__FreeBSD__) || defined(__FreeBSD)
328 | # define PLATFORM_ID "FreeBSD"
329 |
330 | #elif defined(__NetBSD__) || defined(__NetBSD)
331 | # define PLATFORM_ID "NetBSD"
332 |
333 | #elif defined(__OpenBSD__) || defined(__OPENBSD)
334 | # define PLATFORM_ID "OpenBSD"
335 |
336 | #elif defined(__sun) || defined(sun)
337 | # define PLATFORM_ID "SunOS"
338 |
339 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
340 | # define PLATFORM_ID "AIX"
341 |
342 | #elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
343 | # define PLATFORM_ID "IRIX"
344 |
345 | #elif defined(__hpux) || defined(__hpux__)
346 | # define PLATFORM_ID "HP-UX"
347 |
348 | #elif defined(__HAIKU__)
349 | # define PLATFORM_ID "Haiku"
350 |
351 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
352 | # define PLATFORM_ID "BeOS"
353 |
354 | #elif defined(__QNX__) || defined(__QNXNTO__)
355 | # define PLATFORM_ID "QNX"
356 |
357 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
358 | # define PLATFORM_ID "Tru64"
359 |
360 | #elif defined(__riscos) || defined(__riscos__)
361 | # define PLATFORM_ID "RISCos"
362 |
363 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
364 | # define PLATFORM_ID "SINIX"
365 |
366 | #elif defined(__UNIX_SV__)
367 | # define PLATFORM_ID "UNIX_SV"
368 |
369 | #elif defined(__bsdos__)
370 | # define PLATFORM_ID "BSDOS"
371 |
372 | #elif defined(_MPRAS) || defined(MPRAS)
373 | # define PLATFORM_ID "MP-RAS"
374 |
375 | #elif defined(__osf) || defined(__osf__)
376 | # define PLATFORM_ID "OSF1"
377 |
378 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
379 | # define PLATFORM_ID "SCO_SV"
380 |
381 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
382 | # define PLATFORM_ID "ULTRIX"
383 |
384 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
385 | # define PLATFORM_ID "Xenix"
386 |
387 | #elif defined(__WATCOMC__)
388 | # if defined(__LINUX__)
389 | # define PLATFORM_ID "Linux"
390 |
391 | # elif defined(__DOS__)
392 | # define PLATFORM_ID "DOS"
393 |
394 | # elif defined(__OS2__)
395 | # define PLATFORM_ID "OS2"
396 |
397 | # elif defined(__WINDOWS__)
398 | # define PLATFORM_ID "Windows3x"
399 |
400 | # else /* unknown platform */
401 | # define PLATFORM_ID
402 | # endif
403 |
404 | #else /* unknown platform */
405 | # define PLATFORM_ID
406 |
407 | #endif
408 |
409 | /* For windows compilers MSVC and Intel we can determine
410 | the architecture of the compiler being used. This is because
411 | the compilers do not have flags that can change the architecture,
412 | but rather depend on which compiler is being used
413 | */
414 | #if defined(_WIN32) && defined(_MSC_VER)
415 | # if defined(_M_IA64)
416 | # define ARCHITECTURE_ID "IA64"
417 |
418 | # elif defined(_M_X64) || defined(_M_AMD64)
419 | # define ARCHITECTURE_ID "x64"
420 |
421 | # elif defined(_M_IX86)
422 | # define ARCHITECTURE_ID "X86"
423 |
424 | # elif defined(_M_ARM64)
425 | # define ARCHITECTURE_ID "ARM64"
426 |
427 | # elif defined(_M_ARM)
428 | # if _M_ARM == 4
429 | # define ARCHITECTURE_ID "ARMV4I"
430 | # elif _M_ARM == 5
431 | # define ARCHITECTURE_ID "ARMV5I"
432 | # else
433 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
434 | # endif
435 |
436 | # elif defined(_M_MIPS)
437 | # define ARCHITECTURE_ID "MIPS"
438 |
439 | # elif defined(_M_SH)
440 | # define ARCHITECTURE_ID "SHx"
441 |
442 | # else /* unknown architecture */
443 | # define ARCHITECTURE_ID ""
444 | # endif
445 |
446 | #elif defined(__WATCOMC__)
447 | # if defined(_M_I86)
448 | # define ARCHITECTURE_ID "I86"
449 |
450 | # elif defined(_M_IX86)
451 | # define ARCHITECTURE_ID "X86"
452 |
453 | # else /* unknown architecture */
454 | # define ARCHITECTURE_ID ""
455 | # endif
456 |
457 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
458 | # if defined(__ICCARM__)
459 | # define ARCHITECTURE_ID "ARM"
460 |
461 | # elif defined(__ICCAVR__)
462 | # define ARCHITECTURE_ID "AVR"
463 |
464 | # else /* unknown architecture */
465 | # define ARCHITECTURE_ID ""
466 | # endif
467 | #else
468 | # define ARCHITECTURE_ID
469 | #endif
470 |
471 | /* Convert integer to decimal digit literals. */
472 | #define DEC(n) \
473 | ('0' + (((n) / 10000000)%10)), \
474 | ('0' + (((n) / 1000000)%10)), \
475 | ('0' + (((n) / 100000)%10)), \
476 | ('0' + (((n) / 10000)%10)), \
477 | ('0' + (((n) / 1000)%10)), \
478 | ('0' + (((n) / 100)%10)), \
479 | ('0' + (((n) / 10)%10)), \
480 | ('0' + ((n) % 10))
481 |
482 | /* Convert integer to hex digit literals. */
483 | #define HEX(n) \
484 | ('0' + ((n)>>28 & 0xF)), \
485 | ('0' + ((n)>>24 & 0xF)), \
486 | ('0' + ((n)>>20 & 0xF)), \
487 | ('0' + ((n)>>16 & 0xF)), \
488 | ('0' + ((n)>>12 & 0xF)), \
489 | ('0' + ((n)>>8 & 0xF)), \
490 | ('0' + ((n)>>4 & 0xF)), \
491 | ('0' + ((n) & 0xF))
492 |
493 | /* Construct a string literal encoding the version number components. */
494 | #ifdef COMPILER_VERSION_MAJOR
495 | char const info_version[] = {
496 | 'I', 'N', 'F', 'O', ':',
497 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
498 | COMPILER_VERSION_MAJOR,
499 | # ifdef COMPILER_VERSION_MINOR
500 | '.', COMPILER_VERSION_MINOR,
501 | # ifdef COMPILER_VERSION_PATCH
502 | '.', COMPILER_VERSION_PATCH,
503 | # ifdef COMPILER_VERSION_TWEAK
504 | '.', COMPILER_VERSION_TWEAK,
505 | # endif
506 | # endif
507 | # endif
508 | ']','\0'};
509 | #endif
510 |
511 | /* Construct a string literal encoding the internal version number. */
512 | #ifdef COMPILER_VERSION_INTERNAL
513 | char const info_version_internal[] = {
514 | 'I', 'N', 'F', 'O', ':',
515 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
516 | 'i','n','t','e','r','n','a','l','[',
517 | COMPILER_VERSION_INTERNAL,']','\0'};
518 | #endif
519 |
520 | /* Construct a string literal encoding the version number components. */
521 | #ifdef SIMULATE_VERSION_MAJOR
522 | char const info_simulate_version[] = {
523 | 'I', 'N', 'F', 'O', ':',
524 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
525 | SIMULATE_VERSION_MAJOR,
526 | # ifdef SIMULATE_VERSION_MINOR
527 | '.', SIMULATE_VERSION_MINOR,
528 | # ifdef SIMULATE_VERSION_PATCH
529 | '.', SIMULATE_VERSION_PATCH,
530 | # ifdef SIMULATE_VERSION_TWEAK
531 | '.', SIMULATE_VERSION_TWEAK,
532 | # endif
533 | # endif
534 | # endif
535 | ']','\0'};
536 | #endif
537 |
538 | /* Construct the string literal in pieces to prevent the source from
539 | getting matched. Store it in a pointer rather than an array
540 | because some compilers will just produce instructions to fill the
541 | array rather than assigning a pointer to a static array. */
542 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
543 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
544 |
545 |
546 |
547 |
548 | #if !defined(__STDC__)
549 | # if defined(_MSC_VER) && !defined(__clang__)
550 | # define C_DIALECT "90"
551 | # else
552 | # define C_DIALECT
553 | # endif
554 | #elif __STDC_VERSION__ >= 201000L
555 | # define C_DIALECT "11"
556 | #elif __STDC_VERSION__ >= 199901L
557 | # define C_DIALECT "99"
558 | #else
559 | # define C_DIALECT "90"
560 | #endif
561 | const char* info_language_dialect_default =
562 | "INFO" ":" "dialect_default[" C_DIALECT "]";
563 |
564 | /*--------------------------------------------------------------------------*/
565 |
566 | #ifdef ID_VOID_MAIN
567 | void main() {}
568 | #else
569 | # if defined(__CLASSIC_C__)
570 | int main(argc, argv) int argc; char *argv[];
571 | # else
572 | int main(int argc, char* argv[])
573 | # endif
574 | {
575 | int require = 0;
576 | require += info_compiler[argc];
577 | require += info_platform[argc];
578 | require += info_arch[argc];
579 | #ifdef COMPILER_VERSION_MAJOR
580 | require += info_version[argc];
581 | #endif
582 | #ifdef COMPILER_VERSION_INTERNAL
583 | require += info_version_internal[argc];
584 | #endif
585 | #ifdef SIMULATE_ID
586 | require += info_simulate[argc];
587 | #endif
588 | #ifdef SIMULATE_VERSION_MAJOR
589 | require += info_simulate_version[argc];
590 | #endif
591 | #if defined(__CRAYXE) || defined(__CRAYXC)
592 | require += info_cray[argc];
593 | #endif
594 | require += info_language_dialect_default[argc];
595 | (void)argv;
596 | return require;
597 | }
598 | #endif
599 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CompilerIdC/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/build/CMakeFiles/3.10.2/CompilerIdC/a.out
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:
--------------------------------------------------------------------------------
1 | /* This source file must have a .cpp extension so that all C++ compilers
2 | recognize the extension without flags. Borland does not know .cxx for
3 | example. */
4 | #ifndef __cplusplus
5 | # error "A C compiler has been selected for C++."
6 | #endif
7 |
8 |
9 | /* Version number components: V=Version, R=Revision, P=Patch
10 | Version date components: YYYY=Year, MM=Month, DD=Day */
11 |
12 | #if defined(__COMO__)
13 | # define COMPILER_ID "Comeau"
14 | /* __COMO_VERSION__ = VRR */
15 | # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
16 | # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
17 |
18 | #elif defined(__INTEL_COMPILER) || defined(__ICC)
19 | # define COMPILER_ID "Intel"
20 | # if defined(_MSC_VER)
21 | # define SIMULATE_ID "MSVC"
22 | # endif
23 | /* __INTEL_COMPILER = VRP */
24 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
25 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
26 | # if defined(__INTEL_COMPILER_UPDATE)
27 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
28 | # else
29 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
30 | # endif
31 | # if defined(__INTEL_COMPILER_BUILD_DATE)
32 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
33 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
34 | # endif
35 | # if defined(_MSC_VER)
36 | /* _MSC_VER = VVRR */
37 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
38 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
39 | # endif
40 |
41 | #elif defined(__PATHCC__)
42 | # define COMPILER_ID "PathScale"
43 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
44 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
45 | # if defined(__PATHCC_PATCHLEVEL__)
46 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
47 | # endif
48 |
49 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
50 | # define COMPILER_ID "Embarcadero"
51 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
52 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
53 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
54 |
55 | #elif defined(__BORLANDC__)
56 | # define COMPILER_ID "Borland"
57 | /* __BORLANDC__ = 0xVRR */
58 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
59 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
60 |
61 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200
62 | # define COMPILER_ID "Watcom"
63 | /* __WATCOMC__ = VVRR */
64 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
65 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
66 | # if (__WATCOMC__ % 10) > 0
67 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
68 | # endif
69 |
70 | #elif defined(__WATCOMC__)
71 | # define COMPILER_ID "OpenWatcom"
72 | /* __WATCOMC__ = VVRP + 1100 */
73 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
74 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
75 | # if (__WATCOMC__ % 10) > 0
76 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
77 | # endif
78 |
79 | #elif defined(__SUNPRO_CC)
80 | # define COMPILER_ID "SunPro"
81 | # if __SUNPRO_CC >= 0x5100
82 | /* __SUNPRO_CC = 0xVRRP */
83 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
84 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
85 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
86 | # else
87 | /* __SUNPRO_CC = 0xVRP */
88 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
89 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
90 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
91 | # endif
92 |
93 | #elif defined(__HP_aCC)
94 | # define COMPILER_ID "HP"
95 | /* __HP_aCC = VVRRPP */
96 | # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
97 | # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
98 | # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
99 |
100 | #elif defined(__DECCXX)
101 | # define COMPILER_ID "Compaq"
102 | /* __DECCXX_VER = VVRRTPPPP */
103 | # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
104 | # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
105 | # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
106 |
107 | #elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
108 | # define COMPILER_ID "zOS"
109 | /* __IBMCPP__ = VRP */
110 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
111 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
112 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
113 |
114 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
115 | # define COMPILER_ID "XL"
116 | /* __IBMCPP__ = VRP */
117 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
118 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
119 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
120 |
121 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
122 | # define COMPILER_ID "VisualAge"
123 | /* __IBMCPP__ = VRP */
124 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
125 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
126 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
127 |
128 | #elif defined(__PGI)
129 | # define COMPILER_ID "PGI"
130 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
131 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
132 | # if defined(__PGIC_PATCHLEVEL__)
133 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
134 | # endif
135 |
136 | #elif defined(_CRAYC)
137 | # define COMPILER_ID "Cray"
138 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
139 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
140 |
141 | #elif defined(__TI_COMPILER_VERSION__)
142 | # define COMPILER_ID "TI"
143 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
144 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
145 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
146 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
147 |
148 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
149 | # define COMPILER_ID "Fujitsu"
150 |
151 | #elif defined(__SCO_VERSION__)
152 | # define COMPILER_ID "SCO"
153 |
154 | #elif defined(__clang__) && defined(__apple_build_version__)
155 | # define COMPILER_ID "AppleClang"
156 | # if defined(_MSC_VER)
157 | # define SIMULATE_ID "MSVC"
158 | # endif
159 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
160 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
161 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
162 | # if defined(_MSC_VER)
163 | /* _MSC_VER = VVRR */
164 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
165 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
166 | # endif
167 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
168 |
169 | #elif defined(__clang__)
170 | # define COMPILER_ID "Clang"
171 | # if defined(_MSC_VER)
172 | # define SIMULATE_ID "MSVC"
173 | # endif
174 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
175 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
176 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
177 | # if defined(_MSC_VER)
178 | /* _MSC_VER = VVRR */
179 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
180 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
181 | # endif
182 |
183 | #elif defined(__GNUC__) || defined(__GNUG__)
184 | # define COMPILER_ID "GNU"
185 | # if defined(__GNUC__)
186 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__)
187 | # else
188 | # define COMPILER_VERSION_MAJOR DEC(__GNUG__)
189 | # endif
190 | # if defined(__GNUC_MINOR__)
191 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
192 | # endif
193 | # if defined(__GNUC_PATCHLEVEL__)
194 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
195 | # endif
196 |
197 | #elif defined(_MSC_VER)
198 | # define COMPILER_ID "MSVC"
199 | /* _MSC_VER = VVRR */
200 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
201 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
202 | # if defined(_MSC_FULL_VER)
203 | # if _MSC_VER >= 1400
204 | /* _MSC_FULL_VER = VVRRPPPPP */
205 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
206 | # else
207 | /* _MSC_FULL_VER = VVRRPPPP */
208 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
209 | # endif
210 | # endif
211 | # if defined(_MSC_BUILD)
212 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
213 | # endif
214 |
215 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
216 | # define COMPILER_ID "ADSP"
217 | #if defined(__VISUALDSPVERSION__)
218 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
219 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
220 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
221 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
222 | #endif
223 |
224 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
225 | # define COMPILER_ID "IAR"
226 | # if defined(__VER__)
227 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
228 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
229 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
230 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
231 | # endif
232 |
233 | #elif defined(__ARMCC_VERSION)
234 | # define COMPILER_ID "ARMCC"
235 | #if __ARMCC_VERSION >= 1000000
236 | /* __ARMCC_VERSION = VRRPPPP */
237 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
238 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
239 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
240 | #else
241 | /* __ARMCC_VERSION = VRPPPP */
242 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
243 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
244 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
245 | #endif
246 |
247 |
248 | #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
249 | # define COMPILER_ID "MIPSpro"
250 | # if defined(_SGI_COMPILER_VERSION)
251 | /* _SGI_COMPILER_VERSION = VRP */
252 | # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
253 | # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
254 | # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10)
255 | # else
256 | /* _COMPILER_VERSION = VRP */
257 | # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
258 | # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
259 | # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10)
260 | # endif
261 |
262 |
263 | /* These compilers are either not known or too old to define an
264 | identification macro. Try to identify the platform and guess that
265 | it is the native compiler. */
266 | #elif defined(__sgi)
267 | # define COMPILER_ID "MIPSpro"
268 |
269 | #elif defined(__hpux) || defined(__hpua)
270 | # define COMPILER_ID "HP"
271 |
272 | #else /* unknown compiler */
273 | # define COMPILER_ID ""
274 | #endif
275 |
276 | /* Construct the string literal in pieces to prevent the source from
277 | getting matched. Store it in a pointer rather than an array
278 | because some compilers will just produce instructions to fill the
279 | array rather than assigning a pointer to a static array. */
280 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
281 | #ifdef SIMULATE_ID
282 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
283 | #endif
284 |
285 | #ifdef __QNXNTO__
286 | char const* qnxnto = "INFO" ":" "qnxnto[]";
287 | #endif
288 |
289 | #if defined(__CRAYXE) || defined(__CRAYXC)
290 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
291 | #endif
292 |
293 | #define STRINGIFY_HELPER(X) #X
294 | #define STRINGIFY(X) STRINGIFY_HELPER(X)
295 |
296 | /* Identify known platforms by name. */
297 | #if defined(__linux) || defined(__linux__) || defined(linux)
298 | # define PLATFORM_ID "Linux"
299 |
300 | #elif defined(__CYGWIN__)
301 | # define PLATFORM_ID "Cygwin"
302 |
303 | #elif defined(__MINGW32__)
304 | # define PLATFORM_ID "MinGW"
305 |
306 | #elif defined(__APPLE__)
307 | # define PLATFORM_ID "Darwin"
308 |
309 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
310 | # define PLATFORM_ID "Windows"
311 |
312 | #elif defined(__FreeBSD__) || defined(__FreeBSD)
313 | # define PLATFORM_ID "FreeBSD"
314 |
315 | #elif defined(__NetBSD__) || defined(__NetBSD)
316 | # define PLATFORM_ID "NetBSD"
317 |
318 | #elif defined(__OpenBSD__) || defined(__OPENBSD)
319 | # define PLATFORM_ID "OpenBSD"
320 |
321 | #elif defined(__sun) || defined(sun)
322 | # define PLATFORM_ID "SunOS"
323 |
324 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
325 | # define PLATFORM_ID "AIX"
326 |
327 | #elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
328 | # define PLATFORM_ID "IRIX"
329 |
330 | #elif defined(__hpux) || defined(__hpux__)
331 | # define PLATFORM_ID "HP-UX"
332 |
333 | #elif defined(__HAIKU__)
334 | # define PLATFORM_ID "Haiku"
335 |
336 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
337 | # define PLATFORM_ID "BeOS"
338 |
339 | #elif defined(__QNX__) || defined(__QNXNTO__)
340 | # define PLATFORM_ID "QNX"
341 |
342 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
343 | # define PLATFORM_ID "Tru64"
344 |
345 | #elif defined(__riscos) || defined(__riscos__)
346 | # define PLATFORM_ID "RISCos"
347 |
348 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
349 | # define PLATFORM_ID "SINIX"
350 |
351 | #elif defined(__UNIX_SV__)
352 | # define PLATFORM_ID "UNIX_SV"
353 |
354 | #elif defined(__bsdos__)
355 | # define PLATFORM_ID "BSDOS"
356 |
357 | #elif defined(_MPRAS) || defined(MPRAS)
358 | # define PLATFORM_ID "MP-RAS"
359 |
360 | #elif defined(__osf) || defined(__osf__)
361 | # define PLATFORM_ID "OSF1"
362 |
363 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
364 | # define PLATFORM_ID "SCO_SV"
365 |
366 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
367 | # define PLATFORM_ID "ULTRIX"
368 |
369 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
370 | # define PLATFORM_ID "Xenix"
371 |
372 | #elif defined(__WATCOMC__)
373 | # if defined(__LINUX__)
374 | # define PLATFORM_ID "Linux"
375 |
376 | # elif defined(__DOS__)
377 | # define PLATFORM_ID "DOS"
378 |
379 | # elif defined(__OS2__)
380 | # define PLATFORM_ID "OS2"
381 |
382 | # elif defined(__WINDOWS__)
383 | # define PLATFORM_ID "Windows3x"
384 |
385 | # else /* unknown platform */
386 | # define PLATFORM_ID
387 | # endif
388 |
389 | #else /* unknown platform */
390 | # define PLATFORM_ID
391 |
392 | #endif
393 |
394 | /* For windows compilers MSVC and Intel we can determine
395 | the architecture of the compiler being used. This is because
396 | the compilers do not have flags that can change the architecture,
397 | but rather depend on which compiler is being used
398 | */
399 | #if defined(_WIN32) && defined(_MSC_VER)
400 | # if defined(_M_IA64)
401 | # define ARCHITECTURE_ID "IA64"
402 |
403 | # elif defined(_M_X64) || defined(_M_AMD64)
404 | # define ARCHITECTURE_ID "x64"
405 |
406 | # elif defined(_M_IX86)
407 | # define ARCHITECTURE_ID "X86"
408 |
409 | # elif defined(_M_ARM64)
410 | # define ARCHITECTURE_ID "ARM64"
411 |
412 | # elif defined(_M_ARM)
413 | # if _M_ARM == 4
414 | # define ARCHITECTURE_ID "ARMV4I"
415 | # elif _M_ARM == 5
416 | # define ARCHITECTURE_ID "ARMV5I"
417 | # else
418 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
419 | # endif
420 |
421 | # elif defined(_M_MIPS)
422 | # define ARCHITECTURE_ID "MIPS"
423 |
424 | # elif defined(_M_SH)
425 | # define ARCHITECTURE_ID "SHx"
426 |
427 | # else /* unknown architecture */
428 | # define ARCHITECTURE_ID ""
429 | # endif
430 |
431 | #elif defined(__WATCOMC__)
432 | # if defined(_M_I86)
433 | # define ARCHITECTURE_ID "I86"
434 |
435 | # elif defined(_M_IX86)
436 | # define ARCHITECTURE_ID "X86"
437 |
438 | # else /* unknown architecture */
439 | # define ARCHITECTURE_ID ""
440 | # endif
441 |
442 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
443 | # if defined(__ICCARM__)
444 | # define ARCHITECTURE_ID "ARM"
445 |
446 | # elif defined(__ICCAVR__)
447 | # define ARCHITECTURE_ID "AVR"
448 |
449 | # else /* unknown architecture */
450 | # define ARCHITECTURE_ID ""
451 | # endif
452 | #else
453 | # define ARCHITECTURE_ID
454 | #endif
455 |
456 | /* Convert integer to decimal digit literals. */
457 | #define DEC(n) \
458 | ('0' + (((n) / 10000000)%10)), \
459 | ('0' + (((n) / 1000000)%10)), \
460 | ('0' + (((n) / 100000)%10)), \
461 | ('0' + (((n) / 10000)%10)), \
462 | ('0' + (((n) / 1000)%10)), \
463 | ('0' + (((n) / 100)%10)), \
464 | ('0' + (((n) / 10)%10)), \
465 | ('0' + ((n) % 10))
466 |
467 | /* Convert integer to hex digit literals. */
468 | #define HEX(n) \
469 | ('0' + ((n)>>28 & 0xF)), \
470 | ('0' + ((n)>>24 & 0xF)), \
471 | ('0' + ((n)>>20 & 0xF)), \
472 | ('0' + ((n)>>16 & 0xF)), \
473 | ('0' + ((n)>>12 & 0xF)), \
474 | ('0' + ((n)>>8 & 0xF)), \
475 | ('0' + ((n)>>4 & 0xF)), \
476 | ('0' + ((n) & 0xF))
477 |
478 | /* Construct a string literal encoding the version number components. */
479 | #ifdef COMPILER_VERSION_MAJOR
480 | char const info_version[] = {
481 | 'I', 'N', 'F', 'O', ':',
482 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
483 | COMPILER_VERSION_MAJOR,
484 | # ifdef COMPILER_VERSION_MINOR
485 | '.', COMPILER_VERSION_MINOR,
486 | # ifdef COMPILER_VERSION_PATCH
487 | '.', COMPILER_VERSION_PATCH,
488 | # ifdef COMPILER_VERSION_TWEAK
489 | '.', COMPILER_VERSION_TWEAK,
490 | # endif
491 | # endif
492 | # endif
493 | ']','\0'};
494 | #endif
495 |
496 | /* Construct a string literal encoding the internal version number. */
497 | #ifdef COMPILER_VERSION_INTERNAL
498 | char const info_version_internal[] = {
499 | 'I', 'N', 'F', 'O', ':',
500 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
501 | 'i','n','t','e','r','n','a','l','[',
502 | COMPILER_VERSION_INTERNAL,']','\0'};
503 | #endif
504 |
505 | /* Construct a string literal encoding the version number components. */
506 | #ifdef SIMULATE_VERSION_MAJOR
507 | char const info_simulate_version[] = {
508 | 'I', 'N', 'F', 'O', ':',
509 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
510 | SIMULATE_VERSION_MAJOR,
511 | # ifdef SIMULATE_VERSION_MINOR
512 | '.', SIMULATE_VERSION_MINOR,
513 | # ifdef SIMULATE_VERSION_PATCH
514 | '.', SIMULATE_VERSION_PATCH,
515 | # ifdef SIMULATE_VERSION_TWEAK
516 | '.', SIMULATE_VERSION_TWEAK,
517 | # endif
518 | # endif
519 | # endif
520 | ']','\0'};
521 | #endif
522 |
523 | /* Construct the string literal in pieces to prevent the source from
524 | getting matched. Store it in a pointer rather than an array
525 | because some compilers will just produce instructions to fill the
526 | array rather than assigning a pointer to a static array. */
527 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
528 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
529 |
530 |
531 |
532 |
533 | #if defined(_MSC_VER) && defined(_MSVC_LANG)
534 | #define CXX_STD _MSVC_LANG
535 | #else
536 | #define CXX_STD __cplusplus
537 | #endif
538 |
539 | const char* info_language_dialect_default = "INFO" ":" "dialect_default["
540 | #if CXX_STD > 201402L
541 | "17"
542 | #elif CXX_STD >= 201402L
543 | "14"
544 | #elif CXX_STD >= 201103L
545 | "11"
546 | #else
547 | "98"
548 | #endif
549 | "]";
550 |
551 | /*--------------------------------------------------------------------------*/
552 |
553 | int main(int argc, char* argv[])
554 | {
555 | int require = 0;
556 | require += info_compiler[argc];
557 | require += info_platform[argc];
558 | #ifdef COMPILER_VERSION_MAJOR
559 | require += info_version[argc];
560 | #endif
561 | #ifdef COMPILER_VERSION_INTERNAL
562 | require += info_version_internal[argc];
563 | #endif
564 | #ifdef SIMULATE_ID
565 | require += info_simulate[argc];
566 | #endif
567 | #ifdef SIMULATE_VERSION_MAJOR
568 | require += info_simulate_version[argc];
569 | #endif
570 | #if defined(__CRAYXE) || defined(__CRAYXC)
571 | require += info_cray[argc];
572 | #endif
573 | require += info_language_dialect_default[argc];
574 | (void)argv;
575 | return require;
576 | }
577 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out
--------------------------------------------------------------------------------
/main/build/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/feature_tests.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/build/CMakeFiles/feature_tests.bin
--------------------------------------------------------------------------------
/main/build/CMakeFiles/feature_tests.c:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "C_FEATURE:"
4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "c_function_prototypes\n"
10 | "C_FEATURE:"
11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "c_restrict\n"
17 | "C_FEATURE:"
18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "c_static_assert\n"
24 | "C_FEATURE:"
25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "c_variadic_macros\n"
31 |
32 | };
33 |
34 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
35 |
--------------------------------------------------------------------------------
/main/build/CMakeFiles/feature_tests.cxx:
--------------------------------------------------------------------------------
1 |
2 | const char features[] = {"\n"
3 | "CXX_FEATURE:"
4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L
5 | "1"
6 | #else
7 | "0"
8 | #endif
9 | "cxx_aggregate_default_initializers\n"
10 | "CXX_FEATURE:"
11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L
12 | "1"
13 | #else
14 | "0"
15 | #endif
16 | "cxx_alias_templates\n"
17 | "CXX_FEATURE:"
18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L
19 | "1"
20 | #else
21 | "0"
22 | #endif
23 | "cxx_alignas\n"
24 | "CXX_FEATURE:"
25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L
26 | "1"
27 | #else
28 | "0"
29 | #endif
30 | "cxx_alignof\n"
31 | "CXX_FEATURE:"
32 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L
33 | "1"
34 | #else
35 | "0"
36 | #endif
37 | "cxx_attributes\n"
38 | "CXX_FEATURE:"
39 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
40 | "1"
41 | #else
42 | "0"
43 | #endif
44 | "cxx_attribute_deprecated\n"
45 | "CXX_FEATURE:"
46 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
47 | "1"
48 | #else
49 | "0"
50 | #endif
51 | "cxx_auto_type\n"
52 | "CXX_FEATURE:"
53 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
54 | "1"
55 | #else
56 | "0"
57 | #endif
58 | "cxx_binary_literals\n"
59 | "CXX_FEATURE:"
60 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
61 | "1"
62 | #else
63 | "0"
64 | #endif
65 | "cxx_constexpr\n"
66 | "CXX_FEATURE:"
67 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
68 | "1"
69 | #else
70 | "0"
71 | #endif
72 | "cxx_contextual_conversions\n"
73 | "CXX_FEATURE:"
74 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
75 | "1"
76 | #else
77 | "0"
78 | #endif
79 | "cxx_decltype\n"
80 | "CXX_FEATURE:"
81 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
82 | "1"
83 | #else
84 | "0"
85 | #endif
86 | "cxx_decltype_auto\n"
87 | "CXX_FEATURE:"
88 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L
89 | "1"
90 | #else
91 | "0"
92 | #endif
93 | "cxx_decltype_incomplete_return_types\n"
94 | "CXX_FEATURE:"
95 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
96 | "1"
97 | #else
98 | "0"
99 | #endif
100 | "cxx_default_function_template_args\n"
101 | "CXX_FEATURE:"
102 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
103 | "1"
104 | #else
105 | "0"
106 | #endif
107 | "cxx_defaulted_functions\n"
108 | "CXX_FEATURE:"
109 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
110 | "1"
111 | #else
112 | "0"
113 | #endif
114 | "cxx_defaulted_move_initializers\n"
115 | "CXX_FEATURE:"
116 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L
117 | "1"
118 | #else
119 | "0"
120 | #endif
121 | "cxx_delegating_constructors\n"
122 | "CXX_FEATURE:"
123 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
124 | "1"
125 | #else
126 | "0"
127 | #endif
128 | "cxx_deleted_functions\n"
129 | "CXX_FEATURE:"
130 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
131 | "1"
132 | #else
133 | "0"
134 | #endif
135 | "cxx_digit_separators\n"
136 | "CXX_FEATURE:"
137 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
138 | "1"
139 | #else
140 | "0"
141 | #endif
142 | "cxx_enum_forward_declarations\n"
143 | "CXX_FEATURE:"
144 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
145 | "1"
146 | #else
147 | "0"
148 | #endif
149 | "cxx_explicit_conversions\n"
150 | "CXX_FEATURE:"
151 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L
152 | "1"
153 | #else
154 | "0"
155 | #endif
156 | "cxx_extended_friend_declarations\n"
157 | "CXX_FEATURE:"
158 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
159 | "1"
160 | #else
161 | "0"
162 | #endif
163 | "cxx_extern_templates\n"
164 | "CXX_FEATURE:"
165 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L
166 | "1"
167 | #else
168 | "0"
169 | #endif
170 | "cxx_final\n"
171 | "CXX_FEATURE:"
172 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
173 | "1"
174 | #else
175 | "0"
176 | #endif
177 | "cxx_func_identifier\n"
178 | "CXX_FEATURE:"
179 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
180 | "1"
181 | #else
182 | "0"
183 | #endif
184 | "cxx_generalized_initializers\n"
185 | "CXX_FEATURE:"
186 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
187 | "1"
188 | #else
189 | "0"
190 | #endif
191 | "cxx_generic_lambdas\n"
192 | "CXX_FEATURE:"
193 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L
194 | "1"
195 | #else
196 | "0"
197 | #endif
198 | "cxx_inheriting_constructors\n"
199 | "CXX_FEATURE:"
200 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
201 | "1"
202 | #else
203 | "0"
204 | #endif
205 | "cxx_inline_namespaces\n"
206 | "CXX_FEATURE:"
207 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
208 | "1"
209 | #else
210 | "0"
211 | #endif
212 | "cxx_lambdas\n"
213 | "CXX_FEATURE:"
214 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
215 | "1"
216 | #else
217 | "0"
218 | #endif
219 | "cxx_lambda_init_captures\n"
220 | "CXX_FEATURE:"
221 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
222 | "1"
223 | #else
224 | "0"
225 | #endif
226 | "cxx_local_type_template_args\n"
227 | "CXX_FEATURE:"
228 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
229 | "1"
230 | #else
231 | "0"
232 | #endif
233 | "cxx_long_long_type\n"
234 | "CXX_FEATURE:"
235 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
236 | "1"
237 | #else
238 | "0"
239 | #endif
240 | "cxx_noexcept\n"
241 | "CXX_FEATURE:"
242 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L
243 | "1"
244 | #else
245 | "0"
246 | #endif
247 | "cxx_nonstatic_member_init\n"
248 | "CXX_FEATURE:"
249 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
250 | "1"
251 | #else
252 | "0"
253 | #endif
254 | "cxx_nullptr\n"
255 | "CXX_FEATURE:"
256 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L
257 | "1"
258 | #else
259 | "0"
260 | #endif
261 | "cxx_override\n"
262 | "CXX_FEATURE:"
263 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
264 | "1"
265 | #else
266 | "0"
267 | #endif
268 | "cxx_range_for\n"
269 | "CXX_FEATURE:"
270 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
271 | "1"
272 | #else
273 | "0"
274 | #endif
275 | "cxx_raw_string_literals\n"
276 | "CXX_FEATURE:"
277 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L
278 | "1"
279 | #else
280 | "0"
281 | #endif
282 | "cxx_reference_qualified_functions\n"
283 | "CXX_FEATURE:"
284 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L
285 | "1"
286 | #else
287 | "0"
288 | #endif
289 | "cxx_relaxed_constexpr\n"
290 | "CXX_FEATURE:"
291 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L
292 | "1"
293 | #else
294 | "0"
295 | #endif
296 | "cxx_return_type_deduction\n"
297 | "CXX_FEATURE:"
298 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
299 | "1"
300 | #else
301 | "0"
302 | #endif
303 | "cxx_right_angle_brackets\n"
304 | "CXX_FEATURE:"
305 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
306 | "1"
307 | #else
308 | "0"
309 | #endif
310 | "cxx_rvalue_references\n"
311 | "CXX_FEATURE:"
312 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
313 | "1"
314 | #else
315 | "0"
316 | #endif
317 | "cxx_sizeof_member\n"
318 | "CXX_FEATURE:"
319 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
320 | "1"
321 | #else
322 | "0"
323 | #endif
324 | "cxx_static_assert\n"
325 | "CXX_FEATURE:"
326 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
327 | "1"
328 | #else
329 | "0"
330 | #endif
331 | "cxx_strong_enums\n"
332 | "CXX_FEATURE:"
333 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus
334 | "1"
335 | #else
336 | "0"
337 | #endif
338 | "cxx_template_template_parameters\n"
339 | "CXX_FEATURE:"
340 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L
341 | "1"
342 | #else
343 | "0"
344 | #endif
345 | "cxx_thread_local\n"
346 | "CXX_FEATURE:"
347 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
348 | "1"
349 | #else
350 | "0"
351 | #endif
352 | "cxx_trailing_return_types\n"
353 | "CXX_FEATURE:"
354 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
355 | "1"
356 | #else
357 | "0"
358 | #endif
359 | "cxx_unicode_literals\n"
360 | "CXX_FEATURE:"
361 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
362 | "1"
363 | #else
364 | "0"
365 | #endif
366 | "cxx_uniform_initialization\n"
367 | "CXX_FEATURE:"
368 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
369 | "1"
370 | #else
371 | "0"
372 | #endif
373 | "cxx_unrestricted_unions\n"
374 | "CXX_FEATURE:"
375 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L
376 | "1"
377 | #else
378 | "0"
379 | #endif
380 | "cxx_user_literals\n"
381 | "CXX_FEATURE:"
382 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L
383 | "1"
384 | #else
385 | "0"
386 | #endif
387 | "cxx_variable_templates\n"
388 | "CXX_FEATURE:"
389 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
390 | "1"
391 | #else
392 | "0"
393 | #endif
394 | "cxx_variadic_macros\n"
395 | "CXX_FEATURE:"
396 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))
397 | "1"
398 | #else
399 | "0"
400 | #endif
401 | "cxx_variadic_templates\n"
402 |
403 | };
404 |
405 | int main(int argc, char** argv) { (void)argv; return features[argc]; }
406 |
--------------------------------------------------------------------------------
/main/component.mk:
--------------------------------------------------------------------------------
1 | #
2 | # "main" pseudo-component makefile.
3 | #
4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
5 |
6 |
--------------------------------------------------------------------------------
/main/igate/digipeat.c:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #include "esp_system.h"
23 | #include
24 | #include
25 | #include
26 |
27 | #include "freertos/FreeRTOS.h"
28 | //#include "freertos/task.h"
29 | //#include "freertos/queue.h"
30 | //#include "freertos/semphr.h"
31 |
32 | #include "igate/igate.h"
33 | #include "igate/tnc2.h"
34 | #include "igate/digipeat.h"
35 |
36 | /*
37 | *
38 | */
39 | void
40 | digipeat(tnc2buf_t *tb)
41 | {
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/main/igate/digipeat.h:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #ifndef DIGIPEAT_H_
23 | #define DIGIPEAT_H_
24 |
25 | #include "kbuf.h"
26 |
27 | void digipeat(tnc2buf_t *);
28 |
29 | #endif /* DIGIPEAT_H_ */
30 |
--------------------------------------------------------------------------------
/main/igate/igate.c:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #include "esp_system.h"
23 | #include
24 | #include
25 | #include
26 |
27 | #include "sys/queue.h"
28 |
29 | #include "freertos/FreeRTOS.h"
30 | #include "freertos/task.h"
31 | #include "freertos/queue.h"
32 | #include "freertos/semphr.h"
33 |
34 | #include "lwip/err.h"
35 | #include "lwip/sockets.h"
36 | #include "lwip/sys.h"
37 | #include "lwip/dns.h"
38 | #include "lwip/inet.h"
39 | #include "lwip/ip4_addr.h"
40 |
41 | #include "igate/igate.h"
42 | #include "igate/tnc2.h"
43 | #include "igate/digipeat.h"
44 | #include "axmodem.h"
45 |
46 | // void igate_from_aprsis(const char *ax25, int ax25len);
47 |
48 | /*
49 | * iGate Configuration
50 | */
51 |
52 | const uint8_t *myCallsign = (uint8_t *) "K6JQ";
53 |
54 | /*
55 | * Filter prohibited path elements
56 | */
57 | static char *prohibitedDigiToIS[] = {
58 | "TCPXX",
59 | "TCPIP",
60 | "NOGATE",
61 | "RFONLY",
62 | "OPNTRK",
63 | "OPNTRC"
64 | };
65 |
66 | #define NUM_PROHIBITED_DIGIS_TO_IS \
67 | (sizeof (prohibitedDigiToIS) / sizeof (prohibitedDigiToIS[0]))
68 |
69 | static char *prohibitedDigiToRF[] = {
70 | "TCPXX",
71 | "NOGATE",
72 | "OPNTRK",
73 | "OPNTRC"
74 | };
75 |
76 | #define NUM_PROHIBITED_DIGIS_TO_RF \
77 | (sizeof (prohibitedDigiToRF) / sizeof (prohibitedDigiToRF[0]))
78 |
79 |
80 | /*
81 | *
82 | */
83 | LIST_HEAD(heardCacheHead, heard_cache_entry) heardCache;
84 | struct heardCacheHead *heardCachep;
85 |
86 | static bool
87 | iGateToISPathFilter(tnc2buf_t *tb)
88 | {
89 |
90 | for (int i = 0; i < tb->digiCount; i++) {
91 | for (int j = 0; j < NUM_PROHIBITED_DIGIS_TO_IS; j++) {
92 | if (strcmp((char *)tb->digis[i], prohibitedDigiToIS[j]) == 0) {
93 | return (true);
94 | }
95 | }
96 | }
97 |
98 | return (false);
99 | }
100 |
101 | static bool
102 | iGateToRFPathFilter(tnc2buf_t *tb)
103 | {
104 |
105 | for (int i = 0; i < tb->digiCount; i++) {
106 | for (int j = 0; j < NUM_PROHIBITED_DIGIS_TO_RF; j++) {
107 | if (strcmp((char *)tb->digis[i], prohibitedDigiToRF[j]) == 0) {
108 | return (true);
109 | }
110 | }
111 | }
112 |
113 | return (false);
114 | }
115 |
116 | /*
117 | *
118 | */
119 | static bool
120 | isWide(uint8_t *addr, size_t len)
121 | {
122 |
123 | /* check first for any form of WIDE */
124 | if (strncmp((char *) addr, "WIDE", 4) != 0) {
125 | /* not wide */
126 | return (false);
127 | }
128 |
129 | /* return true if exactly WIDE */
130 | if (len == 4) {
131 | return (true);
132 | }
133 |
134 | /* return true if WIDEn or WIDEn-N */
135 | if (len >= 5 && addr[4] >= '0' && addr[4] <= '9') {
136 | if ((len == 5) || (len > 5 && addr[5] == '-')) {
137 | return (true);
138 | }
139 | }
140 |
141 | printf("allow WIDE: %s %u\n", addr, len);
142 | /* not a dis-allowed form of WIDE */
143 | return (false);
144 | }
145 |
146 | /*
147 | * Update heard list from received packet header
148 | *
149 | * Passes entire frame so the cache can do what it wants
150 | * with the entire path, though the cache right now
151 | * only remembers the directly-heard stations
152 | *
153 | * Does not modify the parameter
154 | *
155 | */
156 | static void
157 | iGateHeardRf(tnc2buf_t *tb)
158 | {
159 | heard_cache_t *hp;
160 | bool found;
161 | TickType_t timeStamp;
162 | int heardDigi;
163 | size_t addrLen;
164 | uint8_t *addrPtr;
165 |
166 | /*
167 | * Get timestamp first up
168 | */
169 | timeStamp = xTaskGetTickCount();
170 |
171 | /*
172 | * Determine if a digi was heard
173 | */
174 | heardDigi = -1;
175 | for (int i = 0; i < tb->digiCount; i++) {
176 | if (strchr((char *)tb->digis[i], '*') != NULL) {
177 | heardDigi = i;
178 | } else {
179 | break;
180 | }
181 | }
182 |
183 | if (heardDigi >= 0) {
184 | /* use the digi, strip off the trailing '*' */
185 | addrPtr = tb->digis[heardDigi];
186 | addrLen = strlen((char *) addrPtr) - 1;
187 | } else {
188 | addrPtr = tb->srcAddr;
189 | addrLen = strlen((char *) addrPtr);
190 | }
191 |
192 | assert(addrLen <= MAX_TNC2_ADDR_LEN);
193 |
194 | // printf("RF heard: %u %.*s\n", timeStamp, addrLen, addrPtr);
195 |
196 | /* filter out aliases etc. */
197 | /* RELAY, ECHO, WIDE, WIDEn-N, TRACE, GATE */
198 | if ((strncmp((char *) addrPtr, "RELAY", addrLen) == 0) ||
199 | (strncmp((char *) addrPtr, "ECHO", addrLen) == 0) ||
200 | (strncmp((char *) addrPtr, "TRACE", addrLen) == 0) ||
201 | (strncmp((char *) addrPtr, "GATE", addrLen) == 0) ||
202 | isWide(addrPtr, addrLen) ) {
203 | // printf("Not HEARD: %s\n", addrPtr);
204 | return;
205 | /* don't record */
206 | }
207 |
208 | /*
209 | * Scan the heardCache, timing-out entries also
210 | */
211 | found = false;
212 | for (hp = heardCache.lh_first; hp != NULL; hp = hp->entries.le_next) {
213 | /* if entry found, update timeStamp */
214 | if (strncmp((char *) hp->addr, (char *) addrPtr, addrLen) == 0) {
215 | hp->timeStamp = timeStamp;
216 | printf("cache: found %s\n", hp->addr);
217 | found = true;
218 | continue;
219 | }
220 |
221 | /* do expiration processing */
222 | if (timeStamp - hp->timeStamp > HEARD_CACHE_LIFETIME) {
223 | printf("cache: removed %s\n", hp->addr);
224 | LIST_REMOVE(hp, entries);
225 | free(hp);
226 | }
227 | }
228 |
229 | /*
230 | * If entry not in the list, add it
231 | */
232 | if (!found) {
233 | hp = malloc(sizeof (heard_cache_t));
234 | if (hp == NULL) {
235 | puts("ERROR: failed to allocate heard_cache_t");
236 | return;
237 | }
238 | hp->timeStamp = timeStamp;
239 | strncpy((char *) hp->addr, (char *) addrPtr, addrLen);
240 | hp->addr[addrLen] = '\0';
241 | printf("cache: added %s\n", hp->addr);
242 | LIST_INSERT_HEAD(&heardCache, hp, entries);
243 | }
244 | }
245 |
246 | /*
247 | * Process an APRS 'Message', possible RF-gating it
248 | */
249 | static void
250 | iGateProcessMessage(tnc2buf_t *tb)
251 | {
252 | uint8_t *toCall, *tp0;
253 | int callLen;
254 |
255 | #if 1
256 | printf("iGateToRF: %s>%s", tb->srcAddr, tb->destAddr);
257 | if (tb->digiPath) {
258 | printf(",%s", tb->digiPath);
259 | }
260 | printf(":%.*s\n", tb->msgLen, tb->msg);
261 | #endif
262 |
263 | /* validate Message packet */
264 | if (tb->msgLen < 11 || tb->msg[10] != ':') {
265 | puts("invalid message");
266 | /* invalid Message header */
267 | return;
268 | }
269 |
270 | /* find destination call */
271 | tp0 = (uint8_t *) strpbrk((char *) tb->msg + 1, " :");
272 | if (((callLen = tp0 ? tp0 - tb->msg - 1 : -1) < 0) ||
273 | (callLen > 9) || ((toCall = malloc(callLen + 1)) == NULL)) {
274 | /* XXX: improved logging */
275 | return;
276 | }
277 | strlcpy((char *) toCall, (char *) tb->msg + 1, callLen + 1);
278 |
279 | printf("fromCall: %s toCall: %s\n", tb->srcAddr, toCall);
280 |
281 | /*
282 | * Simple Tx IGate
283 | * Transmit Messages to BLN*, NWS-*, containing telemetry params
284 | * Transmit Messages to toCall heard recently
285 | */
286 |
287 | /* XXX: test for parameter messages, bulletins, NWS */
288 | //strncmp((char *) tb->msg[11], ""
289 | }
290 |
291 | /*
292 | * iGateToRF
293 | */
294 | static void
295 | iGateToRF(uint8_t *text, size_t textlen)
296 | {
297 | tnc2buf_t *tb;
298 |
299 | if (textlen == 0) {
300 | // zero-length line, ignore
301 | return;
302 | }
303 |
304 | if (text[0] == '#') {
305 | // XXX: comment, heartbeat, some other IS thing
306 | // XXX: improve processing here
307 | printf("IS: %.*s\n", textlen, text);
308 | return;
309 | }
310 |
311 | /*
312 | * Parse text into tnc2buf_t
313 | */
314 | if ((tb = textToTNC2(text, textlen)) == NULL) {
315 | /* invalid text string */
316 | // XXX: improve logging
317 | return;
318 | }
319 |
320 | /*
321 | * basic sanity test of frame
322 | */
323 | if (strlen((char *)tb->srcAddr) == 0 ||
324 | strlen((char *)tb->destAddr) == 0 ||
325 | strlen((char *)tb->digiPath) == 0 ||
326 | tb->msgLen == 0) {
327 | freeTNC2Buf(tb);
328 | return;
329 | }
330 |
331 | /*
332 | * XXX: filter out frames that we won't transmit here
333 | */
334 |
335 | /*
336 | * Filter out 'general' queries
337 | * XXX: answer them?
338 | */
339 | if ((strcmp((char *)tb->msg, "?ARPS?") == 0) ||
340 | (strcmp((char *)tb->msg, "?IGATE") == 0) ||
341 | (strcmp((char *)tb->msg, "?WX?") == 0)) {
342 | printf("iGateToIS: general query: %.*s\n", tb->msgLen, tb->msg);
343 | freeTNC2Buf(tb);
344 | return;
345 | }
346 |
347 | /*
348 | * Skip all non-message packets
349 | */
350 | if (tb->msg[0] != ':') {
351 | freeTNC2Buf(tb);
352 | return;
353 | }
354 |
355 | #if 0
356 | /*
357 | * Extract 'to' callsign from 'Message' message
358 | */
359 | #if 1
360 | // XXX: replace all of this with iGateProcessMessage() later
361 | // XXX:
362 | if (1 || tb->msg[0] == ':') {
363 | uint8_t *newText;
364 | size_t newLen;
365 |
366 | newText = tnc2ToText(tb, &newLen);
367 | if (newText == NULL) {
368 | puts("!!!!!!!!!!!!!!!!!!!!! tnc2ToText failed!");
369 | } else {
370 | // printf("YY: %.*s\n", len, text);
371 | if (memcmp(text, newText, newLen) != 0) {
372 | puts("@@@@@@@@@@@@@@@@@@@@@@@ re-write of frame failed");
373 | }
374 | // XXX: send re-written frame
375 | free(newText);
376 | }
377 | }
378 | freeTNC2Buf(tb);
379 | return;
380 | #endif
381 | #endif
382 |
383 | /*
384 | * test for prohibited path elements
385 | */
386 | if (iGateToRFPathFilter(tb)) {
387 | puts("iGateToRF: prohibited digi");
388 | freeTNC2Buf(tb);
389 | return;
390 | }
391 |
392 | /*
393 | * OK to iGate now
394 | */
395 | iGateProcessMessage(tb);
396 | freeTNC2Buf(tb);
397 | }
398 |
399 | /*
400 | * iGate tasks
401 | *
402 | * Down-stream iGate task maintains connection to iGate, the associated socket
403 | * and collects in-bound messages.
404 | *
405 | * Up-stream iGate task sends out-bound messages when the iGate socket is valid,
406 | * and quietly discards them otherwise
407 | *
408 | */
409 |
410 | static TaskHandle_t iGateInTaskHandle;
411 | static TaskHandle_t iGateOutTaskHandle;
412 | static QueueHandle_t isOutQueue;
413 |
414 | /*
415 | * iGate host socket
416 | */
417 | static int iGateSocket = -1;
418 | static SemaphoreHandle_t iGateSocketMutex;
419 | static ip_addr_t iGateAddr;
420 | static const char *iGateName = "noam.aprs2.net";
421 | static enum { DNS_WAIT, DNS_FOUND, DNS_NOTFOUND } dnsStatus;
422 | static bool iGateOK;
423 |
424 | /*
425 | * get/set iGate Host Socket under a mutex
426 | */
427 | static int
428 | getiGateSocket()
429 | {
430 | int socket;
431 |
432 | xSemaphoreTake(iGateSocketMutex, portMAX_DELAY);
433 | socket = iGateSocket;
434 | xSemaphoreGive(iGateSocketMutex);
435 | return (socket);
436 | }
437 |
438 | static void
439 | setiGateSocket(int socket)
440 | {
441 |
442 | xSemaphoreTake(iGateSocketMutex, portMAX_DELAY);
443 | iGateSocket = socket;
444 | xSemaphoreGive(iGateSocketMutex);
445 | }
446 |
447 | static void
448 | dns_found_cb(const char *name, const ip_addr_t *ipaddr, void *callback_arg)
449 | {
450 | // XXX: do I need to copy this?
451 | if (ipaddr != NULL) {
452 | iGateAddr = *ipaddr;
453 | dnsStatus = DNS_FOUND;
454 | } else {
455 | dnsStatus = DNS_NOTFOUND;
456 | }
457 | }
458 |
459 | static int
460 | igateReadLine(uint8_t *buf, size_t blen)
461 | {
462 | uint8_t b;
463 | int c;
464 |
465 | c = 0;
466 | while (recv(getiGateSocket(), &b, 1, 0) > 0) {
467 | if (b == '\r') {
468 | // ignore
469 | } else if (b == '\n') {
470 | *buf++ = '\0';
471 | return (c);
472 | } else {
473 | *buf++ = b;
474 | c++;
475 | }
476 | }
477 |
478 | // socket error?
479 | return (-1);
480 | }
481 |
482 | /*
483 | * Maintain connection to iGate host, collect and process messages
484 | */
485 | static void
486 | iGateInTask(void *arg)
487 | {
488 | err_t err;
489 |
490 | while (true) {
491 | /*
492 | * Initiate DNS resolution of server hostname
493 | */
494 | // IP_ADDR4( &iGateAddr, 0,0,0,0 );
495 | ip_addr_set_zero(&iGateAddr);
496 | dnsStatus = DNS_WAIT;
497 | err = dns_gethostbyname(iGateName, &iGateAddr, dns_found_cb, NULL );
498 | if (err == ERR_VAL) {
499 | /* network isn't up yet; sleep a bit and re-try */
500 | vTaskDelay(100 / portTICK_PERIOD_MS);
501 | continue;
502 | } else if (err == ERR_INPROGRESS) {
503 | /* lazy-spin waiting for the callback */
504 | /* XXX: this could timeout, right? */
505 | while (dnsStatus == DNS_WAIT) {
506 | vTaskDelay(20 / portTICK_PERIOD_MS);
507 | }
508 | }
509 |
510 | /*
511 | * Validate DNS found the hostname
512 | */
513 | if (dnsStatus == DNS_NOTFOUND) {
514 | printf("DNS resolution for %s failed\n", iGateName);
515 | vTaskDelay(10000 / portTICK_PERIOD_MS);
516 | continue;
517 | }
518 |
519 | /*
520 | * Connect to server
521 | */
522 | struct sockaddr_in serverAddr;
523 | int serverSocket;
524 | int cnt;
525 | static uint8_t rBuff[520];
526 |
527 |
528 | // XXX: there *must* be a better way to make this assignment
529 | serverAddr.sin_addr.s_addr = ip_2_ip4(&iGateAddr)->addr;
530 | serverAddr.sin_family = AF_INET;
531 | serverAddr.sin_port = htons(14580);
532 |
533 | serverSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
534 | if (serverSocket < 0) {
535 | vTaskDelay(1000 / portTICK_PERIOD_MS);
536 | continue;
537 | }
538 |
539 | err = connect(serverSocket, (struct sockaddr *)&serverAddr, sizeof(serverAddr));
540 | if (err < 0) {
541 | // XXX: error
542 | close(serverSocket);
543 | vTaskDelay(1000 / portTICK_PERIOD_MS);
544 | continue;
545 | }
546 |
547 | setiGateSocket(serverSocket);
548 |
549 | // wait for the login "prompt"
550 | cnt = igateReadLine((uint8_t *) rBuff, sizeof (rBuff));
551 | if (cnt < 0) {
552 | // XXX: error; close socket, retry
553 | // XXX: log this
554 | setiGateSocket(-1);
555 | close(serverSocket);
556 | iGateOK = false;
557 | vTaskDelay(10000 / portTICK_PERIOD_MS);
558 | continue;
559 | }
560 |
561 | /*
562 | * Login to APRS-IS
563 | * XXX: make this configurable
564 | */
565 | char *login = "user XXXX pass XXXX vers k6jq-test v0.1 filter m/200 b/ECHO\r\n";
566 | // XXX: check error return
567 | // XXX: odds are the read() will fail anyway in this case
568 | send(getiGateSocket(), login, strlen(login), 0);
569 | // is it necessary to wait here?
570 | // vTaskDelay(7000 / portTICK_PERIOD_MS);
571 |
572 | iGateOK = true;
573 |
574 | do {
575 | cnt = igateReadLine((uint8_t *) rBuff, sizeof (rBuff));
576 | if (cnt > 0) {
577 | //printf("IS: %.*s\n", cnt, rBuff);
578 | iGateToRF(rBuff, cnt);
579 | }
580 | } while (cnt > 0);
581 |
582 | // XXX: improved log message
583 | setiGateSocket(-1);
584 | close(serverSocket);
585 | iGateOK = false;
586 |
587 | vTaskDelay(10000 / portTICK_PERIOD_MS);
588 | }
589 | }
590 |
591 | /*
592 | * Outbound IS frames are handled by this tasks to make sure they are
593 | * serialized.
594 | */
595 | static void
596 | iGateOutTask(void *arg)
597 | {
598 |
599 | while (true) {
600 | tnc2buf_t *tb;
601 |
602 | /* assume valid return */
603 | (void)xQueueReceive(isOutQueue, &tb, portMAX_DELAY);
604 |
605 | if (!iGateOK) {
606 | freeTNC2Buf(tb);
607 | return;
608 | }
609 |
610 | /* avoid a temporary buffer here; let LwIP do it */
611 | send(getiGateSocket(), tb->srcAddr, strlen((char *) tb->srcAddr), 0);
612 | send(getiGateSocket(), ">", 1, 0);
613 | send(getiGateSocket(), tb->destAddr, strlen((char *) tb->destAddr), 0);
614 | if (tb->digiPath) {
615 | send(getiGateSocket(), ",", 1, 0);
616 | send(getiGateSocket(), tb->digiPath, strlen((char *) tb->digiPath), 0);
617 | }
618 | send(getiGateSocket(), ",qAR,", 5, 0);
619 | send(getiGateSocket(), myCallsign, strlen((char *) myCallsign), 0);
620 | send(getiGateSocket(), ":", 1, 0);
621 | send(getiGateSocket(), tb->msg, tb->msgLen, 0);
622 | send(getiGateSocket(), "\r\n", 2, 0);
623 |
624 | freeTNC2Buf(tb);
625 | }
626 | }
627 |
628 | /*
629 | *
630 | */
631 | void
632 | iGateToIS(kbuf_t *kb)
633 | {
634 | tnc2buf_t *tb;
635 |
636 | /*
637 | * get a TNC2 buffer
638 | */
639 | if ((tb = ax25ToTNC2(kb)) == NULL) {
640 | /* XXX: metric? */
641 | return;
642 | }
643 |
644 | /* Update RF-heard table */
645 | iGateHeardRf(tb);
646 |
647 | /* digipeat */
648 | digipeat(tb);
649 |
650 | retry:
651 | /* discard zero-length messages */
652 | if (tb->msgLen == 0) {
653 | /* XXX: metric? */
654 | // puts("iGateToIS: zero-length message");
655 | freeTNC2Buf(tb);
656 | return;
657 | }
658 |
659 | /* XXX: path elements */
660 | if (iGateToISPathFilter(tb)) {
661 | // XXX: metric
662 | // puts("iGateToIS: prohibited path");
663 | freeTNC2Buf(tb);
664 | return;
665 | }
666 |
667 | /* third-party; strip header and retry */
668 | if (tb->msg[0] == '}') {
669 | tnc2buf_t *tb2;
670 |
671 | tb2 = textToTNC2(tb->msg + 1, tb->msgLen - 1);
672 | freeTNC2Buf(tb);
673 | if (tb2 == NULL) {
674 | return;
675 | }
676 | tb = tb2;
677 | goto retry;
678 | }
679 |
680 | /*
681 | * Filter out 'general' queries
682 | * XXX: possibly answer them?
683 | */
684 | if ((strcmp((char *)tb->msg, "?ARPS?") == 0) ||
685 | (strcmp((char *)tb->msg, "?IGATE") == 0) ||
686 | (strcmp((char *)tb->msg, "?WX?") == 0)) {
687 | puts("iGateToIS: general query");
688 | freeTNC2Buf(tb);
689 | return;
690 | }
691 |
692 | /*
693 | * Filter out our own callsign
694 | */
695 | if (strcmp((char *)tb->srcAddr, (char *)myCallsign) == 0) {
696 | // puts("iGateToIS: own callsign");
697 | freeTNC2Buf(tb);
698 | return;
699 | }
700 |
701 | /*
702 | * OK to iGate now
703 | */
704 | #if 0
705 | /* avoid a temporary buffer here; let LwIP do it */
706 | send(getiGateSocket(), tb->srcAddr, strlen((char *) tb->srcAddr), 0);
707 | send(getiGateSocket(), ">", 1, 0);
708 | send(getiGateSocket(), tb->destAddr, strlen((char *) tb->destAddr), 0);
709 | if (tb->digiPath) {
710 | send(getiGateSocket(), ",", 1, 0);
711 | send(getiGateSocket(), tb->digiPath, strlen((char *) tb->digiPath), 0);
712 | }
713 | send(getiGateSocket(), ",qAR,", 5, 0);
714 | send(getiGateSocket(), myCallsign, strlen((char *) myCallsign), 0);
715 | send(getiGateSocket(), ":", 1, 0);
716 | send(getiGateSocket(), tb->msg, tb->msgLen, 0);
717 | send(getiGateSocket(), "\r\n", 2, 0);
718 |
719 | freeTNC2Buf(tb);
720 | #endif
721 |
722 | /* send frame to outbound IS queue */
723 | if (xQueueSend(isOutQueue, &tb, 0) != pdPASS) {
724 | // XXX: metrics
725 | freeTNC2Buf(tb);
726 | puts("iGateToIS: queue full");
727 | }
728 | }
729 |
730 | /*
731 | * igate start -- make TX-igate allocations and inits
732 | */
733 | void
734 | igate_start()
735 | {
736 | BaseType_t err;
737 |
738 | // Always relay all traffic from RF to APRSIS, other
739 | // direction is handled per transmitter interface...
740 | // enable_aprsis_rx_dupecheck();
741 |
742 | LIST_INIT(&heardCache);
743 | iGateSocketMutex = xSemaphoreCreateMutex();
744 | isOutQueue = xQueueCreate(10, sizeof (tnc2buf_t *));
745 |
746 |
747 | /*
748 | * iGate in-bound task
749 | */
750 | err = xTaskCreate(iGateInTask, "iGate-in",
751 | ESP_TASK_MAIN_STACK,
752 | ( void * ) 1,
753 | ESP_TASK_PRIO_MAX - 2,
754 | &iGateInTaskHandle);
755 |
756 | /*
757 | * iGate out-bound task
758 | */
759 | err = xTaskCreate(iGateOutTask, "iGate-out",
760 | ESP_TASK_MAIN_STACK,
761 | ( void * ) 1,
762 | ESP_TASK_PRIO_MAX - 2,
763 | &iGateOutTaskHandle);
764 | }
765 |
766 | /*
767 | *
768 | */
769 | void
770 | igateStart()
771 | {
772 | // XXX:
773 | igate_start();
774 | }
775 |
776 |
--------------------------------------------------------------------------------
/main/igate/igate.h:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #ifndef _IGATE_H_
23 | #define _IGATE_H_
24 |
25 | #include "sys/queue.h"
26 | #include "igate/tnc2.h"
27 | #include "kbuf.h"
28 |
29 | #define HEARD_CACHE_LIFETIME ((15 * 60000UL) / portTICK_PERIOD_MS)
30 |
31 |
32 | typedef struct heard_cache_entry {
33 | TickType_t timeStamp;
34 | uint8_t addr[MAX_TNC2_ADDR_LEN];
35 | LIST_ENTRY(heard_cache_entry) entries;
36 | } heard_cache_t;
37 |
38 | void iGateToIS(kbuf_t *);
39 | void igateStart(void);
40 |
41 | #endif /* _IGATE_H_ */
42 |
--------------------------------------------------------------------------------
/main/igate/tnc2.c:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #include "esp_system.h"
23 | #include
24 | // #include
25 | #include
26 |
27 | // #include "igate/igate.h"
28 | #include "kbuf.h"
29 | #include "igate/tnc2.h"
30 |
31 | /*
32 | *
33 | */
34 | typedef enum {
35 | AxAddrMore,
36 | AxAddrLast,
37 | AxAddrError
38 | } AxAddrVal;
39 |
40 | /*
41 | *
42 | */
43 | void freeTNC2Buf(tnc2buf_t *tb)
44 | {
45 |
46 | if (!tb) {
47 | return;
48 | }
49 |
50 | if (tb->destAddr) {
51 | free(tb->destAddr);
52 | }
53 |
54 | if (tb->srcAddr) {
55 | free(tb->srcAddr);
56 | }
57 |
58 | for (int i = 0; i < MAX_TNC2_DIGIS; i++) {
59 | if (tb->digis[i])
60 | free(tb->digis[i]);
61 | }
62 |
63 | if (tb->digiPath) {
64 | free(tb->digiPath);
65 | }
66 |
67 | if (tb->msg) {
68 | free(tb->msg);
69 | }
70 |
71 | free(tb);
72 | }
73 |
74 | /*
75 | * Parse an AX.25 address into TNC2-form
76 | * Caller must ensure 7 bytes are available
77 | * malloc()s buffer that caller must free
78 | * Returns an AxAddrVal
79 | */
80 | static AxAddrVal
81 | axAddrToTNC2(uint8_t **axp, size_t *axlen, uint8_t **tnc2Buf, bool hBit)
82 | {
83 | uint8_t addrBuf[MAX_TNC2_ADDR_LEN]; // XXX: needs a define ~11 for 'XXNXXX*-NN'
84 | int p, ssid;
85 |
86 | if (*axlen < AX_ADDR_LEN) {
87 | puts("axAddr: frame too short");
88 | return (AxAddrError);
89 | }
90 |
91 | p = 0;
92 | for (int i = 0; i < AX_ADDR_LEN - 1; i++) {
93 | char c;
94 |
95 | if ((*axp)[i] & 1) {
96 | // XXX: invalid address termination bit
97 | puts("axAddr: invalid address termination bit");
98 | }
99 |
100 | c = (*axp)[i] >> 1;
101 | if (c == ' ') {
102 | break;
103 | }
104 |
105 | /*
106 | * If addr has a '*', terminate it there
107 | */
108 | if (c == '*') {
109 | // XXX: log this as a warning
110 | break;
111 | }
112 |
113 | addrBuf[p++]= c;
114 | }
115 |
116 | ssid = ((*axp)[6] >> 1) & 0xf;
117 | if (ssid > 0) {
118 | addrBuf[p++] = '-';
119 | p += snprintf((char *)addrBuf + p, 3, "%d", ssid);
120 | } else {
121 | addrBuf[p] = '\0';
122 | }
123 |
124 | /* append '*' for heard-bit */
125 | if (hBit && ((*axp)[6] & 0x80)) {
126 | addrBuf[p++] = '*';
127 | addrBuf[p] = '\0';
128 | }
129 |
130 | *tnc2Buf = malloc(strlen((char *)addrBuf) + 1);
131 | if (*tnc2Buf == NULL) {
132 | return (AxAddrError);
133 | }
134 |
135 | *axp += AX_ADDR_LEN;
136 | *axlen -= AX_ADDR_LEN;
137 | strcpy((char *)*tnc2Buf, (char *)addrBuf);
138 | return ((*axp)[6 - AX_ADDR_LEN] & 0x01 ? AxAddrLast : AxAddrMore);
139 | }
140 |
141 | /*
142 | * Parse digipeater path, saving digis + path
143 | * XXX: add switch to configure all-space handling
144 | */
145 | static AxAddrVal
146 | ax25ToTNC2Path(uint8_t **axp, size_t *axlen, tnc2buf_t *tb)
147 | {
148 | AxAddrVal av;
149 | int tnc2Digis = 0;
150 | size_t pathLen = 0;
151 |
152 | do {
153 | av = axAddrToTNC2(axp, axlen, tb->digis + tnc2Digis, true);
154 | if (av != AxAddrError) {
155 | pathLen += strlen((char *)tb->digis[tnc2Digis]) + 1;
156 | if (++tnc2Digis >= MAX_TNC2_DIGIS) {
157 | av = AxAddrError;
158 | }
159 | }
160 | } while (av == AxAddrMore);
161 |
162 | if (av == AxAddrError) {
163 | tb->digiPath = NULL;
164 | return (av);
165 | }
166 |
167 | tb->digiPath = calloc(1, pathLen);
168 | if (tb->digiPath == NULL) {
169 | return (AxAddrError);
170 | }
171 |
172 | for (int i = 0; i < tnc2Digis; i++) {
173 | strcat((char *) tb->digiPath, (char *) tb->digis[i]);
174 | if (i < tnc2Digis - 1) {
175 | #if 1
176 | /* check for a zero-length addr next */
177 | if (strlen((char *)tb->digis[i + 1]) == 0) {
178 | break;
179 | }
180 | #endif
181 | strcat((char *) tb->digiPath, ",");
182 | }
183 | }
184 |
185 | tb->digiCount = tnc2Digis;
186 | return (av);
187 | }
188 |
189 | /*
190 | * Convert a valid AX.25 frame to an APRS frame in a TNC2 buffer
191 | */
192 | tnc2buf_t *
193 | ax25ToTNC2(kbuf_t *fp)
194 | {
195 | tnc2buf_t *tb;
196 | uint8_t *axp, *term;
197 | size_t axLen;
198 | AxAddrVal av;
199 |
200 | /* allocate TNC2 frame buffer */
201 | if ( (tb = calloc(1, sizeof (tnc2buf_t))) == NULL) {
202 | return (tb);
203 | }
204 |
205 | axLen = fp->kb_size;
206 | axp = fp->kb_data;
207 |
208 | /* destination address */
209 | av = axAddrToTNC2(&axp, &axLen, &tb->destAddr, false);
210 | if (av != AxAddrMore) {
211 | /* invalid address field */
212 | goto errorReturn;
213 | }
214 |
215 | /* source address */
216 | av = axAddrToTNC2(&axp, &axLen, &tb->srcAddr, false);
217 | if (av == AxAddrError) {
218 | /* invalid address field */
219 | goto errorReturn;
220 | }
221 |
222 | if (av == AxAddrMore) {
223 | /* parse the digi path */
224 | av = ax25ToTNC2Path(&axp, &axLen, tb);
225 | if (av == AxAddrError) {
226 | goto errorReturn;
227 | }
228 | }
229 |
230 | /* Verify this is an APRS UI + PID 0xf0 frame */
231 | if (axLen < 2 || axp[0] != 0x03 || axp[1] != 0xf0) {
232 | // XXX: packet dump to error log
233 | puts("XXX: not an APRS frame");
234 | goto errorReturn;
235 | }
236 |
237 | /* skip control + PID bytes */
238 | axp += 2;
239 | axLen -= 2;
240 |
241 | /*
242 | * Terminate payload at the first \r\n or \n
243 | */
244 | if ((term = memmem(axp, axLen, "\r\n", 2)) == NULL) {
245 | term = memchr(axp, '\n', axLen);
246 | }
247 |
248 | tb->msgLen = term ? term - axp : axLen;
249 | tb->msg = malloc(tb->msgLen);
250 | if (tb->msg == NULL) {
251 | goto errorReturn;
252 | }
253 |
254 | memcpy(tb->msg, axp, tb->msgLen);
255 |
256 | // XXX: log a warning when payload truncated before end
257 | return (tb);
258 |
259 | errorReturn:
260 | freeTNC2Buf(tb);
261 | return (NULL);
262 | }
263 |
264 | /*
265 | * Copy address from/update supplied text pointer into allocated buffer
266 | */
267 | static int
268 | textAddrToTNC2(uint8_t **textp, uint8_t **addrBuf, const char *delim)
269 | {
270 | uint8_t *tp0;
271 | int addrLen;
272 |
273 | tp0 = (uint8_t *) strpbrk((char *) *textp, delim);
274 |
275 | if (((addrLen = tp0 ? tp0 - *textp : -1) < 0) ||
276 | (addrLen > 20) ||
277 | ((*addrBuf = malloc(addrLen + 1)) == NULL)) {
278 | return (AxAddrError);
279 | }
280 |
281 | strlcpy((char *) *addrBuf, (char *) *textp, addrLen + 1);
282 | *textp += addrLen;
283 |
284 | return (AxAddrMore);
285 | }
286 |
287 | /*
288 | * Parse digipeater path, saving digis + path
289 | * XXX: add switch to configure all-space handling
290 | */
291 | static AxAddrVal
292 | textToTNC2Path(uint8_t **textp, tnc2buf_t *tb)
293 | {
294 | AxAddrVal av;
295 | int tnc2Digis = 0;
296 | size_t pathLen = 0;
297 |
298 | do {
299 | *textp += 1;
300 | av = textAddrToTNC2(textp, tb->digis + tnc2Digis, ",:");
301 | if (av != AxAddrError) {
302 | pathLen += strlen((char *)tb->digis[tnc2Digis]) + 1;
303 | if (++tnc2Digis >= MAX_TNC2_DIGIS) {
304 | av = AxAddrError;
305 | }
306 | }
307 | } while (av != AxAddrError && **textp == ',');
308 |
309 | if (av == AxAddrError) {
310 | tb->digiPath = NULL;
311 | return (av);
312 | }
313 |
314 | tb->digiPath = calloc(1, pathLen);
315 | if (tb->digiPath == NULL) {
316 | return (AxAddrError);
317 | }
318 |
319 | for (int i = 0; i < tnc2Digis; i++) {
320 | strcat((char *) tb->digiPath, (char *) tb->digis[i]);
321 | if (i < tnc2Digis - 1) {
322 | #if 1
323 | /* check for a zero-length addr next */
324 | if (strlen((char *)tb->digis[i + 1]) == 0) {
325 | break;
326 | }
327 | #endif
328 | strcat((char *) tb->digiPath, ",");
329 | }
330 | }
331 |
332 | tb->digiCount = tnc2Digis;
333 | return (av);
334 | }
335 |
336 |
337 | /*
338 | * Convert a valid TNC2 text line to a TNC2 buffer
339 | */
340 | tnc2buf_t *
341 | textToTNC2(uint8_t *textp, size_t len)
342 | {
343 | tnc2buf_t *tb;
344 | uint8_t *tp0 = textp;
345 |
346 |
347 | /* allocate TNC2 frame buffer */
348 | if ((tb = calloc(1, sizeof (tnc2buf_t))) == NULL) {
349 | return (tb);
350 | }
351 |
352 | /* src addr first */
353 | if (textAddrToTNC2(&textp, &tb->srcAddr, ">") == AxAddrError) {
354 | /* invalid frame */
355 | goto errorReturn;
356 | }
357 |
358 | /* skip terminating '>' */
359 | textp += 1;
360 |
361 | /* dest addr next */
362 | if (textAddrToTNC2(&textp, &tb->destAddr, ":,") == AxAddrError) {
363 | /* invalid frame */
364 | goto errorReturn;
365 | }
366 |
367 | if (*textp == ',') {
368 | /* leave the terminating ',' intact */
369 | if (textToTNC2Path(&textp, tb) == AxAddrError) {
370 | goto errorReturn;
371 | }
372 | }
373 |
374 | /* skip terminating ':' */
375 | textp += 1;
376 |
377 | /* copy body */
378 | tb->msgLen = len - (textp - tp0);
379 | tb->msg = malloc(tb->msgLen);
380 | if (tb->msg == NULL) {
381 | goto errorReturn;
382 | }
383 |
384 | memcpy(tb->msg, textp, tb->msgLen);
385 | return (tb);
386 |
387 | errorReturn:
388 | freeTNC2Buf(tb);
389 | return (NULL);
390 | }
391 |
392 | /*
393 | *
394 | */
395 | uint8_t *
396 | tnc2ToText(tnc2buf_t *tb, size_t *len)
397 | {
398 | uint8_t *textbuf;
399 | size_t textlen;
400 | size_t tlen;
401 |
402 | textlen = strlen((char *)tb->srcAddr) + 1; // alloc '>'
403 | textlen += strlen((char *)tb->destAddr);
404 | for (int i = 0; i < tb->digiCount; i++) {
405 | textlen += strlen((char *)tb->digis[i]) + 1; // ',' for each digi
406 | }
407 | textlen += tb->msgLen + 1; // allow ':'
408 |
409 | textbuf = malloc(textlen);
410 | if (textbuf == NULL) {
411 | *len = 0;
412 | return (textbuf);
413 | }
414 |
415 | /* fill the output buffer */
416 | tlen = snprintf((char *)textbuf, textlen, "%s>%s", tb->srcAddr, tb->destAddr);
417 | if (tb->digiPath) {
418 | tlen += snprintf((char *)textbuf + tlen, textlen - tlen, ",%s", tb->digiPath);
419 | }
420 | textbuf[tlen++] = ':';
421 | /* use memcpy() instead of strcpy because there may be \0 bytes in msg */
422 | memcpy(textbuf + tlen, tb->msg, tb->msgLen);
423 | tlen += tb->msgLen;
424 | *len = tlen;
425 |
426 | #if 1
427 | // XXX: test code
428 | if ((textlen - tlen) != 0) {
429 | printf("tnc2ToText: %d\n", textlen - tlen);
430 | }
431 | #endif
432 | return (textbuf);
433 | }
434 |
435 | /*
436 | *
437 | */
438 | static void
439 | tnc2AddrToAx25(uint8_t *tnc2Addr, uint8_t *ax25Addr)
440 | {
441 | int i;
442 |
443 | memset(ax25Addr, ' ' << 1, AX_ADDR_LEN - 1);
444 | ax25Addr[AX_ADDR_LEN - 1] = 0x60;
445 |
446 | for (i = 0; i < AX_ADDR_LEN - 1; i++) {
447 | uint8_t b = tnc2Addr[i];
448 |
449 | if (b == '\0' || b == '-' || b == '*') {
450 | break;
451 | }
452 | ax25Addr[i] = b << 1;
453 | }
454 |
455 | if (tnc2Addr[i] == '-') {
456 | unsigned int ssid;
457 |
458 | i += 1;
459 | sscanf((char *) tnc2Addr + i, "%u", &ssid);
460 | if (ssid > 15) {
461 | // XXX: error
462 | ssid = 15;
463 | }
464 | ax25Addr[AX_ADDR_LEN - 1] |= ssid << 1;
465 | }
466 |
467 | if (tnc2Addr[i] == '*' ) {
468 | /* set the H bit */
469 | ax25Addr[AX_ADDR_LEN - 1] |= 0x80;
470 | }
471 | }
472 |
473 | /*
474 | *
475 | */
476 | kbuf_t *
477 | tnc2ToAx25(tnc2buf_t *tp)
478 | {
479 | uint8_t *fp;
480 | kbuf_t *kp;
481 | size_t axLen, axOffset;
482 |
483 | /* calculate ax.25 frame size */
484 | axLen = (2 + tp->digiCount) * AX_ADDR_LEN + 2 + tp->msgLen;
485 | fp = malloc(axLen);
486 | if (fp == NULL) {
487 | // XXX: metrics
488 | return (NULL);
489 | }
490 |
491 | tnc2AddrToAx25(tp->destAddr, fp + 0);
492 | /* set destAddr C-bit */
493 | fp[AX_ADDR_LEN - 1] |= 0x80;
494 | tnc2AddrToAx25(tp->srcAddr, fp + AX_ADDR_LEN);
495 | axOffset = 2 * AX_ADDR_LEN;
496 | for (int i = 0; i < tp->digiCount; i++) {
497 | tnc2AddrToAx25(tp->digis[i], fp + axOffset);
498 | axOffset += AX_ADDR_LEN;
499 | }
500 | /* terminate addresses */
501 | fp[axOffset - 1] |= 0x01;
502 | /* control + PID */
503 | fp[axOffset++] = 0x03;
504 | fp[axOffset++] = 0xf0;
505 | /* copy the body */
506 | memcpy(fp + axOffset, tp->msg, tp->msgLen);
507 | kp = kbuf_alloc(axLen, fp);
508 | free(fp);
509 | return (kp);
510 | }
511 |
--------------------------------------------------------------------------------
/main/igate/tnc2.h:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #ifndef _TNC2_H_
23 | #define _TNC2_H_
24 |
25 | #include
26 | #include "kbuf.h"
27 |
28 | /*
29 | *
30 | */
31 | #define MAX_TNC2_BUF_SIZE 2800
32 | #define MAX_TNC2_DIGIS 10 // allow some margin
33 | #define MAX_TNC2_ADDR_LEN 10 // XXNXXX-NN*n
34 |
35 | #define AX_ADDR_LEN 7
36 |
37 |
38 | typedef struct {
39 | uint8_t *srcAddr;
40 | uint8_t *destAddr;
41 | uint8_t *digis[MAX_TNC2_DIGIS];
42 | uint8_t *digiPath;
43 | uint8_t digiCount;
44 | uint8_t *msg;
45 | size_t msgLen;
46 | } tnc2buf_t;
47 |
48 | /*
49 | * Free a TNC2-form frame buffer
50 | */
51 | void freeTNC2Buf(tnc2buf_t *);
52 |
53 | /*
54 | * Given an AX.25 frame in a kbuf_t, return a
55 | * TNC2-format buffer (with 8-bit chars) or NULL
56 | * if a conversion error.
57 | *
58 | * Caller must free TNC2-buffer
59 | */
60 | tnc2buf_t *ax25ToTNC2(kbuf_t *);
61 |
62 | /*
63 | * Parse a TNC2-format buffer (8-bit chars allowed) into
64 | * an AX.25 frame in a kbuf_t or NULL if parse fails
65 | *
66 | * Caller must free AX.25 frame-buffer
67 | */
68 | kbuf_t *tnc2ToAX25(tnc2buf_t *);
69 |
70 | /*
71 | * Parse a TNC2-format text-buffer (8-bit chars allowed) into
72 | * a TNC2-buffer, NULL if failure
73 | *
74 | * Caller must free TNC2-buffer
75 | */
76 | tnc2buf_t *textToTNC2(uint8_t *, size_t);
77 |
78 | /*
79 | * Return the TNC2-format text-buffer from the
80 | * TNC2-buffer, NULL if failure
81 | *
82 | * Caller must free() text-buffer
83 | */
84 | uint8_t *tnc2ToText(tnc2buf_t *, size_t *);
85 |
86 | /*
87 | * Process a valid TNC2-buf into an AX.25 frame
88 | * kbuf_t * if successful, NULL if failure
89 | */
90 | kbuf_t *tnc2ToAx25(tnc2buf_t *);
91 | #endif /* _TNC2_H_ */
92 |
--------------------------------------------------------------------------------
/main/include/ac101.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/include/ac101.h
--------------------------------------------------------------------------------
/main/include/axfcs.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/include/axfcs.h
--------------------------------------------------------------------------------
/main/include/axmodem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/include/axmodem.h
--------------------------------------------------------------------------------
/main/include/kbuf.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danak6jq/ESP-TNC/b68023f651abb707922614d4367fd4ee1309e379/main/include/kbuf.h
--------------------------------------------------------------------------------
/main/kbuf.c:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | *
3 | * Copyright © 2015,2019, Dana H. Myers.
4 | * All Rights Reserved
5 | *
6 | * SPDX-License-Identifier: Apache-2.0
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the License); you may
9 | * not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================
20 | */
21 |
22 | #include "freertos/FreeRTOS.h"
23 | #include "freertos/task.h"
24 | #include "string.h"
25 |
26 | #include "kbuf.h"
27 | #include "axfcs.h"
28 |
29 | /*
30 | *
31 | */
32 | kbuf_t *
33 | kbuf_alloc(uint16_t len, uint8_t *data)
34 | {
35 | kbuf_t *kb;
36 |
37 | /* ESP-IDF malloc() is thread-safe */
38 | kb = (kbuf_t *) malloc(sizeof (kbuf_t) + (len - 1) * sizeof (uint8_t));
39 |
40 | if (kb != NULL) {
41 | kb->kb_o_ndx = 0;
42 | kb->kb_size = len;
43 | memcpy(kb->kb_data, data, len);
44 | }
45 |
46 | return (kb);
47 | }
48 |
49 | /*
50 | * ESP-IDF free() is thread-safe
51 | */
52 | void
53 | kbuf_free(kbuf_t *kb)
54 | {
55 | free(kb);
56 | }
57 |
58 | int16_t
59 | kbuf_get_8(kbuf_t *kb)
60 | {
61 | int16_t ret_val = -1;
62 |
63 | if (kb->kb_o_ndx < kb->kb_size) {
64 | ret_val = kb->kb_data[kb->kb_o_ndx++];
65 | }
66 |
67 | return (ret_val);
68 | }
69 |
70 | uint16_t
71 | kbuf_fcs(kbuf_t *kb)
72 | {
73 | return (fcs_value(kb->kb_data, kb->kb_size));
74 | }
75 |
76 | uint16_t
77 | kbuf_len(kbuf_t *kb)
78 | {
79 | return (kb->kb_size);
80 | }
81 |
82 | /* [] END OF FILE */
83 |
--------------------------------------------------------------------------------
/sdkconfig:
--------------------------------------------------------------------------------
1 | #
2 | # Automatically generated file. DO NOT EDIT.
3 | # Espressif IoT Development Framework (ESP-IDF) Project Configuration
4 | #
5 | CONFIG_IDF_CMAKE=y
6 | CONFIG_IDF_TARGET="esp32"
7 | CONFIG_IDF_TARGET_ESP32=y
8 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000
9 |
10 | #
11 | # SDK tool configuration
12 | #
13 | CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-"
14 | # CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set
15 | # end of SDK tool configuration
16 |
17 | #
18 | # Build type
19 | #
20 | CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y
21 | # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set
22 | CONFIG_APP_BUILD_GENERATE_BINARIES=y
23 | CONFIG_APP_BUILD_BOOTLOADER=y
24 | CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y
25 | # end of Build type
26 |
27 | #
28 | # Application manager
29 | #
30 | CONFIG_APP_COMPILE_TIME_DATE=y
31 | # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
32 | # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
33 | # CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set
34 | # end of Application manager
35 |
36 | #
37 | # Bootloader config
38 | #
39 | # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set
40 | # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set
41 | # CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set
42 | CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y
43 | # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set
44 | # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set
45 | CONFIG_BOOTLOADER_LOG_LEVEL=3
46 | # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set
47 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y
48 | # CONFIG_BOOTLOADER_FACTORY_RESET is not set
49 | # CONFIG_BOOTLOADER_APP_TEST is not set
50 | CONFIG_BOOTLOADER_WDT_ENABLE=y
51 | # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set
52 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000
53 | # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set
54 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set
55 | CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0
56 | # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set
57 | # end of Bootloader config
58 |
59 | #
60 | # Security features
61 | #
62 | # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
63 | # CONFIG_SECURE_BOOT_ENABLED is not set
64 | # CONFIG_SECURE_FLASH_ENC_ENABLED is not set
65 | # end of Security features
66 |
67 | #
68 | # Serial flasher config
69 | #
70 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
71 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
72 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
73 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
74 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
75 | CONFIG_ESPTOOLPY_FLASHMODE="dio"
76 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set
77 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
78 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
79 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
80 | CONFIG_ESPTOOLPY_FLASHFREQ="40m"
81 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
82 | # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
83 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
84 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
85 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
86 | CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
87 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
88 | CONFIG_ESPTOOLPY_BEFORE_RESET=y
89 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
90 | CONFIG_ESPTOOLPY_BEFORE="default_reset"
91 | CONFIG_ESPTOOLPY_AFTER_RESET=y
92 | # CONFIG_ESPTOOLPY_AFTER_NORESET is not set
93 | CONFIG_ESPTOOLPY_AFTER="hard_reset"
94 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set
95 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set
96 | CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
97 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set
98 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set
99 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set
100 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
101 | CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200
102 | CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
103 | # end of Serial flasher config
104 |
105 | #
106 | # Partition Table
107 | #
108 | CONFIG_PARTITION_TABLE_SINGLE_APP=y
109 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set
110 | # CONFIG_PARTITION_TABLE_CUSTOM is not set
111 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
112 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
113 | CONFIG_PARTITION_TABLE_OFFSET=0x8000
114 | CONFIG_PARTITION_TABLE_MD5=y
115 | # end of Partition Table
116 |
117 | #
118 | # Compiler options
119 | #
120 | # CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set
121 | # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set
122 | CONFIG_COMPILER_OPTIMIZATION_PERF=y
123 | # CONFIG_COMPILER_OPTIMIZATION_NONE is not set
124 | CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
125 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
126 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
127 | # CONFIG_COMPILER_CXX_EXCEPTIONS is not set
128 | # CONFIG_COMPILER_CXX_RTTI is not set
129 | CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
130 | # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set
131 | # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set
132 | # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
133 | # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
134 | # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set
135 | # end of Compiler options
136 |
137 | #
138 | # Component config
139 | #
140 |
141 | #
142 | # Application Level Tracing
143 | #
144 | # CONFIG_APPTRACE_DEST_TRAX is not set
145 | CONFIG_APPTRACE_DEST_NONE=y
146 | CONFIG_APPTRACE_LOCK_ENABLE=y
147 | # end of Application Level Tracing
148 |
149 | #
150 | # Bluetooth
151 | #
152 | # CONFIG_BT_ENABLED is not set
153 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
154 | CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0
155 | CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0
156 | CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0
157 | CONFIG_BTDM_CTRL_PINNED_TO_CORE=0
158 | CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1
159 | CONFIG_BT_RESERVE_DRAM=0
160 | # end of Bluetooth
161 |
162 | # CONFIG_BLE_MESH is not set
163 |
164 | #
165 | # CoAP Configuration
166 | #
167 | CONFIG_COAP_MBEDTLS_PSK=y
168 | # CONFIG_COAP_MBEDTLS_PKI is not set
169 | # CONFIG_COAP_MBEDTLS_DEBUG is not set
170 | CONFIG_COAP_LOG_DEFAULT_LEVEL=0
171 | # end of CoAP Configuration
172 |
173 | #
174 | # Driver configurations
175 | #
176 |
177 | #
178 | # ADC configuration
179 | #
180 | # CONFIG_ADC_FORCE_XPD_FSM is not set
181 | CONFIG_ADC_DISABLE_DAC=y
182 | # end of ADC configuration
183 |
184 | #
185 | # SPI configuration
186 | #
187 | # CONFIG_SPI_MASTER_IN_IRAM is not set
188 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y
189 | # CONFIG_SPI_SLAVE_IN_IRAM is not set
190 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
191 | # end of SPI configuration
192 |
193 | #
194 | # UART configuration
195 | #
196 | # CONFIG_UART_ISR_IN_IRAM is not set
197 | # end of UART configuration
198 |
199 | #
200 | # RTCIO configuration
201 | #
202 | # CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set
203 | # end of RTCIO configuration
204 | # end of Driver configurations
205 |
206 | #
207 | # eFuse Bit Manager
208 | #
209 | # CONFIG_EFUSE_CUSTOM_TABLE is not set
210 | # CONFIG_EFUSE_VIRTUAL is not set
211 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set
212 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
213 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set
214 | CONFIG_EFUSE_MAX_BLK_LEN=192
215 | # end of eFuse Bit Manager
216 |
217 | #
218 | # ESP-TLS
219 | #
220 | CONFIG_ESP_TLS_USING_MBEDTLS=y
221 | # CONFIG_ESP_TLS_SERVER is not set
222 | # CONFIG_ESP_TLS_PSK_VERIFICATION is not set
223 | # end of ESP-TLS
224 |
225 | #
226 | # ESP32-specific
227 | #
228 | # CONFIG_ESP32_REV_MIN_0 is not set
229 | CONFIG_ESP32_REV_MIN_1=y
230 | # CONFIG_ESP32_REV_MIN_2 is not set
231 | # CONFIG_ESP32_REV_MIN_3 is not set
232 | CONFIG_ESP32_REV_MIN=1
233 | CONFIG_ESP32_DPORT_WORKAROUND=y
234 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set
235 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
236 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
237 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
238 | CONFIG_ESP32_SPIRAM_SUPPORT=y
239 |
240 | #
241 | # SPI RAM config
242 | #
243 | CONFIG_SPIRAM_TYPE_AUTO=y
244 | # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
245 | # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
246 | CONFIG_SPIRAM_SIZE=-1
247 | CONFIG_SPIRAM_SPEED_40M=y
248 | CONFIG_SPIRAM=y
249 | CONFIG_SPIRAM_BOOT_INIT=y
250 | # CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
251 | # CONFIG_SPIRAM_USE_MEMMAP is not set
252 | # CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
253 | CONFIG_SPIRAM_USE_MALLOC=y
254 | CONFIG_SPIRAM_MEMTEST=y
255 | CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
256 | # CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set
257 | CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
258 | # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
259 | CONFIG_SPIRAM_CACHE_WORKAROUND=y
260 | CONFIG_SPIRAM_BANKSWITCH_ENABLE=y
261 | CONFIG_SPIRAM_BANKSWITCH_RESERVE=8
262 | # CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY is not set
263 |
264 | #
265 | # PSRAM clock and cs IO for ESP32-DOWD
266 | #
267 | CONFIG_D0WD_PSRAM_CLK_IO=17
268 | CONFIG_D0WD_PSRAM_CS_IO=16
269 | # end of PSRAM clock and cs IO for ESP32-DOWD
270 |
271 | #
272 | # PSRAM clock and cs IO for ESP32-D2WD
273 | #
274 | CONFIG_D2WD_PSRAM_CLK_IO=9
275 | CONFIG_D2WD_PSRAM_CS_IO=10
276 | # end of PSRAM clock and cs IO for ESP32-D2WD
277 |
278 | #
279 | # PSRAM clock and cs IO for ESP32-PICO
280 | #
281 | CONFIG_PICO_PSRAM_CS_IO=10
282 | # end of PSRAM clock and cs IO for ESP32-PICO
283 |
284 | CONFIG_SPIRAM_SPIWP_SD3_PIN=7
285 | # end of SPI RAM config
286 |
287 | # CONFIG_ESP32_TRAX is not set
288 | CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0
289 | # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set
290 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y
291 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4
292 | # CONFIG_ESP32_ULP_COPROC_ENABLED is not set
293 | CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0
294 | # CONFIG_ESP32_PANIC_PRINT_HALT is not set
295 | CONFIG_ESP32_PANIC_PRINT_REBOOT=y
296 | # CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
297 | # CONFIG_ESP32_PANIC_GDBSTUB is not set
298 | # CONFIG_ESP32_DEBUG_OCDAWARE is not set
299 | CONFIG_ESP32_BROWNOUT_DET=y
300 | CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y
301 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set
302 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set
303 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set
304 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set
305 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set
306 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set
307 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set
308 | CONFIG_ESP32_BROWNOUT_DET_LVL=0
309 | CONFIG_ESP32_REDUCE_PHY_TX_POWER=y
310 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
311 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set
312 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set
313 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set
314 | CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y
315 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set
316 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set
317 | # CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set
318 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
319 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
320 | CONFIG_ESP32_XTAL_FREQ_40=y
321 | # CONFIG_ESP32_XTAL_FREQ_26 is not set
322 | # CONFIG_ESP32_XTAL_FREQ_AUTO is not set
323 | CONFIG_ESP32_XTAL_FREQ=40
324 | # CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set
325 | # CONFIG_ESP32_NO_BLOBS is not set
326 | # CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
327 | # CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set
328 | CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5
329 | # end of ESP32-specific
330 |
331 | #
332 | # Power Management
333 | #
334 | # CONFIG_PM_ENABLE is not set
335 | # end of Power Management
336 |
337 | #
338 | # ADC-Calibration
339 | #
340 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
341 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
342 | CONFIG_ADC_CAL_LUT_ENABLE=y
343 | # end of ADC-Calibration
344 |
345 | #
346 | # Common ESP-related
347 | #
348 | # CONFIG_ESP_TIMER_PROFILING is not set
349 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
350 | CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32
351 | CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304
352 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584
353 | CONFIG_ESP_IPC_TASK_STACK_SIZE=1024
354 | CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y
355 | CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584
356 | CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048
357 | CONFIG_ESP_CONSOLE_UART_DEFAULT=y
358 | # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
359 | # CONFIG_ESP_CONSOLE_UART_NONE is not set
360 | CONFIG_ESP_CONSOLE_UART_NUM=0
361 | CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
362 | CONFIG_ESP_INT_WDT=y
363 | CONFIG_ESP_INT_WDT_TIMEOUT_MS=300
364 | CONFIG_ESP_INT_WDT_CHECK_CPU1=y
365 | CONFIG_ESP_TASK_WDT=y
366 | # CONFIG_ESP_TASK_WDT_PANIC is not set
367 | CONFIG_ESP_TASK_WDT_TIMEOUT_S=5
368 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
369 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
370 | # CONFIG_ESP_PANIC_HANDLER_IRAM is not set
371 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y
372 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y
373 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y
374 | CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y
375 | # end of Common ESP-related
376 |
377 | #
378 | # Ethernet
379 | #
380 | CONFIG_ETH_ENABLED=y
381 | CONFIG_ETH_USE_ESP32_EMAC=y
382 | CONFIG_ETH_PHY_INTERFACE_RMII=y
383 | # CONFIG_ETH_PHY_INTERFACE_MII is not set
384 | CONFIG_ETH_RMII_CLK_INPUT=y
385 | # CONFIG_ETH_RMII_CLK_OUTPUT is not set
386 | CONFIG_ETH_RMII_CLK_IN_GPIO=0
387 | CONFIG_ETH_DMA_BUFFER_SIZE=512
388 | CONFIG_ETH_DMA_RX_BUFFER_NUM=10
389 | CONFIG_ETH_DMA_TX_BUFFER_NUM=10
390 | CONFIG_ETH_USE_SPI_ETHERNET=y
391 | CONFIG_ETH_SPI_ETHERNET_DM9051=y
392 | # CONFIG_ETH_USE_OPENETH is not set
393 | # end of Ethernet
394 |
395 | #
396 | # Event Loop Library
397 | #
398 | # CONFIG_ESP_EVENT_LOOP_PROFILING is not set
399 | CONFIG_ESP_EVENT_POST_FROM_ISR=y
400 | CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y
401 | # end of Event Loop Library
402 |
403 | #
404 | # GDB Stub
405 | #
406 | # end of GDB Stub
407 |
408 | #
409 | # ESP HTTP client
410 | #
411 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
412 | # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
413 | # end of ESP HTTP client
414 |
415 | #
416 | # HTTP Server
417 | #
418 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
419 | CONFIG_HTTPD_MAX_URI_LEN=512
420 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
421 | CONFIG_HTTPD_PURGE_BUF_LEN=32
422 | # CONFIG_HTTPD_LOG_PURGE_DATA is not set
423 | # end of HTTP Server
424 |
425 | #
426 | # ESP HTTPS OTA
427 | #
428 | # CONFIG_OTA_ALLOW_HTTP is not set
429 | # end of ESP HTTPS OTA
430 |
431 | #
432 | # ESP HTTPS server
433 | #
434 | # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set
435 | # end of ESP HTTPS server
436 |
437 | #
438 | # ESP NETIF Adapter
439 | #
440 | CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120
441 | CONFIG_ESP_NETIF_TCPIP_LWIP=y
442 | # CONFIG_ESP_NETIF_LOOPBACK is not set
443 | CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y
444 | # end of ESP NETIF Adapter
445 |
446 | #
447 | # Wi-Fi
448 | #
449 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
450 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
451 | CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
452 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0
453 | CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16
454 | # CONFIG_ESP32_WIFI_CSI_ENABLED is not set
455 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
456 | CONFIG_ESP32_WIFI_TX_BA_WIN=6
457 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
458 | CONFIG_ESP32_WIFI_RX_BA_WIN=6
459 | CONFIG_ESP32_WIFI_NVS_ENABLED=y
460 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y
461 | # CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set
462 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752
463 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32
464 | # CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set
465 | CONFIG_ESP32_WIFI_IRAM_OPT=y
466 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y
467 | # CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set
468 | # end of Wi-Fi
469 |
470 | #
471 | # PHY
472 | #
473 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
474 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
475 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
476 | CONFIG_ESP32_PHY_MAX_TX_POWER=20
477 | # end of PHY
478 |
479 | #
480 | # Core dump
481 | #
482 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
483 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
484 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
485 | # end of Core dump
486 |
487 | #
488 | # FAT Filesystem support
489 | #
490 | # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set
491 | CONFIG_FATFS_CODEPAGE_437=y
492 | # CONFIG_FATFS_CODEPAGE_720 is not set
493 | # CONFIG_FATFS_CODEPAGE_737 is not set
494 | # CONFIG_FATFS_CODEPAGE_771 is not set
495 | # CONFIG_FATFS_CODEPAGE_775 is not set
496 | # CONFIG_FATFS_CODEPAGE_850 is not set
497 | # CONFIG_FATFS_CODEPAGE_852 is not set
498 | # CONFIG_FATFS_CODEPAGE_855 is not set
499 | # CONFIG_FATFS_CODEPAGE_857 is not set
500 | # CONFIG_FATFS_CODEPAGE_860 is not set
501 | # CONFIG_FATFS_CODEPAGE_861 is not set
502 | # CONFIG_FATFS_CODEPAGE_862 is not set
503 | # CONFIG_FATFS_CODEPAGE_863 is not set
504 | # CONFIG_FATFS_CODEPAGE_864 is not set
505 | # CONFIG_FATFS_CODEPAGE_865 is not set
506 | # CONFIG_FATFS_CODEPAGE_866 is not set
507 | # CONFIG_FATFS_CODEPAGE_869 is not set
508 | # CONFIG_FATFS_CODEPAGE_932 is not set
509 | # CONFIG_FATFS_CODEPAGE_936 is not set
510 | # CONFIG_FATFS_CODEPAGE_949 is not set
511 | # CONFIG_FATFS_CODEPAGE_950 is not set
512 | CONFIG_FATFS_CODEPAGE=437
513 | # CONFIG_FATFS_LFN_NONE is not set
514 | CONFIG_FATFS_LFN_HEAP=y
515 | # CONFIG_FATFS_LFN_STACK is not set
516 | CONFIG_FATFS_MAX_LFN=255
517 | CONFIG_FATFS_API_ENCODING_ANSI_OEM=y
518 | # CONFIG_FATFS_API_ENCODING_UTF_16 is not set
519 | # CONFIG_FATFS_API_ENCODING_UTF_8 is not set
520 | CONFIG_FATFS_FS_LOCK=0
521 | CONFIG_FATFS_TIMEOUT_MS=10000
522 | CONFIG_FATFS_PER_FILE_CACHE=y
523 | CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y
524 | # end of FAT Filesystem support
525 |
526 | #
527 | # Modbus configuration
528 | #
529 | CONFIG_FMB_COMM_MODE_RTU_EN=y
530 | CONFIG_FMB_COMM_MODE_ASCII_EN=y
531 | CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150
532 | CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200
533 | CONFIG_FMB_QUEUE_LENGTH=20
534 | CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048
535 | CONFIG_FMB_SERIAL_BUF_SIZE=256
536 | CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8
537 | CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000
538 | CONFIG_FMB_SERIAL_TASK_PRIO=10
539 | # CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set
540 | CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
541 | CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
542 | CONFIG_FMB_CONTROLLER_STACK_SIZE=4096
543 | CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20
544 | CONFIG_FMB_TIMER_PORT_ENABLED=y
545 | CONFIG_FMB_TIMER_GROUP=0
546 | CONFIG_FMB_TIMER_INDEX=0
547 | # CONFIG_FMB_TIMER_ISR_IN_IRAM is not set
548 | # end of Modbus configuration
549 |
550 | #
551 | # FreeRTOS
552 | #
553 | # CONFIG_FREERTOS_UNICORE is not set
554 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
555 | CONFIG_FREERTOS_CORETIMER_0=y
556 | # CONFIG_FREERTOS_CORETIMER_1 is not set
557 | CONFIG_FREERTOS_HZ=100
558 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
559 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set
560 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set
561 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
562 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set
563 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
564 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
565 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
566 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set
567 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set
568 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536
569 | CONFIG_FREERTOS_ISR_STACKSIZE=1536
570 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set
571 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
572 | CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y
573 | # CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set
574 | CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1
575 | CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048
576 | CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10
577 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
578 | # CONFIG_FREERTOS_USE_TRACE_FACILITY is not set
579 | # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
580 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
581 | # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
582 | # end of FreeRTOS
583 |
584 | #
585 | # Heap memory debugging
586 | #
587 | CONFIG_HEAP_POISONING_DISABLED=y
588 | # CONFIG_HEAP_POISONING_LIGHT is not set
589 | # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set
590 | CONFIG_HEAP_TRACING_OFF=y
591 | # CONFIG_HEAP_TRACING_STANDALONE is not set
592 | # CONFIG_HEAP_TRACING_TOHOST is not set
593 | # end of Heap memory debugging
594 |
595 | #
596 | # jsmn
597 | #
598 | # CONFIG_JSMN_PARENT_LINKS is not set
599 | # CONFIG_JSMN_STRICT is not set
600 | # end of jsmn
601 |
602 | #
603 | # libsodium
604 | #
605 | CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
606 | # end of libsodium
607 |
608 | #
609 | # Log output
610 | #
611 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
612 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
613 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
614 | # CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
615 | CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y
616 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
617 | CONFIG_LOG_DEFAULT_LEVEL=4
618 | # CONFIG_LOG_COLORS is not set
619 | CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
620 | # CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set
621 | # end of Log output
622 |
623 | #
624 | # LWIP
625 | #
626 | CONFIG_LWIP_LOCAL_HOSTNAME="espressif"
627 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
628 | # CONFIG_LWIP_L2_TO_L3_COPY is not set
629 | # CONFIG_LWIP_IRAM_OPTIMIZATION is not set
630 | CONFIG_LWIP_TIMERS_ONDEMAND=y
631 | CONFIG_LWIP_MAX_SOCKETS=10
632 | # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
633 | CONFIG_LWIP_SO_REUSE=y
634 | CONFIG_LWIP_SO_REUSE_RXTOALL=y
635 | # CONFIG_LWIP_SO_RCVBUF is not set
636 | # CONFIG_LWIP_NETBUF_RECVINFO is not set
637 | CONFIG_LWIP_IP_FRAG=y
638 | CONFIG_LWIP_IP_REASSEMBLY=y
639 | # CONFIG_LWIP_STATS is not set
640 | # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set
641 | CONFIG_LWIP_ESP_GRATUITOUS_ARP=y
642 | CONFIG_LWIP_GARP_TMR_INTERVAL=60
643 | CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
644 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
645 | # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
646 |
647 | #
648 | # DHCP server
649 | #
650 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60
651 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
652 | # end of DHCP server
653 |
654 | # CONFIG_LWIP_AUTOIP is not set
655 | CONFIG_LWIP_NETIF_LOOPBACK=y
656 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
657 |
658 | #
659 | # TCP
660 | #
661 | CONFIG_LWIP_MAX_ACTIVE_TCP=16
662 | CONFIG_LWIP_MAX_LISTENING_TCP=16
663 | CONFIG_LWIP_TCP_MAXRTX=12
664 | CONFIG_LWIP_TCP_SYNMAXRTX=6
665 | CONFIG_LWIP_TCP_MSS=1440
666 | CONFIG_LWIP_TCP_TMR_INTERVAL=250
667 | CONFIG_LWIP_TCP_MSL=60000
668 | CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
669 | CONFIG_LWIP_TCP_WND_DEFAULT=5744
670 | CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
671 | CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
672 | # CONFIG_LWIP_TCP_SACK_OUT is not set
673 | # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
674 | CONFIG_LWIP_TCP_OVERSIZE_MSS=y
675 | # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
676 | # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
677 | # end of TCP
678 |
679 | #
680 | # UDP
681 | #
682 | CONFIG_LWIP_MAX_UDP_PCBS=16
683 | CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
684 | # end of UDP
685 |
686 | CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072
687 | CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
688 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set
689 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set
690 | CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
691 | # CONFIG_LWIP_PPP_SUPPORT is not set
692 |
693 | #
694 | # ICMP
695 | #
696 | # CONFIG_LWIP_MULTICAST_PING is not set
697 | # CONFIG_LWIP_BROADCAST_PING is not set
698 | # end of ICMP
699 |
700 | #
701 | # LWIP RAW API
702 | #
703 | CONFIG_LWIP_MAX_RAW_PCBS=16
704 | # end of LWIP RAW API
705 |
706 | #
707 | # SNTP
708 | #
709 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
710 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
711 | # end of SNTP
712 | # end of LWIP
713 |
714 | #
715 | # mbedTLS
716 | #
717 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
718 | # CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC is not set
719 | # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
720 | # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
721 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y
722 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384
723 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096
724 | # CONFIG_MBEDTLS_DEBUG is not set
725 | # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set
726 | # CONFIG_MBEDTLS_CMAC_C is not set
727 | CONFIG_MBEDTLS_HARDWARE_AES=y
728 | # CONFIG_MBEDTLS_HARDWARE_MPI is not set
729 | # CONFIG_MBEDTLS_HARDWARE_SHA is not set
730 | CONFIG_MBEDTLS_HAVE_TIME=y
731 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set
732 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
733 | # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set
734 | # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set
735 | # CONFIG_MBEDTLS_TLS_DISABLED is not set
736 | CONFIG_MBEDTLS_TLS_SERVER=y
737 | CONFIG_MBEDTLS_TLS_CLIENT=y
738 | CONFIG_MBEDTLS_TLS_ENABLED=y
739 |
740 | #
741 | # TLS Key Exchange Methods
742 | #
743 | CONFIG_MBEDTLS_PSK_MODES=y
744 | CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
745 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y
746 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y
747 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y
748 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
749 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
750 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
751 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
752 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
753 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
754 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
755 | # end of TLS Key Exchange Methods
756 |
757 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
758 | # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set
759 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
760 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
761 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
762 | CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
763 | CONFIG_MBEDTLS_SSL_ALPN=y
764 | CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y
765 | CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y
766 |
767 | #
768 | # Symmetric Ciphers
769 | #
770 | CONFIG_MBEDTLS_AES_C=y
771 | # CONFIG_MBEDTLS_CAMELLIA_C is not set
772 | # CONFIG_MBEDTLS_DES_C is not set
773 | CONFIG_MBEDTLS_RC4_DISABLED=y
774 | # CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set
775 | # CONFIG_MBEDTLS_RC4_ENABLED is not set
776 | # CONFIG_MBEDTLS_BLOWFISH_C is not set
777 | # CONFIG_MBEDTLS_XTEA_C is not set
778 | CONFIG_MBEDTLS_CCM_C=y
779 | CONFIG_MBEDTLS_GCM_C=y
780 | # end of Symmetric Ciphers
781 |
782 | # CONFIG_MBEDTLS_RIPEMD160_C is not set
783 |
784 | #
785 | # Certificates
786 | #
787 | CONFIG_MBEDTLS_PEM_PARSE_C=y
788 | CONFIG_MBEDTLS_PEM_WRITE_C=y
789 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
790 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
791 | # end of Certificates
792 |
793 | CONFIG_MBEDTLS_ECP_C=y
794 | CONFIG_MBEDTLS_ECDH_C=y
795 | CONFIG_MBEDTLS_ECDSA_C=y
796 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
797 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
798 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
799 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
800 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
801 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
802 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
803 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
804 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
805 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
806 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
807 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
808 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
809 | # CONFIG_MBEDTLS_SECURITY_RISKS is not set
810 | # end of mbedTLS
811 |
812 | #
813 | # mDNS
814 | #
815 | CONFIG_MDNS_MAX_SERVICES=10
816 | CONFIG_MDNS_TASK_PRIORITY=1
817 | # CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set
818 | CONFIG_MDNS_TASK_AFFINITY_CPU0=y
819 | # CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set
820 | CONFIG_MDNS_TASK_AFFINITY=0x0
821 | CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000
822 | CONFIG_MDNS_TIMER_PERIOD_MS=100
823 | # end of mDNS
824 |
825 | #
826 | # ESP-MQTT Configurations
827 | #
828 | CONFIG_MQTT_PROTOCOL_311=y
829 | CONFIG_MQTT_TRANSPORT_SSL=y
830 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
831 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
832 | # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set
833 | # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set
834 | # CONFIG_MQTT_CUSTOM_OUTBOX is not set
835 | # end of ESP-MQTT Configurations
836 |
837 | #
838 | # Newlib
839 | #
840 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
841 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set
842 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set
843 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set
844 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set
845 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
846 | # CONFIG_NEWLIB_NANO_FORMAT is not set
847 | # end of Newlib
848 |
849 | #
850 | # NVS
851 | #
852 | # end of NVS
853 |
854 | #
855 | # OpenSSL
856 | #
857 | # CONFIG_OPENSSL_DEBUG is not set
858 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
859 | # CONFIG_OPENSSL_ASSERT_EXIT is not set
860 | # end of OpenSSL
861 |
862 | #
863 | # PThreads
864 | #
865 | CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5
866 | CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
867 | CONFIG_PTHREAD_STACK_MIN=768
868 | CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y
869 | # CONFIG_PTHREAD_DEFAULT_CORE_0 is not set
870 | # CONFIG_PTHREAD_DEFAULT_CORE_1 is not set
871 | CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1
872 | CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread"
873 | # end of PThreads
874 |
875 | #
876 | # SPI Flash driver
877 | #
878 | # CONFIG_SPI_FLASH_VERIFY_WRITE is not set
879 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set
880 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
881 | CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y
882 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set
883 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set
884 | # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set
885 |
886 | #
887 | # Auto-detect flash chips
888 | #
889 | CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y
890 | CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y
891 | # end of Auto-detect flash chips
892 | # end of SPI Flash driver
893 |
894 | #
895 | # SPIFFS Configuration
896 | #
897 | CONFIG_SPIFFS_MAX_PARTITIONS=3
898 |
899 | #
900 | # SPIFFS Cache Configuration
901 | #
902 | CONFIG_SPIFFS_CACHE=y
903 | CONFIG_SPIFFS_CACHE_WR=y
904 | # CONFIG_SPIFFS_CACHE_STATS is not set
905 | # end of SPIFFS Cache Configuration
906 |
907 | CONFIG_SPIFFS_PAGE_CHECK=y
908 | CONFIG_SPIFFS_GC_MAX_RUNS=10
909 | # CONFIG_SPIFFS_GC_STATS is not set
910 | CONFIG_SPIFFS_PAGE_SIZE=256
911 | CONFIG_SPIFFS_OBJ_NAME_LEN=32
912 | # CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set
913 | CONFIG_SPIFFS_USE_MAGIC=y
914 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
915 | CONFIG_SPIFFS_META_LENGTH=4
916 | CONFIG_SPIFFS_USE_MTIME=y
917 |
918 | #
919 | # Debug Configuration
920 | #
921 | # CONFIG_SPIFFS_DBG is not set
922 | # CONFIG_SPIFFS_API_DBG is not set
923 | # CONFIG_SPIFFS_GC_DBG is not set
924 | # CONFIG_SPIFFS_CACHE_DBG is not set
925 | # CONFIG_SPIFFS_CHECK_DBG is not set
926 | # CONFIG_SPIFFS_TEST_VISUALISATION is not set
927 | # end of Debug Configuration
928 | # end of SPIFFS Configuration
929 |
930 | #
931 | # Unity unit testing library
932 | #
933 | CONFIG_UNITY_ENABLE_FLOAT=y
934 | CONFIG_UNITY_ENABLE_DOUBLE=y
935 | # CONFIG_UNITY_ENABLE_COLOR is not set
936 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
937 | # CONFIG_UNITY_ENABLE_FIXTURE is not set
938 | # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set
939 | # end of Unity unit testing library
940 |
941 | #
942 | # Virtual file system
943 | #
944 | CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y
945 | CONFIG_VFS_SUPPORT_TERMIOS=y
946 |
947 | #
948 | # Host File System I/O (Semihosting)
949 | #
950 | CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
951 | CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
952 | # end of Host File System I/O (Semihosting)
953 | # end of Virtual file system
954 |
955 | #
956 | # Wear Levelling
957 | #
958 | # CONFIG_WL_SECTOR_SIZE_512 is not set
959 | CONFIG_WL_SECTOR_SIZE_4096=y
960 | CONFIG_WL_SECTOR_SIZE=4096
961 | # end of Wear Levelling
962 |
963 | #
964 | # Wi-Fi Provisioning Manager
965 | #
966 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
967 | CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
968 | # end of Wi-Fi Provisioning Manager
969 |
970 | #
971 | # Supplicant
972 | #
973 | CONFIG_WPA_MBEDTLS_CRYPTO=y
974 | # end of Supplicant
975 |
976 | #
977 | # DSP Library
978 | #
979 | # CONFIG_DSP_ANSI is not set
980 | CONFIG_DSP_OPTIMIZED=y
981 | CONFIG_DSP_OPTIMIZATION=1
982 | CONFIG_DSP_MAX_FFT_SIZE_512=y
983 | # CONFIG_DSP_MAX_FFT_SIZE_1024 is not set
984 | # CONFIG_DSP_MAX_FFT_SIZE_2048 is not set
985 | # CONFIG_DSP_MAX_FFT_SIZE_4096 is not set
986 | # CONFIG_DSP_MAX_FFT_SIZE_8192 is not set
987 | # CONFIG_DSP_MAX_FFT_SIZE_16384 is not set
988 | # CONFIG_DSP_MAX_FFT_SIZE_32768 is not set
989 | CONFIG_DSP_MAX_FFT_SIZE=512
990 | # end of DSP Library
991 | # end of Component config
992 |
993 | #
994 | # Compatibility options
995 | #
996 | # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
997 | # end of Compatibility options
998 |
999 | # Deprecated options for backward compatibility
1000 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
1001 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
1002 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
1003 | # CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set
1004 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y
1005 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
1006 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
1007 | CONFIG_LOG_BOOTLOADER_LEVEL=3
1008 | # CONFIG_APP_ROLLBACK_ENABLE is not set
1009 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set
1010 | # CONFIG_FLASHMODE_QIO is not set
1011 | # CONFIG_FLASHMODE_QOUT is not set
1012 | CONFIG_FLASHMODE_DIO=y
1013 | # CONFIG_FLASHMODE_DOUT is not set
1014 | # CONFIG_MONITOR_BAUD_9600B is not set
1015 | # CONFIG_MONITOR_BAUD_57600B is not set
1016 | CONFIG_MONITOR_BAUD_115200B=y
1017 | # CONFIG_MONITOR_BAUD_230400B is not set
1018 | # CONFIG_MONITOR_BAUD_921600B is not set
1019 | # CONFIG_MONITOR_BAUD_2MB is not set
1020 | # CONFIG_MONITOR_BAUD_OTHER is not set
1021 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200
1022 | CONFIG_MONITOR_BAUD=115200
1023 | # CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set
1024 | # CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
1025 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
1026 | # CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
1027 | # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
1028 | # CONFIG_CXX_EXCEPTIONS is not set
1029 | CONFIG_STACK_CHECK_NONE=y
1030 | # CONFIG_STACK_CHECK_NORM is not set
1031 | # CONFIG_STACK_CHECK_STRONG is not set
1032 | # CONFIG_STACK_CHECK_ALL is not set
1033 | # CONFIG_WARN_WRITE_STRINGS is not set
1034 | # CONFIG_DISABLE_GCC8_WARNINGS is not set
1035 | # CONFIG_ESP32_APPTRACE_DEST_TRAX is not set
1036 | CONFIG_ESP32_APPTRACE_DEST_NONE=y
1037 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
1038 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0
1039 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0
1040 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
1041 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
1042 | CONFIG_ADC2_DISABLE_DAC=y
1043 | CONFIG_SPIRAM_SUPPORT=y
1044 | # CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST is not set
1045 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0
1046 | # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
1047 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
1048 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
1049 | # CONFIG_ULP_COPROC_ENABLED is not set
1050 | CONFIG_ULP_COPROC_RESERVE_MEM=0
1051 | CONFIG_BROWNOUT_DET=y
1052 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y
1053 | # CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set
1054 | # CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set
1055 | # CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set
1056 | # CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set
1057 | # CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set
1058 | # CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set
1059 | # CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set
1060 | CONFIG_BROWNOUT_DET_LVL=0
1061 | CONFIG_REDUCE_PHY_TX_POWER=y
1062 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
1063 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set
1064 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set
1065 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set
1066 | # CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set
1067 | # CONFIG_NO_BLOBS is not set
1068 | # CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
1069 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
1070 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304
1071 | CONFIG_MAIN_TASK_STACK_SIZE=3584
1072 | CONFIG_IPC_TASK_STACK_SIZE=1024
1073 | CONFIG_TIMER_TASK_STACK_SIZE=3584
1074 | CONFIG_CONSOLE_UART_DEFAULT=y
1075 | # CONFIG_CONSOLE_UART_CUSTOM is not set
1076 | # CONFIG_CONSOLE_UART_NONE is not set
1077 | CONFIG_CONSOLE_UART_NUM=0
1078 | CONFIG_CONSOLE_UART_BAUDRATE=115200
1079 | CONFIG_INT_WDT=y
1080 | CONFIG_INT_WDT_TIMEOUT_MS=300
1081 | CONFIG_INT_WDT_CHECK_CPU1=y
1082 | CONFIG_TASK_WDT=y
1083 | # CONFIG_TASK_WDT_PANIC is not set
1084 | CONFIG_TASK_WDT_TIMEOUT_S=5
1085 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
1086 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
1087 | # CONFIG_EVENT_LOOP_PROFILING is not set
1088 | CONFIG_POST_EVENTS_FROM_ISR=y
1089 | CONFIG_POST_EVENTS_FROM_IRAM_ISR=y
1090 | CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150
1091 | CONFIG_MB_MASTER_DELAY_MS_CONVERT=200
1092 | CONFIG_MB_QUEUE_LENGTH=20
1093 | CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048
1094 | CONFIG_MB_SERIAL_BUF_SIZE=256
1095 | CONFIG_MB_SERIAL_TASK_PRIO=10
1096 | # CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set
1097 | CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20
1098 | CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
1099 | CONFIG_MB_CONTROLLER_STACK_SIZE=4096
1100 | CONFIG_MB_EVENT_QUEUE_TIMEOUT=20
1101 | CONFIG_MB_TIMER_PORT_ENABLED=y
1102 | CONFIG_MB_TIMER_GROUP=0
1103 | CONFIG_MB_TIMER_INDEX=0
1104 | CONFIG_SUPPORT_STATIC_ALLOCATION=y
1105 | # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set
1106 | CONFIG_TIMER_TASK_PRIORITY=1
1107 | CONFIG_TIMER_TASK_STACK_DEPTH=2048
1108 | CONFIG_TIMER_QUEUE_LENGTH=10
1109 | # CONFIG_L2_TO_L3_COPY is not set
1110 | # CONFIG_USE_ONLY_LWIP_SELECT is not set
1111 | CONFIG_ESP_GRATUITOUS_ARP=y
1112 | CONFIG_GARP_TMR_INTERVAL=60
1113 | CONFIG_TCPIP_RECVMBOX_SIZE=32
1114 | CONFIG_TCP_MAXRTX=12
1115 | CONFIG_TCP_SYNMAXRTX=6
1116 | CONFIG_TCP_MSS=1440
1117 | CONFIG_TCP_MSL=60000
1118 | CONFIG_TCP_SND_BUF_DEFAULT=5744
1119 | CONFIG_TCP_WND_DEFAULT=5744
1120 | CONFIG_TCP_RECVMBOX_SIZE=6
1121 | CONFIG_TCP_QUEUE_OOSEQ=y
1122 | # CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
1123 | CONFIG_TCP_OVERSIZE_MSS=y
1124 | # CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set
1125 | # CONFIG_TCP_OVERSIZE_DISABLE is not set
1126 | CONFIG_UDP_RECVMBOX_SIZE=6
1127 | CONFIG_TCPIP_TASK_STACK_SIZE=3072
1128 | CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
1129 | # CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set
1130 | # CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set
1131 | CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF
1132 | # CONFIG_PPP_SUPPORT is not set
1133 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
1134 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
1135 | CONFIG_ESP32_PTHREAD_STACK_MIN=768
1136 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y
1137 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set
1138 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set
1139 | CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1
1140 | CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"
1141 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
1142 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set
1143 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set
1144 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
1145 | CONFIG_SUPPORT_TERMIOS=y
1146 | # End of deprecated options
1147 |
--------------------------------------------------------------------------------