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
* Other Arduino cores uses a macro to redefine libc abs() to take any
type, meaning abs(-3.3) == 3.3 not the normal libc result of 3.
* 1e4bf14 (espressif#1783) replaced similar min, max macros with c++ stdlib. However
this change includes <algorithm> after the line which defines the abs() macro.
<algorithm> includes <cstdlib> which undefines abs() and re-defines it.
* This means abs() becomes the plain libc version again which only takes
integers, so abs(-3.3) == 3. As reported here:
espressif#3405
This fix tries to keep in the spirit of espressif#1783 by using libstdc++. The other
option would be to include <cstdlib> before defining the abs() macro, so it
doesn't get undef-ed again later on.
Environment
Problem Description
esp-idf/components/driver/spi_master.c
Line 1103 in 0d7f2d7
Shouldn't it be
SPI_CHECK(!((trans_desc->flags & (SPI_TRANS_MODE_DIO|SPI_TRANS_MODE_QIO)) && (handle->cfg.flags & SPI_DEVICE_HALFDUPLEX)), "incompatible iface params", ESP_ERR_INVALID_ARG);
?
The text was updated successfully, but these errors were encountered: