cancel
Showing results for 
Search instead for 
Did you mean: 

Improvement in STSW-ST25RFAL 3.0 source

CanRF
Associate II

Hi

We think the following impotentes should be done in STSW-ST25RFAL 3.0 source

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

 

3) Add to st25r3916_aat.c source files.

#include <stdlib.h>

This file use abs().

In most compiler abs() is declared in stdlib.h or math.h

 

4) replace "string.h" with <string.h> in st25r95_com.c, st25r95_com_spi.c, st25r95_com_uart.c

C library Headerfile should included with <> instead ""

 

3 REPLIES 3
Brian TIDAL
ST Employee

Hi,

thanks for your feedback. Improvements for C++ 1) and 2) have been submitted to development team.

For 3), <math.h> and <stdlib.h> are both included in rfal_platform.h that is included in st25r3916_aat.c. Can you provide more information on why you need to include <stdlib.h> on your side.

For 4), <string.h> is not needed in those files and therefore "string.h" has been removed.

Rgds

BT

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi,

3)

In STSW-ST25RFAL 3.0 I did'nt find a rfal_platform.h. In STSW-ST25R_1.6.0 are in every project a rfal_platform.h. But not all of them has got an include of <stdlib.h>. So I take the wrong file for my project.

I will add <stdlib.h> to my rfal_platform.h.

 

4)

I will remove string.h too

Thanks für support

Hi,

for 3), I see your point and therefore it would be better to have <stdlib.h>  being included in st25r3916_aat.c. I will submit this to the development team.

Thanks for your feedback,

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.