Search found 5 matches

by dontpostalot
Fri May 06, 2022 9:48 am
Forum: ESP-IDF
Topic: CDC-ACM Usb Host with FTDI adapter
Replies: 4
Views: 3301

Re: CDC-ACM Usb Host with FTDI adapter

I haven't and it looks like that's exactly what I need. Thanks!
by dontpostalot
Fri May 06, 2022 9:25 am
Forum: ESP-IDF
Topic: CDC-ACM Usb Host with FTDI adapter
Replies: 4
Views: 3301

CDC-ACM Usb Host with FTDI adapter

Hi I'm trying to run the CDC-ACM Usb Host example with an FTDI RS485 adapter but my ESP32S2 fails to identify it as a serial device. The bDeviceClass, bDeviceSubClass and bDeviceProtocol fields of the device descriptor are all zero. Code to list some of the fields: usb_device_handle_t current_device...
by dontpostalot
Mon Sep 27, 2021 8:41 am
Forum: ESP-IDF
Topic: regex + rtti
Replies: 0
Views: 1398

regex + rtti

I get linker errors when I try to use regexes with rtti enabled (by adding "build_unflags = -fno-rtti" to platformio.ini). It does link without rtti. Here's the sketch: #include <Arduino.h> #include <regex> void setup() { Serial.begin(115200, SERIAL_8N1); } void loop() { std::regex reg("man"); if (s...
by dontpostalot
Thu Sep 16, 2021 7:37 am
Forum: ESP32 Arduino
Topic: custom new/delete
Replies: 2
Views: 2833

Re: custom new/delete

No, sizeof(size_t) equals sizeof(size_t*), 4 on the ESP32. I was thinking what if there's a 'new' running before my sketch and the memory is released with my custom delete, that would cause a corrupted heap. So I used the extra memory as a tag, turns out there are 5 objects getting deleted that were...
by dontpostalot
Wed Sep 15, 2021 1:11 pm
Forum: ESP32 Arduino
Topic: custom new/delete
Replies: 2
Views: 2833

custom new/delete

Hi, I' trying to override the new/delete operators to add some data to any dynamically allocated memory, like this: void * operator new(size_t size) { size_t* ret = (size_t*)malloc(size + sizeof(size_t*)); *ret = 0; ret++; return (void*)ret; } void operator delete(void * ptr) { size_t* ptrmem = (siz...