You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Utils.cpp
#include "Utils.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
void uxPortCompareSetCustom(volatile uint32_t *addr, uint32_t compare, uint32_t *set) {
uint32_t prev;
//BaseType_t taskState;
int taskState;
// Enter critical section to ensure atomicity
taskState = taskENTER_CRITICAL_FROM_ISR();
prev = *addr;
if (prev == compare) {
*addr = *set; // Update memory location with the new value
}
*set = prev; // Update the 'set' pointer with the previous value
// Exit critical section
taskEXIT_CRITICAL_FROM_ISR(taskState);
}
And IoAbstraction library required following modification
#include <Arduino.h>
void EspAnalogOutputMode::pinSetup() {
if(!isDac()) {
// for other than the dac ports, we need to set up PWM
ledcSetup(pwmChannel, pwmWidth, 8);
ledcAttachPin(pin, pwmChannel);
// ledcSetup(pwmChannel, pwmWidth, 8);
// ledcAttachPin(pin, pwmChannel);
ledcAttach(pin, pwmWidth, 8);
}
I hope you can implement this fixes to your project.
The text was updated successfully, but these errors were encountered:
I'm not sure why the port macro uxPortCompareSet from freertos/portmacro.h doesn't work to be honest, it should really be there as it's part of their core rtos implementation.
I think the ledc functions may be part of Arduino to be honest and they may need to be fully moved to use IDF functions instead.
We do plan to fully support IDF, but for now, you should be able to get uxPortCompareSet working with IDF, and you could just comment out the ledc functions if Arduino library is not there.
Hi,
I've build TcMenu with VSCode + ESP-IDF v5.1.3 for ESP32 an ST7735 1,8" TFT display.
To achieve it i changed this lines in TaskManagerIO and SimpleCollections lib
And IoAbstraction library required following modification
I hope you can implement this fixes to your project.
The text was updated successfully, but these errors were encountered: