mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +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:
@@ -35,7 +35,8 @@ class I2CData {
|
||||
int32_t RegisterWriteCallback(HAL_BufferCallback callback, void* param);
|
||||
void CancelWriteCallback(int32_t uid);
|
||||
|
||||
void Write(int32_t deviceAddress, uint8_t* dataToSend, int32_t sendSize);
|
||||
void Write(int32_t deviceAddress, const uint8_t* dataToSend,
|
||||
int32_t sendSize);
|
||||
void Read(int32_t deviceAddress, uint8_t* buffer, int32_t count);
|
||||
|
||||
void ResetData();
|
||||
|
||||
Reference in New Issue
Block a user