Lines Matching refs:rx_buf
48 static int scd4x_read_reg(const struct device *dev, uint8_t *rx_buf, uint8_t rx_buf_size) in scd4x_read_reg() argument
53 ret = i2c_read_dt(&cfg->bus, rx_buf, rx_buf_size); in scd4x_read_reg()
60 ret = scd4x_calc_crc(sys_get_be16(&rx_buf[i * 3])); in scd4x_read_reg()
61 if (ret != rx_buf[(i * 3) + 2]) { in scd4x_read_reg()
300 uint8_t rx_buf[3]; in scd4x_get_temperature_offset() local
308 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_temperature_offset()
317 temp = sys_get_be16(rx_buf) * SCD4X_MAX_TEMP; in scd4x_get_temperature_offset()
327 uint8_t rx_buf[3]; in scd4x_get_sensor_altitude() local
335 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_sensor_altitude()
341 val->val1 = sys_get_be16(rx_buf); in scd4x_get_sensor_altitude()
350 uint8_t rx_buf[3]; in scd4x_get_ambient_pressure() local
358 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_ambient_pressure()
364 val->val1 = sys_get_be16(rx_buf); in scd4x_get_ambient_pressure()
373 uint8_t rx_buf[3]; in scd4x_get_automatic_calib_enable() local
381 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_automatic_calib_enable()
387 val->val1 = sys_get_be16(rx_buf); in scd4x_get_automatic_calib_enable()
396 uint8_t rx_buf[3]; in scd4x_get_self_calib_initial_period() local
404 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_self_calib_initial_period()
410 val->val1 = sys_get_be16(rx_buf); in scd4x_get_self_calib_initial_period()
419 uint8_t rx_buf[3]; in scd4x_get_self_calib_standard_period() local
427 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_self_calib_standard_period()
433 val->val1 = sys_get_be16(rx_buf); in scd4x_get_self_calib_standard_period()
442 uint8_t rx_buf[3]; in scd4x_forced_recalibration() local
457 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_forced_recalibration()
463 *frc_correction = sys_get_be16(rx_buf); in scd4x_forced_recalibration()
485 uint8_t rx_buf[3]; in scd4x_self_test() local
499 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_self_test()
505 uint16_t is_malfunction = sys_get_be16(rx_buf); in scd4x_self_test()