2025-03-25 2:11 AM
Hi
I Reported this for Improvement in STSW-ST25RFAL 3.0 source before.
Now STSW-ST25RFAL 4.0 is available but the following problems are not changed.
1) Add to rfal_analogConfig.h, rfal_crc.h, rfal_iso15693_2.h header files.
#if defined( __cplusplus )
extern "C" {
#endif
otherwise this file makes it difficult with C++
2) Add to rfal_analogConfig.h header files.
#if !defined( __cplusplus )
typedef struct {
uint8_t id[sizeof(rfalAnalogConfigId)];
rfalAnalogConfigNum num;
rfalAnalogConfigRegAddrMaskVal regSet[];
} rfalAnalogConfig;
#else
struct rfalAnalogConfig;
#endif
C++ can't handle an empty array regSet[] in a struct
2025-03-25 4:59 AM
Hi CanRF,
actually we have not concluded that it really is a good idea to spread these macros. IMO they don't hinder you from using the sources as you could
extern "C" {
#include "rfal_rf.h"
}
Spreading the proposed #defined(__cplusplus) would prevent the first use case.
BR, Ulysses