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: 4443

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: 4443

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 ...
by dontpostalot
Mon Sep 27, 2021 8:41 am
Forum: ESP-IDF
Topic: regex + rtti
Replies: 0
Views: 1629

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 ...
by dontpostalot
Thu Sep 16, 2021 7:37 am
Forum: ESP32 Arduino
Topic: custom new/delete
Replies: 2
Views: 3260

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 ...
by dontpostalot
Wed Sep 15, 2021 1:11 pm
Forum: ESP32 Arduino
Topic: custom new/delete
Replies: 2
Views: 3260

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 ...

Go to advanced search