5353#endif
5454</#if >
5555
56+ /** Define if the library is not to use malloc/free */
57+ <#if CAL_ENABLE_CHECK_PARAMS == false >
58+ <#lt >#define ATCA_CHECK_PARAMS_EN (FEATURE_DISABLED)
59+ <#else >
60+ <#lt >#define ATCA_CHECK_PARAMS_EN (FEATURE_ENABLED)
61+ </#if >
62+
5663/** Symmetric Commands Configurations */
5764
5865/* AES Command */
530537#define PLIB_I2C_TRANSFER_SETUP I2C_TRANSFER_SETUP
531538</#if >
532539
533- typedef bool (* atca_i2c_plib_read)( uint16_t, uint8_t *, ${size_var} );
534- typedef bool (* atca_i2c_plib_write)( uint16_t, uint8_t *, ${size_var} );
540+ typedef bool (* atca_i2c_plib_read)( uint16_t address , uint8_t * data , ${size_var} datalen );
541+ typedef bool (* atca_i2c_plib_write)( uint16_t address , uint8_t * data , ${size_var} datalen );
535542typedef bool (* atca_i2c_plib_is_busy)( void );
536543typedef PLIB_I2C_ERROR (* atca_i2c_error_get)( void );
537544typedef bool (* atca_i2c_plib_transfer_setup)(PLIB_I2C_TRANSFER_SETUP* setup, uint32_t srcClkFreq);
@@ -550,8 +557,8 @@ typedef struct atca_plib_i2c_api
550557
551558<#if plib_info[plib_info?size-1 ] == "spi">
552559<#if is_atca_plib_spi_exists == "False" >
553- typedef bool (* atca_spi_plib_read)( void * , size_t );
554- typedef bool (* atca_spi_plib_write)( void *, size_t );
560+ typedef bool (* atca_spi_plib_read)( void * data , size_t datalen );
561+ typedef bool (* atca_spi_plib_write)( void * data , size_t datalen );
555562typedef bool (* atca_spi_plib_is_busy)( void );
556563typedef void (* atca_spi_plib_select)(uint32_t pin, bool value);
557564
@@ -597,8 +604,8 @@ typedef struct atca_plib_spi_api
597604#define PLIB_SWI_EVENT USART_EVENT
598605</#if >
599606
600- typedef size_t (* atca_uart_plib_read)( uint8_t *, const size_t );
601- typedef size_t (* atca_uart_plib_write)( uint8_t *, const size_t );
607+ typedef size_t (* atca_uart_plib_read)( uint8_t * data , const size_t datalen );
608+ typedef size_t (* atca_uart_plib_write)( uint8_t * data , const size_t datalen );
602609typedef PLIB_SWI_ERROR (* atca_uart_error_get)( void );
603610typedef bool (* atca_uart_plib_serial_setup)(PLIB_SWI_SERIAL_SETUP* , uint32_t );
604611typedef size_t (* atca_uart_plib_readcount_get)( void );
0 commit comments