/* regAdress: Address of the register that has to be updated data: Byte that will be written to the register check: If this is true, register content will be read after writing to check if update was successful return: 0 if byte was written successfully or -1 on fail  */
int16_t writeByte(uint8_t regAddress, uint8_t data)
/* regAdress: Address of the register that has to be updated data: Byte that will be written to the register check: If this is true, register content will be read after writing to check if update was successful return: 0 if byte was written successfully or -1 on fail  */
int16_t writeByte(uint8_t regAddress, uint8_t data)
{
    if (sensor_i2c_write(&(dps310_ctx.i2c), regAddress, &data, 1,
                         AOS_WAIT_FOREVER) == 0) {
        return DPS310__SUCCEEDED;
    } else {
        return DPS310__FAIL_UNKNOWN;
    }
}