mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
I2C: Provide byte[] JNI interfaces.
This avoids a direct byte buffer allocation on every read/write/transaction on the byte[] variants. Changes HAL I2C interfaces to use const for dataToSend.
This commit is contained in:
@@ -17,10 +17,10 @@ extern "C" {
|
||||
|
||||
void HAL_InitializeI2C(HAL_I2CPort port, int32_t* status);
|
||||
int32_t HAL_TransactionI2C(HAL_I2CPort port, int32_t deviceAddress,
|
||||
uint8_t* dataToSend, int32_t sendSize,
|
||||
const uint8_t* dataToSend, int32_t sendSize,
|
||||
uint8_t* dataReceived, int32_t receiveSize);
|
||||
int32_t HAL_WriteI2C(HAL_I2CPort port, int32_t deviceAddress,
|
||||
uint8_t* dataToSend, int32_t sendSize);
|
||||
const uint8_t* dataToSend, int32_t sendSize);
|
||||
int32_t HAL_ReadI2C(HAL_I2CPort port, int32_t deviceAddress, uint8_t* buffer,
|
||||
int32_t count);
|
||||
void HAL_CloseI2C(HAL_I2CPort port);
|
||||
|
||||
Reference in New Issue
Block a user