mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
Compare commits
8 Commits
fb24a2941c
...
e5f5eb3cbb
Author | SHA1 | Date | |
---|---|---|---|
|
e5f5eb3cbb | ||
|
1591c4eb33 | ||
|
a1a125ec85 | ||
|
edf48bbad8 | ||
|
bdf0298009 | ||
|
0df4e80b97 | ||
|
d6f2fa4bab | ||
|
359a3d396d |
@ -61,7 +61,7 @@ esp_err_t esp_apptrace_lock_take(esp_apptrace_lock_t *lock, esp_apptrace_tmo_t *
|
||||
|
||||
while (1) {
|
||||
// do not overwrite lock->int_state before we actually acquired the mux
|
||||
unsigned int_state = portENTER_CRITICAL_NESTED();
|
||||
unsigned int_state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
// FIXME: if mux is busy it is not good idea to loop during the whole tmo with disabled IRQs.
|
||||
// So we check mux state using zero tmo, restore IRQs and let others tasks/IRQs to run on this CPU
|
||||
// while we are doing our own tmo check.
|
||||
@ -74,8 +74,8 @@ esp_err_t esp_apptrace_lock_take(esp_apptrace_lock_t *lock, esp_apptrace_tmo_t *
|
||||
lock->int_state = int_state;
|
||||
return ESP_OK;
|
||||
}
|
||||
portEXIT_CRITICAL_NESTED(int_state);
|
||||
// we can be preempted from this place till the next call (above) to portENTER_CRITICAL_NESTED()
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(int_state);
|
||||
// we can be preempted from this place till the next call (above) to portSET_INTERRUPT_MASK_FROM_ISR()
|
||||
res = esp_apptrace_tmo_check(tmo);
|
||||
if (res != ESP_OK) {
|
||||
break;
|
||||
@ -95,7 +95,7 @@ esp_err_t esp_apptrace_lock_give(esp_apptrace_lock_t *lock)
|
||||
#else
|
||||
vPortCPUReleaseMutex(&lock->mux);
|
||||
#endif
|
||||
portEXIT_CRITICAL_NESTED(int_state);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(int_state);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ void esp_ipc_isr_waiting_for_finish_cmd(void* finish_cmd);
|
||||
void IRAM_ATTR esp_ipc_isr_stall_other_cpu(void)
|
||||
{
|
||||
if (s_stall_state == STALL_STATE_RUNNING) {
|
||||
BaseType_t intLvl = portENTER_CRITICAL_NESTED();
|
||||
BaseType_t intLvl = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
const uint32_t cpu_id = xPortGetCoreID();
|
||||
if (s_count_of_nested_calls[cpu_id]++ == 0) {
|
||||
IPC_ISR_ENTER_CRITICAL();
|
||||
@ -133,7 +133,7 @@ void IRAM_ATTR esp_ipc_isr_stall_other_cpu(void)
|
||||
}
|
||||
|
||||
/* Interrupts are already disabled by the parent, we're nested here. */
|
||||
portEXIT_CRITICAL_NESTED(intLvl);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(intLvl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ void IRAM_ATTR esp_ipc_isr_release_other_cpu(void)
|
||||
if (--s_count_of_nested_calls[cpu_id] == 0) {
|
||||
esp_ipc_isr_finish_cmd = 1;
|
||||
IPC_ISR_EXIT_CRITICAL();
|
||||
portEXIT_CRITICAL_NESTED(s_stored_interrupt_level);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(s_stored_interrupt_level);
|
||||
} else if (s_count_of_nested_calls[cpu_id] < 0) {
|
||||
assert(0);
|
||||
}
|
||||
|
@ -1,16 +1,8 @@
|
||||
// Copyright 2016-2017 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
@ -786,7 +778,7 @@ void esp_pm_impl_init(void)
|
||||
void esp_pm_impl_idle_hook(void)
|
||||
{
|
||||
int core_id = xPortGetCoreID();
|
||||
uint32_t state = portENTER_CRITICAL_NESTED();
|
||||
uint32_t state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
if (!s_core_idle[core_id]
|
||||
#ifdef CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
&& !periph_should_skip_light_sleep()
|
||||
@ -795,7 +787,7 @@ void esp_pm_impl_idle_hook(void)
|
||||
esp_pm_lock_release(s_rtos_lock_handle[core_id]);
|
||||
s_core_idle[core_id] = true;
|
||||
}
|
||||
portEXIT_CRITICAL_NESTED(state);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(state);
|
||||
ESP_PM_TRACE_ENTER(IDLE, core_id);
|
||||
}
|
||||
|
||||
@ -806,7 +798,7 @@ void IRAM_ATTR esp_pm_impl_isr_hook(void)
|
||||
/* Prevent higher level interrupts (than the one this function was called from)
|
||||
* from happening in this section, since they will also call into esp_pm_impl_isr_hook.
|
||||
*/
|
||||
uint32_t state = portENTER_CRITICAL_NESTED();
|
||||
uint32_t state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
#if defined(CONFIG_FREERTOS_SYSTICK_USES_CCOUNT) && (portNUM_PROCESSORS == 2)
|
||||
if (s_need_update_ccompare[core_id]) {
|
||||
update_ccompare();
|
||||
@ -817,7 +809,7 @@ void IRAM_ATTR esp_pm_impl_isr_hook(void)
|
||||
#else
|
||||
leave_idle();
|
||||
#endif // CONFIG_FREERTOS_SYSTICK_USES_CCOUNT && portNUM_PROCESSORS == 2
|
||||
portEXIT_CRITICAL_NESTED(state);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(state);
|
||||
ESP_PM_TRACE_EXIT(ISR_HOOK, core_id);
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,8 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_SW after restart from APP CPU",
|
||||
static void do_int_wdt(void)
|
||||
{
|
||||
setup_values();
|
||||
portENTER_CRITICAL_NESTED();
|
||||
BaseType_t prev_level = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
(void) prev_level;
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,8 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Stack callback functions prototypes
|
||||
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_err.h" // for esp_err_t
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_err.h" // for esp_err_t
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_err.h" // for esp_err_t
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_err.h" // for esp_err_t
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_err.h" // for esp_err_t
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_err.h" // for esp_err_t
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _MB_IFACE_COMMON_H
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _ESP_MB_MASTER_INTERFACE_H
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _ESP_MB_SLAVE_INTERFACE_H
|
||||
|
@ -1,17 +1,8 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
// mbcontroller.h
|
||||
// mbcontroller - common Modbus controller header file
|
||||
|
||||
|
@ -1,17 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _MB_CONTROLLER_MASTER_H
|
||||
#define _MB_CONTROLLER_MASTER_H
|
||||
|
||||
|
@ -1,17 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _MB_CONTROLLER_SLAVE_H
|
||||
#define _MB_CONTROLLER_SLAVE_H
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (C) 2013 Armink <armink.ztl@gmail.com>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeRTOS Modbus Libary: A Modbus serial implementation for FreeRTOS
|
||||
* Copyright (C) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (C) 2013 Armink <armink.ztl@gmail.com>
|
||||
@ -28,8 +35,6 @@
|
||||
* File: $Id: mbfuncdisc_m.c,v 1.60 2013/10/15 8:48:20 Armink Add Master Functions Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* ----------------------- System includes ----------------------------------*/
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (C) 2013 Armink <armink.ztl@gmail.com>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (C) 2013 Armink <armink.ztl@gmail.com>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (C) 2013 Armink <armink.ztl@gmail.com>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (C) 2013 Armink <armink.ztl@gmail.com>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2013 China Beijing Armink <armink.ztl@gmail.com>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: RT-Thread Port
|
||||
|
@ -1,16 +1,38 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2010 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
* Copyright (C) 2010 Christian Walter <cwalter@embedded-solutions.at>
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* IF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* File: $Id: portother.c,v 1.1 2010/06/06 13:07:20 wolti Exp $
|
||||
*/
|
||||
|
||||
#ifndef PORT_COMMON_H_
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2010 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2010 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Demo Application
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Demo Application
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2010 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,7 +1,9 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2010 Christian Walter
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,7 +1,9 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2013 Armink
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// mbc_serial_master.c
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// mbc_serial_master.h Modbus controller serial master implementation header file
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2010 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,18 +1,8 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// mbc_serial_slave.c
|
||||
// Implementation of the Modbus controller serial slave
|
||||
|
||||
|
@ -1,16 +1,7 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// mbc_serial_slave.h Modbus controller serial slave implementation header file
|
||||
|
@ -1,16 +1,9 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2010 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 Port Demo Application
|
||||
|
@ -1,17 +1,8 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// mbc_tcp_master.h Modbus controller TCP master implementation header file
|
||||
|
||||
|
@ -1,17 +1,10 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 TCP Port
|
||||
* Copyright (C) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,17 +1,10 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 TCP Port
|
||||
* Copyright (C) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,17 +1,8 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// mbc_tcp_slave.c
|
||||
// Implementation of the Modbus controller TCP slave
|
||||
|
@ -1,17 +1,8 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// mbc_tcp_slave.h Modbus controller TCP slave implementation header file
|
||||
|
||||
|
@ -1,17 +1,10 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 TCP Port
|
||||
* Copyright (C) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -1,17 +1,10 @@
|
||||
/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* SPDX-License-Identifier: LGPL-2.0-only
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* SPDX-FileContributor: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
/*
|
||||
* FreeModbus Libary: ESP32 TCP Port
|
||||
* Copyright (C) 2006 Christian Walter <wolti@sil.at>
|
||||
|
@ -145,3 +145,54 @@ bool xPortcheckValidStackMem(const void *ptr)
|
||||
return esp_ptr_internal(ptr) && esp_ptr_byte_accessible(ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ------------- FreeRTOS Static Allocation ----------------
|
||||
|
||||
/*
|
||||
This function is required by FreeRTOS when configSUPPORT_STATIC_ALLOCATION is
|
||||
enabled and is used by FreeRTOS to obtain memory for its IDLE tasks.
|
||||
|
||||
Like the pvPortMallocTcbMem() and pvPortMallocStackMem() macros, TCB and stack
|
||||
memory MUST be placed in internal RAM.
|
||||
*/
|
||||
void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer,
|
||||
StackType_t **ppxIdleTaskStackBuffer,
|
||||
uint32_t *pulIdleTaskStackSize )
|
||||
{
|
||||
StaticTask_t *pxTCBBufferTemp;
|
||||
StackType_t *pxStackBufferTemp;
|
||||
//Allocate TCB and stack buffer in internal memory
|
||||
pxTCBBufferTemp = pvPortMallocTcbMem(sizeof(StaticTask_t));
|
||||
pxStackBufferTemp = pvPortMallocStackMem(configIDLE_TASK_STACK_SIZE);
|
||||
assert(pxTCBBufferTemp != NULL);
|
||||
assert(pxStackBufferTemp != NULL);
|
||||
//Write back pointers
|
||||
*ppxIdleTaskTCBBuffer = pxTCBBufferTemp;
|
||||
*ppxIdleTaskStackBuffer = pxStackBufferTemp;
|
||||
*pulIdleTaskStackSize = configIDLE_TASK_STACK_SIZE;
|
||||
}
|
||||
|
||||
/*
|
||||
This function is required by FreeRTOS when configSUPPORT_STATIC_ALLOCATION is
|
||||
enabled and is used by the FreeRTOS Timer to obtain memory for its daemone task.
|
||||
|
||||
|
||||
Like the pvPortMallocTcbMem() and pvPortMallocStackMem() macros, TCB and stack
|
||||
memory MUST be placed in internal RAM.
|
||||
*/
|
||||
void vApplicationGetTimerTaskMemory(StaticTask_t **ppxTimerTaskTCBBuffer,
|
||||
StackType_t **ppxTimerTaskStackBuffer,
|
||||
uint32_t *pulTimerTaskStackSize )
|
||||
{
|
||||
StaticTask_t *pxTCBBufferTemp;
|
||||
StackType_t *pxStackBufferTemp;
|
||||
//Allocate TCB and stack buffer in internal memory
|
||||
pxTCBBufferTemp = pvPortMallocTcbMem(sizeof(StaticTask_t));
|
||||
pxStackBufferTemp = pvPortMallocStackMem(configTIMER_TASK_STACK_DEPTH);
|
||||
assert(pxTCBBufferTemp != NULL);
|
||||
assert(pxStackBufferTemp != NULL);
|
||||
//Write back pointers
|
||||
*ppxTimerTaskTCBBuffer = pxTCBBufferTemp;
|
||||
*ppxTimerTaskStackBuffer = pxStackBufferTemp;
|
||||
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
|
||||
}
|
||||
|
@ -139,18 +139,6 @@ BaseType_t xPortInIsrContext(void);
|
||||
*/
|
||||
BaseType_t xPortInterruptedFromISRContext(void);
|
||||
|
||||
/**
|
||||
* @brief Disable interrupts in a nested manner
|
||||
*
|
||||
* - Cleaner solution allows nested interrupts disabling and restoring via local registers or stack.
|
||||
* - They can be called from interrupts too.
|
||||
* - WARNING Only applies to current CPU.
|
||||
*
|
||||
* @note [refactor-todo] Define this as portSET_INTERRUPT_MASK_FROM_ISR() instead
|
||||
* @return unsigned Previous interrupt state
|
||||
*/
|
||||
static inline unsigned portENTER_CRITICAL_NESTED(void);
|
||||
|
||||
/* ---------------------- Spinlocks ------------------------
|
||||
- Spinlocks added to match API with SMP FreeRTOS. Single core RISC-V does not need spin locks
|
||||
- Because single core does not have a primitive spinlock data type, we have to implement one here
|
||||
@ -403,11 +391,10 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
|
||||
|
||||
// --------------------- Interrupts ------------------------
|
||||
|
||||
#define portEXIT_CRITICAL_NESTED(state) do { portCLEAR_INTERRUPT_MASK_FROM_ISR(state);} while(0);
|
||||
#define portDISABLE_INTERRUPTS() portSET_INTERRUPT_MASK_FROM_ISR()
|
||||
#define portENABLE_INTERRUPTS() portCLEAR_INTERRUPT_MASK_FROM_ISR(1)
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() vPortSetInterruptMask()
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedStatusValue) vPortClearInterruptMask(uxSavedStatusValue)
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedStatusValue) vPortClearInterruptMask(uxSavedStatusValue)
|
||||
|
||||
// ------------------ Critical Sections --------------------
|
||||
|
||||
@ -472,11 +459,7 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
|
||||
|
||||
// --------------------- Interrupts ------------------------
|
||||
|
||||
static inline unsigned portENTER_CRITICAL_NESTED(void)
|
||||
{
|
||||
unsigned state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------- Spinlocks ------------------------
|
||||
|
||||
@ -538,6 +521,14 @@ bool xPortcheckValidStackMem(const void *ptr);
|
||||
#define portVALID_TCB_MEM(ptr) xPortCheckValidTCBMem(ptr)
|
||||
#define portVALID_STACK_MEM(ptr) xPortcheckValidStackMem(ptr)
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------------------------- Deprecate ------------------------------------------------------
|
||||
* - Pull in header containing deprecated macros here
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
#include "portmacro_deprecated.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------- Deprecate ------------------------------------------------------
|
||||
* - Macros or functions that should be deprecated in v5.0, then removed in the next major release
|
||||
* - Kept as not to cause a breaking change
|
||||
* - Include this header at the end of portmacro.h
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* @brief Disable interrupts in a nested manner
|
||||
*
|
||||
* Does the exact same thing as portSET_INTERRUPT_MASK_FROM_ISR()
|
||||
*
|
||||
* @deprecated This function is deprecated. Call portSET_INTERRUPT_MASK_FROM_ISR() instead
|
||||
*/
|
||||
static inline __attribute__((deprecated)) UBaseType_t portENTER_CRITICAL_NESTED(void) {
|
||||
return portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reenables interrupts in a nested manner
|
||||
*
|
||||
* Does the exact same thing as portCLEAR_INTERRUPT_MASK_FROM_ISR()
|
||||
*
|
||||
* @deprecated This function is deprecated. Call portCLEAR_INTERRUPT_MASK_FROM_ISR() instead
|
||||
*/
|
||||
static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseType_t prev_level)
|
||||
{
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level);
|
||||
}
|
@ -286,7 +286,7 @@ void vPortCPUReleaseMutex(portMUX_TYPE *mux)
|
||||
|
||||
void vPortEnterCritical(void)
|
||||
{
|
||||
BaseType_t state = portENTER_CRITICAL_NESTED();
|
||||
BaseType_t state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
uxCriticalNesting++;
|
||||
|
||||
if (uxCriticalNesting == 1) {
|
||||
@ -299,7 +299,7 @@ void vPortExitCritical(void)
|
||||
if (uxCriticalNesting > 0) {
|
||||
uxCriticalNesting--;
|
||||
if (uxCriticalNesting == 0) {
|
||||
portEXIT_CRITICAL_NESTED(uxSavedInterruptState);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,15 +155,20 @@ void vPortAssertIfInISR(void);
|
||||
BaseType_t xPortInterruptedFromISRContext(void);
|
||||
|
||||
/**
|
||||
* @brief Disable interrupts in a nested manner
|
||||
* @brief Disable interrupts in a nested manner (meant to be called from ISRs)
|
||||
*
|
||||
* - Cleaner solution allows nested interrupts disabling and restoring via local registers or stack.
|
||||
* - They can be called from interrupts too.
|
||||
* - WARNING Only applies to current CPU.
|
||||
* @note [refactor-todo] Define this as portSET_INTERRUPT_MASK_FROM_ISR() instead
|
||||
* @return unsigned Previous interrupt state
|
||||
* @warning Only applies to current CPU.
|
||||
* @return UBaseType_t Previous interrupt level
|
||||
*/
|
||||
static inline unsigned __attribute__((always_inline)) portENTER_CRITICAL_NESTED(void);
|
||||
static inline UBaseType_t xPortSetInterruptMaskFromISR(void);
|
||||
|
||||
/**
|
||||
* @brief Reenable interrupts in a nested manner (meant to be called from ISRs)
|
||||
*
|
||||
* @warning Only applies to current CPU.
|
||||
* @param prev_level Previous interrupt level
|
||||
*/
|
||||
static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level);
|
||||
|
||||
/* ---------------------- Spinlocks ------------------------
|
||||
* - Modifications made to critical sections to support SMP
|
||||
@ -416,8 +421,6 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void);
|
||||
|
||||
// --------------------- Interrupts ------------------------
|
||||
|
||||
#define portEXIT_CRITICAL_NESTED(state) do { portbenchmarkINTERRUPT_RESTORE(state); XTOS_RESTORE_JUST_INTLEVEL(state); } while (0)
|
||||
|
||||
/**
|
||||
* - Only applies to current core
|
||||
* - These cannot be nested. They should be used with a lot of care and cannot be called from interrupt level.
|
||||
@ -430,8 +433,8 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void);
|
||||
/**
|
||||
* ISR versions to enable/disable interrupts
|
||||
*/
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() portENTER_CRITICAL_NESTED()
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(state) portEXIT_CRITICAL_NESTED(state)
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() xPortSetInterruptMaskFromISR()
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level) vPortClearInterruptMaskFromISR(prev_level)
|
||||
|
||||
#define portASSERT_IF_IN_ISR() vPortAssertIfInISR()
|
||||
|
||||
@ -530,11 +533,17 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void);
|
||||
|
||||
// --------------------- Interrupts ------------------------
|
||||
|
||||
static inline unsigned portENTER_CRITICAL_NESTED(void)
|
||||
static inline UBaseType_t xPortSetInterruptMaskFromISR(void)
|
||||
{
|
||||
unsigned state = XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL);
|
||||
UBaseType_t prev_int_level = XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL);
|
||||
portbenchmarkINTERRUPT_DISABLE();
|
||||
return state;
|
||||
return prev_int_level;
|
||||
}
|
||||
|
||||
static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level)
|
||||
{
|
||||
portbenchmarkINTERRUPT_RESTORE(prev_level);
|
||||
XTOS_RESTORE_JUST_INTLEVEL(prev_level);
|
||||
}
|
||||
|
||||
// ---------------------- Spinlocks ------------------------
|
||||
@ -737,6 +746,14 @@ bool xPortcheckValidStackMem(const void *ptr);
|
||||
#define portVALID_TCB_MEM(ptr) xPortCheckValidTCBMem(ptr)
|
||||
#define portVALID_STACK_MEM(ptr) xPortcheckValidStackMem(ptr)
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------------------------- Deprecate ------------------------------------------------------
|
||||
* - Pull in header containing deprecated macros here
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
#include "portmacro_deprecated.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------- Deprecate ------------------------------------------------------
|
||||
* - Macros or functions that should be deprecated in v5.0, then removed in the next major release
|
||||
* - Kept as not to cause a breaking change
|
||||
* - Include this header at the end of portmacro.h
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* @brief Disable interrupts in a nested manner
|
||||
*
|
||||
* Does the exact same thing as portSET_INTERRUPT_MASK_FROM_ISR()
|
||||
*
|
||||
* @deprecated This function is deprecated. Call portSET_INTERRUPT_MASK_FROM_ISR() instead
|
||||
*/
|
||||
static inline __attribute__((deprecated)) UBaseType_t portENTER_CRITICAL_NESTED(void) {
|
||||
return portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reenables interrupts in a nested manner
|
||||
*
|
||||
* Does the exact same thing as portCLEAR_INTERRUPT_MASK_FROM_ISR()
|
||||
*
|
||||
* @deprecated This function is deprecated. Call portCLEAR_INTERRUPT_MASK_FROM_ISR() instead
|
||||
*/
|
||||
static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseType_t prev_level)
|
||||
{
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level);
|
||||
}
|
@ -255,9 +255,9 @@ BaseType_t xPortInIsrContext(void)
|
||||
{
|
||||
unsigned int irqStatus;
|
||||
BaseType_t ret;
|
||||
irqStatus = portENTER_CRITICAL_NESTED();
|
||||
irqStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
ret = (port_interruptNesting[xPortGetCoreID()] != 0);
|
||||
portEXIT_CRITICAL_NESTED(irqStatus);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(irqStatus);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -275,7 +275,7 @@ BaseType_t IRAM_ATTR xPortInterruptedFromISRContext(void)
|
||||
|
||||
void __attribute__((optimize("-O3"))) vPortEnterCritical(portMUX_TYPE *mux)
|
||||
{
|
||||
BaseType_t oldInterruptLevel = portENTER_CRITICAL_NESTED();
|
||||
BaseType_t oldInterruptLevel = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
/* Interrupts may already be disabled (because we're doing this recursively)
|
||||
* but we can't get the interrupt level after
|
||||
* vPortCPUAquireMutex, because it also may mess with interrupts.
|
||||
@ -304,7 +304,7 @@ void __attribute__((optimize("-O3"))) vPortExitCritical(portMUX_TYPE *mux)
|
||||
port_uxCriticalNesting[coreID] = nesting;
|
||||
|
||||
if ( nesting == 0 ) {
|
||||
portEXIT_CRITICAL_NESTED(port_uxOldInterruptState[coreID]);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(port_uxOldInterruptState[coreID]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2093,7 +2093,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB,
|
||||
if( listIS_CONTAINED_WITHIN( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ) != pdFALSE )
|
||||
{
|
||||
/* Has the task already been resumed from within an ISR? */
|
||||
if( listIS_CONTAINED_WITHIN( &xPendingReadyList[xPortGetCoreID()], &( pxTCB->xEventListItem )) ||
|
||||
if( listIS_CONTAINED_WITHIN( &xPendingReadyList[xPortGetCoreID()], &( pxTCB->xEventListItem )) == pdFALSE &&
|
||||
listIS_CONTAINED_WITHIN( &xPendingReadyList[!xPortGetCoreID()], &( pxTCB->xEventListItem )) == pdFALSE )
|
||||
{
|
||||
/* Is it in the suspended list because it is in the Suspended
|
||||
@ -2260,30 +2260,30 @@ void vTaskStartScheduler( void )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 && configSUPPORT_STATIC_ALLOCATION == 0 )
|
||||
StaticTask_t *pxIdleTaskTCBBuffer[configNUM_CORES] = {NULL};
|
||||
StackType_t *pxIdleTaskStackBuffer[configNUM_CORES] = {NULL};
|
||||
uint32_t ulIdleTaskStackSize;
|
||||
#endif
|
||||
|
||||
for(BaseType_t i = 0; i < configNUM_CORES; i++)
|
||||
{
|
||||
/* Add the idle task at the lowest priority. */
|
||||
#if( 0 ) /* configSUPPORT_STATIC_ALLOCATION == 1 ) Temporarily unsupported IDF-2243 */
|
||||
#ifdef ESP_PLATFORM
|
||||
/* Create an IDLE task for each core */
|
||||
for(BaseType_t xCoreID = 0; xCoreID < configNUM_CORES; xCoreID++)
|
||||
#endif //ESP_PLATFORM
|
||||
/* Add the idle task at the lowest priority. */
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
{
|
||||
StaticTask_t * pxIdleTaskTCBBuffer = NULL;
|
||||
StackType_t * pxIdleTaskStackBuffer = NULL;
|
||||
uint32_t ulIdleTaskStackSize;
|
||||
|
||||
/* The Idle task is created using user provided RAM - obtain the
|
||||
address of the RAM then create the idle task. */
|
||||
vApplicationGetIdleTaskMemory( &pxIdleTaskTCBBuffer[i], &pxIdleTaskStackBuffer[i], &ulIdleTaskStackSize );
|
||||
xIdleTaskHandle[i] = xTaskCreateStaticPinnedToCore( prvIdleTask,
|
||||
vApplicationGetIdleTaskMemory( &pxIdleTaskTCBBuffer, &pxIdleTaskStackBuffer, &ulIdleTaskStackSize );
|
||||
xIdleTaskHandle[ xCoreID ] = xTaskCreateStaticPinnedToCore( prvIdleTask,
|
||||
configIDLE_TASK_NAME,
|
||||
ulIdleTaskStackSize,
|
||||
( void * ) NULL, /*lint !e961. The cast is not redundant for all compilers. */
|
||||
portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */
|
||||
pxIdleTaskStackBuffer[i],
|
||||
pxIdleTaskTCBBuffer[i],
|
||||
i ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
|
||||
( void * ) NULL, /*lint !e961. The cast is not redundant for all compilers. */
|
||||
portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */
|
||||
pxIdleTaskStackBuffer,
|
||||
pxIdleTaskTCBBuffer,
|
||||
xCoreID ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
|
||||
|
||||
if( xIdleTaskHandle[i] != NULL )
|
||||
if( xIdleTaskHandle[ xCoreID ] != NULL )
|
||||
{
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
@ -2300,10 +2300,10 @@ void vTaskStartScheduler( void )
|
||||
configIDLE_TASK_STACK_SIZE,
|
||||
( void * ) NULL,
|
||||
portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */
|
||||
&xIdleTaskHandle[i],
|
||||
i ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
|
||||
&xIdleTaskHandle[ xCoreID ],
|
||||
xCoreID ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
|
||||
|
||||
if( xIdleTaskHandle[i] != NULL )
|
||||
if( xIdleTaskHandle[ xCoreID ] != NULL )
|
||||
{
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
@ -2313,7 +2313,6 @@ void vTaskStartScheduler( void )
|
||||
}
|
||||
}
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
}
|
||||
|
||||
#if ( configUSE_TIMERS == 1 )
|
||||
{
|
||||
@ -2430,10 +2429,9 @@ void vTaskSuspendAll( void )
|
||||
* post in the FreeRTOS support forum before reporting this as a bug! -
|
||||
* https://goo.gl/wu4acr */
|
||||
unsigned state;
|
||||
|
||||
state = portENTER_CRITICAL_NESTED();
|
||||
state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
++uxSchedulerSuspended[ xPortGetCoreID() ];
|
||||
portEXIT_CRITICAL_NESTED(state);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(state);
|
||||
}
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
@ -3364,7 +3362,7 @@ void vTaskSwitchContext( void )
|
||||
{
|
||||
//Theoretically, this is only called from either the tick interrupt or the crosscore interrupt, so disabling
|
||||
//interrupts shouldn't be necessary anymore. Still, for safety we'll leave it in for now.
|
||||
int irqstate=portENTER_CRITICAL_NESTED();
|
||||
int irqstate = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
|
||||
if( uxSchedulerSuspended[ xPortGetCoreID() ] != ( UBaseType_t ) pdFALSE )
|
||||
{
|
||||
@ -3529,7 +3527,7 @@ void vTaskSwitchContext( void )
|
||||
#endif
|
||||
|
||||
}
|
||||
portEXIT_CRITICAL_NESTED(irqstate);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(irqstate);
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@ -4620,9 +4618,9 @@ static void prvResetNextTaskUnblockTime( void )
|
||||
TaskHandle_t xReturn;
|
||||
unsigned state;
|
||||
|
||||
state = portENTER_CRITICAL_NESTED();
|
||||
state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
xReturn = pxCurrentTCB[ xPortGetCoreID() ];
|
||||
portEXIT_CRITICAL_NESTED(state);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(state);
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ TEST_CASE("Tasks snapshot", "[freertos]")
|
||||
|
||||
// uxTaskGetSnapshotAll is supposed to be called when all tasks on both CPUs are
|
||||
// inactive and can not alter FreeRTOS internal tasks lists, e.g. from panic handler
|
||||
unsigned state = portENTER_CRITICAL_NESTED();
|
||||
unsigned state = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
#ifndef CONFIG_FREERTOS_UNICORE
|
||||
esp_cpu_stall(other_core_id);
|
||||
#endif
|
||||
@ -30,7 +30,7 @@ TEST_CASE("Tasks snapshot", "[freertos]")
|
||||
#ifndef CONFIG_FREERTOS_UNICORE
|
||||
esp_cpu_unstall(other_core_id);
|
||||
#endif
|
||||
portEXIT_CRITICAL_NESTED(state);
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(state);
|
||||
|
||||
printf("Dumped %d tasks. TCB size %d\n", task_num, tcb_sz);
|
||||
TEST_ASSERT_NOT_EQUAL(0, task_num);
|
||||
|
@ -247,7 +247,7 @@ PRIVILEGED_DATA portMUX_TYPE xTimerMux = portMUX_INITIALIZER_UNLOCKED;
|
||||
|
||||
if( xTimerQueue != NULL )
|
||||
{
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 && configSUPPORT_STATIC_ALLOCATION == 0 )
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
{
|
||||
StaticTask_t * pxTimerTaskTCBBuffer = NULL;
|
||||
StackType_t * pxTimerTaskStackBuffer = NULL;
|
||||
|
@ -36,15 +36,15 @@
|
||||
|
||||
#if SOC_CPU_CORES_NUM == 1
|
||||
|
||||
// Single core SoC: atomics can be implemented using portENTER_CRITICAL_NESTED
|
||||
// and portEXIT_CRITICAL_NESTED, which disable and enable interrupts.
|
||||
// Single core SoC: atomics can be implemented using portSET_INTERRUPT_MASK_FROM_ISR
|
||||
// and portCLEAR_INTERRUPT_MASK_FROM_ISR, which disables and enables interrupts.
|
||||
#define _ATOMIC_ENTER_CRITICAL() ({ \
|
||||
unsigned state = portENTER_CRITICAL_NESTED(); \
|
||||
unsigned state = portSET_INTERRUPT_MASK_FROM_ISR(); \
|
||||
state; \
|
||||
})
|
||||
|
||||
#define _ATOMIC_EXIT_CRITICAL(state) do { \
|
||||
portEXIT_CRITICAL_NESTED(state); \
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(state); \
|
||||
} while (0)
|
||||
|
||||
#else // SOC_CPU_CORES_NUM
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/*=====================================================================================
|
||||
* Description:
|
||||
* C file to define parameter storage instances
|
||||
|
@ -1,3 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Need Python 3 string formatting functions
|
||||
from __future__ import print_function
|
||||
|
||||
@ -283,6 +286,5 @@ if __name__ == '__main__':
|
||||
logger.addHandler(fh)
|
||||
logger.addHandler(ch)
|
||||
logger.info('Start script %s.' % os.path.basename(__file__))
|
||||
print('Logging file name: %s' % logger.handlers[0].baseFilename)
|
||||
test_modbus_communication()
|
||||
logging.shutdown()
|
||||
|
@ -1,16 +1,8 @@
|
||||
// Copyright 2016-2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "string.h"
|
||||
#include "esp_log.h"
|
||||
|
@ -1,9 +1,11 @@
|
||||
/* FreeModbus Slave Example ESP32
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// FreeModbus Slave Example ESP32
|
||||
|
||||
Unless required by applicable law or agreed to in writing, this
|
||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "esp_err.h"
|
||||
|
@ -1,3 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
@ -1,16 +1,10 @@
|
||||
// Copyright 2016-2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// FreeModbus Master Example ESP32
|
||||
|
||||
#include "string.h"
|
||||
#include "esp_log.h"
|
||||
|
@ -1,9 +1,11 @@
|
||||
/* FreeModbus Slave Example ESP32
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// FreeModbus Slave Example ESP32
|
||||
|
||||
Unless required by applicable law or agreed to in writing, this
|
||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "esp_err.h"
|
||||
#include "sdkconfig.h"
|
||||
|
@ -881,7 +881,6 @@ components/esp_pm/include/esp32s3/pm.h
|
||||
components/esp_pm/include/esp_pm.h
|
||||
components/esp_pm/include/esp_private/pm_impl.h
|
||||
components/esp_pm/include/esp_private/pm_trace.h
|
||||
components/esp_pm/pm_impl.c
|
||||
components/esp_pm/pm_locks.c
|
||||
components/esp_pm/pm_trace.c
|
||||
components/esp_pm/test/test_pm.c
|
||||
@ -1265,74 +1264,6 @@ components/fatfs/vfs/esp_vfs_fat.h
|
||||
components/fatfs/vfs/vfs_fat_internal.h
|
||||
components/fatfs/vfs/vfs_fat_sdmmc.c
|
||||
components/fatfs/vfs/vfs_fat_spiflash.c
|
||||
components/freemodbus/common/esp_modbus_callbacks.h
|
||||
components/freemodbus/common/esp_modbus_master.c
|
||||
components/freemodbus/common/esp_modbus_master_serial.c
|
||||
components/freemodbus/common/esp_modbus_master_tcp.c
|
||||
components/freemodbus/common/esp_modbus_slave.c
|
||||
components/freemodbus/common/esp_modbus_slave_serial.c
|
||||
components/freemodbus/common/esp_modbus_slave_tcp.c
|
||||
components/freemodbus/common/include/esp_modbus_common.h
|
||||
components/freemodbus/common/include/esp_modbus_master.h
|
||||
components/freemodbus/common/include/esp_modbus_slave.h
|
||||
components/freemodbus/common/include/mbcontroller.h
|
||||
components/freemodbus/common/mbc_master.h
|
||||
components/freemodbus/common/mbc_slave.h
|
||||
components/freemodbus/modbus/ascii/mbascii.c
|
||||
components/freemodbus/modbus/ascii/mbascii.h
|
||||
components/freemodbus/modbus/ascii/mbascii_m.c
|
||||
components/freemodbus/modbus/functions/mbfunccoils.c
|
||||
components/freemodbus/modbus/functions/mbfunccoils_m.c
|
||||
components/freemodbus/modbus/functions/mbfuncdiag.c
|
||||
components/freemodbus/modbus/functions/mbfuncdisc.c
|
||||
components/freemodbus/modbus/functions/mbfuncdisc_m.c
|
||||
components/freemodbus/modbus/functions/mbfuncholding.c
|
||||
components/freemodbus/modbus/functions/mbfuncholding_m.c
|
||||
components/freemodbus/modbus/functions/mbfuncinput.c
|
||||
components/freemodbus/modbus/functions/mbfuncinput_m.c
|
||||
components/freemodbus/modbus/functions/mbfuncother.c
|
||||
components/freemodbus/modbus/functions/mbutils.c
|
||||
components/freemodbus/modbus/include/mb.h
|
||||
components/freemodbus/modbus/include/mb_m.h
|
||||
components/freemodbus/modbus/include/mbconfig.h
|
||||
components/freemodbus/modbus/include/mbframe.h
|
||||
components/freemodbus/modbus/include/mbfunc.h
|
||||
components/freemodbus/modbus/include/mbport.h
|
||||
components/freemodbus/modbus/include/mbproto.h
|
||||
components/freemodbus/modbus/include/mbutils.h
|
||||
components/freemodbus/modbus/mb.c
|
||||
components/freemodbus/modbus/mb_m.c
|
||||
components/freemodbus/modbus/rtu/mbcrc.c
|
||||
components/freemodbus/modbus/rtu/mbcrc.h
|
||||
components/freemodbus/modbus/rtu/mbrtu.c
|
||||
components/freemodbus/modbus/rtu/mbrtu.h
|
||||
components/freemodbus/modbus/rtu/mbrtu_m.c
|
||||
components/freemodbus/modbus/tcp/mbtcp.c
|
||||
components/freemodbus/modbus/tcp/mbtcp.h
|
||||
components/freemodbus/modbus/tcp/mbtcp_m.c
|
||||
components/freemodbus/modbus/tcp/mbtcp_m.h
|
||||
components/freemodbus/port/port.c
|
||||
components/freemodbus/port/port.h
|
||||
components/freemodbus/port/portevent.c
|
||||
components/freemodbus/port/portevent_m.c
|
||||
components/freemodbus/port/portother.c
|
||||
components/freemodbus/port/portother_m.c
|
||||
components/freemodbus/port/portserial.c
|
||||
components/freemodbus/port/portserial_m.c
|
||||
components/freemodbus/serial_master/modbus_controller/mbc_serial_master.c
|
||||
components/freemodbus/serial_master/modbus_controller/mbc_serial_master.h
|
||||
components/freemodbus/serial_master/port/port_serial_master.h
|
||||
components/freemodbus/serial_slave/modbus_controller/mbc_serial_slave.c
|
||||
components/freemodbus/serial_slave/modbus_controller/mbc_serial_slave.h
|
||||
components/freemodbus/serial_slave/port/port_serial_slave.h
|
||||
components/freemodbus/tcp_master/modbus_controller/mbc_tcp_master.c
|
||||
components/freemodbus/tcp_master/modbus_controller/mbc_tcp_master.h
|
||||
components/freemodbus/tcp_master/port/port_tcp_master.c
|
||||
components/freemodbus/tcp_master/port/port_tcp_master.h
|
||||
components/freemodbus/tcp_slave/modbus_controller/mbc_tcp_slave.c
|
||||
components/freemodbus/tcp_slave/modbus_controller/mbc_tcp_slave.h
|
||||
components/freemodbus/tcp_slave/port/port_tcp_slave.c
|
||||
components/freemodbus/tcp_slave/port/port_tcp_slave.h
|
||||
components/freertos/FreeRTOS-openocd.c
|
||||
components/freertos/croutine.c
|
||||
components/freertos/event_groups.c
|
||||
@ -3647,14 +3578,6 @@ examples/protocols/icmp_echo/example_test.py
|
||||
examples/protocols/icmp_echo/main/echo_example_main.c
|
||||
examples/protocols/mdns/main/mdns_example_main.c
|
||||
examples/protocols/mdns/mdns_example_test.py
|
||||
examples/protocols/modbus/mb_example_common/include/modbus_params.h
|
||||
examples/protocols/modbus/mb_example_common/modbus_params.c
|
||||
examples/protocols/modbus/serial/example_test.py
|
||||
examples/protocols/modbus/serial/mb_master/main/master.c
|
||||
examples/protocols/modbus/serial/mb_slave/main/slave.c
|
||||
examples/protocols/modbus/tcp/example_test.py
|
||||
examples/protocols/modbus/tcp/mb_tcp_master/main/tcp_master.c
|
||||
examples/protocols/modbus/tcp/mb_tcp_slave/main/tcp_slave.c
|
||||
examples/protocols/mqtt/ssl/main/app_main.c
|
||||
examples/protocols/mqtt/ssl/mqtt_ssl_example_test.py
|
||||
examples/protocols/mqtt/ssl_ds/configure_ds.py
|
||||
|
Loading…
x
Reference in New Issue
Block a user