I'm trying to write my first wrapper but i'm not sure how to wrap the next part. It's an lcd shield with 4 buttons.
B4X:
/**
* Read the state of the 4 buttons.
* @return Bitmask with the 4 values: LSB - BUT1, MSB - BUT4
*/
uint8_t LCD16x2::readButtons(){
uint8_t buttons;
Wire.beginTransmission(ADDRESS);
Wire.write(GET_BUT);
Wire.endTransmission();
Wire.requestFrom((int)ADDRESS, 1);
while(Wire.available() > 0)
buttons = Wire.read();
return buttons;
}