@@ -151,7 +151,7 @@ ATCA_STATUS hal_i2c_send(ATCAIface iface, uint8_t *txdata, int txlength)
151151
152152 txdata [0 ] = 0x3 ;
153153 txlength ++ ;
154- if (I2cMcuWriteBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , 0 , txdata , (size_t )txlength ) == 1 )
154+ if (I2cMcuWriteBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , txdata , (size_t )txlength ) == 1 )
155155 {
156156 return ATCA_SUCCESS ;
157157 }
@@ -179,7 +179,7 @@ ATCA_STATUS hal_i2c_receive(ATCAIface iface, uint8_t *rxdata, uint16_t *rxlength
179179 int retries = iface -> mIfaceCFG -> rx_retries ;
180180 while (-- retries > 0 && r != 1 )
181181 {
182- r = I2cMcuReadBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , 0 , lengthPackage , 1 );
182+ r = I2cMcuReadBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , lengthPackage , 1 );
183183 }
184184
185185 if (r != 1 )
@@ -202,7 +202,7 @@ ATCA_STATUS hal_i2c_receive(ATCAIface iface, uint8_t *rxdata, uint16_t *rxlength
202202 retries = iface -> mIfaceCFG -> rx_retries ;
203203 while (-- retries > 0 && r != 1 )
204204 {
205- r = I2cMcuReadBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , 0 , rxdata + 1 , bytesToRead );
205+ r = I2cMcuReadBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , rxdata + 1 , bytesToRead );
206206 }
207207
208208 if (r != 1 )
@@ -234,7 +234,7 @@ ATCA_STATUS hal_i2c_wake(ATCAIface iface)
234234{
235235 // 2. Send NULL buffer to address 0x0 (NACK)
236236 uint8_t emptybuff [1 ] = {0 };
237- int r = I2cMcuWriteBuffer ((I2c_t * )NULL , 0x00 , 0 , emptybuff , (size_t )0 );
237+ int r = I2cMcuWriteBuffer ((I2c_t * )NULL , 0x00 , emptybuff , (size_t )0 );
238238
239239 // 3. Wait for wake_delay
240240 atca_delay_us (iface -> mIfaceCFG -> wake_delay );
@@ -246,7 +246,7 @@ ATCA_STATUS hal_i2c_wake(ATCAIface iface)
246246 int retries = iface -> mIfaceCFG -> rx_retries ;
247247 while (-- retries > 0 && r != 1 )
248248 {
249- r = I2cMcuReadBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , 0 , rx_buffer , 4 );
249+ r = I2cMcuReadBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , rx_buffer , 4 );
250250 }
251251
252252 // 5. Set frequency back to requested one
@@ -272,7 +272,7 @@ ATCA_STATUS hal_i2c_wake(ATCAIface iface)
272272ATCA_STATUS hal_i2c_idle (ATCAIface iface )
273273{
274274 uint8_t buffer [1 ] = { 0x2 }; // idle word address value
275- I2cMcuWriteBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address ,0 , buffer , (size_t )1 );
275+ I2cMcuWriteBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , buffer , (size_t )1 );
276276 return ATCA_SUCCESS ;
277277}
278278
@@ -284,7 +284,7 @@ ATCA_STATUS hal_i2c_idle(ATCAIface iface)
284284ATCA_STATUS hal_i2c_sleep (ATCAIface iface )
285285{
286286 uint8_t buffer [1 ] = { 0x1 }; // sleep word address value
287- I2cMcuWriteBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address ,0 , buffer , (size_t )1 );
287+ I2cMcuWriteBuffer ((I2c_t * )NULL , iface -> mIfaceCFG -> atcai2c .slave_address , buffer , (size_t )1 );
288288 return ATCA_SUCCESS ;
289289}
290290
0 commit comments