Home
last modified time | relevance | path

Searched refs:buff (Results 1 – 25 of 137) sorted by relevance

123456

/hal_st-3.4.0/sensor/stmemsc/iis2mdc_STdC/driver/
Diis2mdc_reg.c130 uint8_t buff[6]; in iis2mdc_mag_user_offset_set() local
133 buff[1] = (uint8_t)((uint16_t)val[0] / 256U); in iis2mdc_mag_user_offset_set()
134 buff[0] = (uint8_t)((uint16_t)val[0] - (buff[1] * 256U)); in iis2mdc_mag_user_offset_set()
135 buff[3] = (uint8_t)((uint16_t)val[1] / 256U); in iis2mdc_mag_user_offset_set()
136 buff[2] = (uint8_t)((uint16_t)val[1] - (buff[3] * 256U)); in iis2mdc_mag_user_offset_set()
137 buff[5] = (uint8_t)((uint16_t)val[2] / 256U); in iis2mdc_mag_user_offset_set()
138 buff[4] = (uint8_t)((uint16_t)val[2] - (buff[5] * 256U)); in iis2mdc_mag_user_offset_set()
139 ret = iis2mdc_write_reg(ctx, IIS2MDC_OFFSET_X_REG_L, buff, 6); in iis2mdc_mag_user_offset_set()
159 uint8_t buff[6]; in iis2mdc_mag_user_offset_get() local
162 ret = iis2mdc_read_reg(ctx, IIS2MDC_OFFSET_X_REG_L, buff, 6); in iis2mdc_mag_user_offset_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lis2mdl_STdC/driver/
Dlis2mdl_reg.c129 uint8_t buff[6]; in lis2mdl_mag_user_offset_set() local
132 buff[1] = (uint8_t)((uint16_t)val[0] / 256U); in lis2mdl_mag_user_offset_set()
133 buff[0] = (uint8_t)((uint16_t)val[0] - (buff[1] * 256U)); in lis2mdl_mag_user_offset_set()
134 buff[3] = (uint8_t)((uint16_t)val[1] / 256U); in lis2mdl_mag_user_offset_set()
135 buff[2] = (uint8_t)((uint16_t)val[1] - (buff[3] * 256U)); in lis2mdl_mag_user_offset_set()
136 buff[5] = (uint8_t)((uint16_t)val[2] / 256U); in lis2mdl_mag_user_offset_set()
137 buff[4] = (uint8_t)((uint16_t)val[2] - (buff[5] * 256U)); in lis2mdl_mag_user_offset_set()
138 ret = lis2mdl_write_reg(ctx, LIS2MDL_OFFSET_X_REG_L, buff, 6); in lis2mdl_mag_user_offset_set()
157 uint8_t buff[6]; in lis2mdl_mag_user_offset_get() local
160 ret = lis2mdl_read_reg(ctx, LIS2MDL_OFFSET_X_REG_L, buff, 6); in lis2mdl_mag_user_offset_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/asm330lhhx_STdC/driver/
Dasm330lhhx_reg.c1240 int32_t asm330lhhx_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) in asm330lhhx_xl_usr_offset_x_set() argument
1243 ret = asm330lhhx_write_reg(ctx, ASM330LHHX_X_OFS_USR, buff, 1); in asm330lhhx_xl_usr_offset_x_set()
1257 int32_t asm330lhhx_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) in asm330lhhx_xl_usr_offset_x_get() argument
1260 ret = asm330lhhx_read_reg(ctx, ASM330LHHX_X_OFS_USR, buff, 1); in asm330lhhx_xl_usr_offset_x_get()
1274 int32_t asm330lhhx_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) in asm330lhhx_xl_usr_offset_y_set() argument
1277 ret = asm330lhhx_write_reg(ctx, ASM330LHHX_Y_OFS_USR, buff, 1); in asm330lhhx_xl_usr_offset_y_set()
1291 int32_t asm330lhhx_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) in asm330lhhx_xl_usr_offset_y_get() argument
1294 ret = asm330lhhx_read_reg(ctx, ASM330LHHX_Y_OFS_USR, buff, 1); in asm330lhhx_xl_usr_offset_y_get()
1308 int32_t asm330lhhx_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) in asm330lhhx_xl_usr_offset_z_set() argument
1311 ret = asm330lhhx_write_reg(ctx, ASM330LHHX_Z_OFS_USR, buff, 1); in asm330lhhx_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/stts751_STdC/driver/
Dstts751_reg.c388 uint8_t buff[2]; in stts751_temperature_raw_get() local
392 (uint8_t *)&buff[1], 1); in stts751_temperature_raw_get()
397 &buff[0], 1); in stts751_temperature_raw_get()
398 *val = (int16_t)buff[1]; in stts751_temperature_raw_get()
399 *val = (*val * 256) + (int16_t)buff[0]; in stts751_temperature_raw_get()
484 uint8_t buff[2]; in stts751_high_temperature_threshold_set() local
487 buff[0] = (uint8_t)((uint16_t)val / 256U); in stts751_high_temperature_threshold_set()
488 buff[1] = (uint8_t)((uint16_t)val - (buff[1] * 256U)); in stts751_high_temperature_threshold_set()
490 buff, 2); in stts751_high_temperature_threshold_set()
506 uint8_t buff[2]; in stts751_high_temperature_threshold_get() local
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps22ch_STdC/driver/
Dlps22ch_reg.c472 uint8_t buff[2]; in lps22ch_pressure_ref_set() local
475 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps22ch_pressure_ref_set()
476 buff[0] = (uint8_t)((uint16_t)val - (buff[1] * 256U)); in lps22ch_pressure_ref_set()
477 ret = lps22ch_write_reg(ctx, LPS22CH_REF_P_L, buff, 2); in lps22ch_pressure_ref_set()
495 uint8_t buff[2]; in lps22ch_pressure_ref_get() local
498 ret = lps22ch_read_reg(ctx, LPS22CH_REF_P_L, buff, 2); in lps22ch_pressure_ref_get()
499 *val = (int16_t)buff[1]; in lps22ch_pressure_ref_get()
500 *val = (*val * 256) + (int16_t)buff[0]; in lps22ch_pressure_ref_get()
517 uint8_t buff[2]; in lps22ch_pressure_offset_set() local
520 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps22ch_pressure_offset_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dso32_STdC/driver/
Dlsm6dso32_reg.c925 uint8_t *buff) in lsm6dso32_xl_usr_offset_x_set() argument
929 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_X_OFS_USR, buff, 1); in lsm6dso32_xl_usr_offset_x_set()
945 uint8_t *buff) in lsm6dso32_xl_usr_offset_x_get() argument
949 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_X_OFS_USR, buff, 1); in lsm6dso32_xl_usr_offset_x_get()
965 uint8_t *buff) in lsm6dso32_xl_usr_offset_y_set() argument
969 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_Y_OFS_USR, buff, 1); in lsm6dso32_xl_usr_offset_y_set()
985 uint8_t *buff) in lsm6dso32_xl_usr_offset_y_get() argument
989 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_Y_OFS_USR, buff, 1); in lsm6dso32_xl_usr_offset_y_get()
1005 uint8_t *buff) in lsm6dso32_xl_usr_offset_z_set() argument
1009 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_Z_OFS_USR, buff, 1); in lsm6dso32_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps27hhtw_STdC/driver/
Dlps27hhtw_reg.c497 uint8_t buff[2]; in lps27hhtw_pressure_ref_set() local
500 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps27hhtw_pressure_ref_set()
501 buff[0] = (uint8_t)((uint16_t)val - (buff[1] * 256U)); in lps27hhtw_pressure_ref_set()
502 ret = lps27hhtw_write_reg(ctx, LPS27HHTW_REF_P_L, buff, 2); in lps27hhtw_pressure_ref_set()
520 uint8_t buff[2]; in lps27hhtw_pressure_ref_get() local
523 ret = lps27hhtw_read_reg(ctx, LPS27HHTW_REF_P_L, buff, 2); in lps27hhtw_pressure_ref_get()
524 *val = (int16_t)buff[1]; in lps27hhtw_pressure_ref_get()
525 *val = (*val * 256) + (int16_t)buff[0]; in lps27hhtw_pressure_ref_get()
542 uint8_t buff[2]; in lps27hhtw_pressure_offset_set() local
545 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps27hhtw_pressure_offset_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps27hhw_STdC/driver/
Dlps27hhw_reg.c485 uint8_t buff[2]; in lps27hhw_pressure_ref_set() local
488 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps27hhw_pressure_ref_set()
489 buff[0] = (uint8_t)((uint16_t)val - (buff[1] * 256U)); in lps27hhw_pressure_ref_set()
490 ret = lps27hhw_write_reg(ctx, LPS27HHW_REF_P_L, buff, 2); in lps27hhw_pressure_ref_set()
508 uint8_t buff[2]; in lps27hhw_pressure_ref_get() local
511 ret = lps27hhw_read_reg(ctx, LPS27HHW_REF_P_L, buff, 2); in lps27hhw_pressure_ref_get()
512 *val = (int16_t)buff[1]; in lps27hhw_pressure_ref_get()
513 *val = (*val * 256) + (int16_t)buff[0]; in lps27hhw_pressure_ref_get()
530 uint8_t buff[2]; in lps27hhw_pressure_offset_set() local
533 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps27hhw_pressure_offset_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dsv_STdC/driver/
Dlsm6dsv_reg.c1690 uint8_t buff[7]; in lsm6dsv_all_sources_get() local
1702 ret = lsm6dsv_read_reg(ctx, LSM6DSV_FIFO_STATUS1, (uint8_t *)&buff, 4); in lsm6dsv_all_sources_get()
1704 bytecpy((uint8_t *)&fifo_status2, &buff[1]); in lsm6dsv_all_sources_get()
1705 bytecpy((uint8_t *)&all_int_src, &buff[2]); in lsm6dsv_all_sources_get()
1706 bytecpy((uint8_t *)&status_reg, &buff[3]); in lsm6dsv_all_sources_get()
1736 ret = lsm6dsv_read_reg(ctx, LSM6DSV_UI_STATUS_REG_OIS, (uint8_t *)&buff, 7); in lsm6dsv_all_sources_get()
1739 bytecpy((uint8_t *)&status_reg_ois, &buff[0]); in lsm6dsv_all_sources_get()
1740 bytecpy((uint8_t *)&wake_up_src, &buff[1]); in lsm6dsv_all_sources_get()
1741 bytecpy((uint8_t *)&tap_src, &buff[2]); in lsm6dsv_all_sources_get()
1742 bytecpy((uint8_t *)&d6d_src, &buff[3]); in lsm6dsv_all_sources_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps22hh_STdC/driver/
Dlps22hh_reg.c472 uint8_t buff[2]; in lps22hh_pressure_ref_set() local
475 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps22hh_pressure_ref_set()
476 buff[0] = (uint8_t)((uint16_t)val - (buff[1] * 256U)); in lps22hh_pressure_ref_set()
477 ret = lps22hh_write_reg(ctx, LPS22HH_REF_P_L, buff, 2); in lps22hh_pressure_ref_set()
495 uint8_t buff[2]; in lps22hh_pressure_ref_get() local
498 ret = lps22hh_read_reg(ctx, LPS22HH_REF_P_L, buff, 2); in lps22hh_pressure_ref_get()
499 *val = (int16_t)buff[1]; in lps22hh_pressure_ref_get()
500 *val = (*val * 256) + (int16_t)buff[0]; in lps22hh_pressure_ref_get()
517 uint8_t buff[2]; in lps22hh_pressure_offset_set() local
520 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps22hh_pressure_offset_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/ism330dhcx_STdC/driver/
Dism330dhcx_reg.c1354 uint8_t *buff) in ism330dhcx_xl_usr_offset_x_set() argument
1357 ret = ism330dhcx_write_reg(ctx, ISM330DHCX_X_OFS_USR, buff, 1); in ism330dhcx_xl_usr_offset_x_set()
1373 uint8_t *buff) in ism330dhcx_xl_usr_offset_x_get() argument
1376 ret = ism330dhcx_read_reg(ctx, ISM330DHCX_X_OFS_USR, buff, 1); in ism330dhcx_xl_usr_offset_x_get()
1392 uint8_t *buff) in ism330dhcx_xl_usr_offset_y_set() argument
1395 ret = ism330dhcx_write_reg(ctx, ISM330DHCX_Y_OFS_USR, buff, 1); in ism330dhcx_xl_usr_offset_y_set()
1411 uint8_t *buff) in ism330dhcx_xl_usr_offset_y_get() argument
1414 ret = ism330dhcx_read_reg(ctx, ISM330DHCX_Y_OFS_USR, buff, 1); in ism330dhcx_xl_usr_offset_y_get()
1430 uint8_t *buff) in ism330dhcx_xl_usr_offset_z_set() argument
1433 ret = ism330dhcx_write_reg(ctx, ISM330DHCX_Z_OFS_USR, buff, 1); in ism330dhcx_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dsr_STdC/driver/
Dlsm6dsr_reg.c1138 int32_t lsm6dsr_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsr_xl_usr_offset_x_set() argument
1142 ret = lsm6dsr_write_reg(ctx, LSM6DSR_X_OFS_USR, buff, 1); in lsm6dsr_xl_usr_offset_x_set()
1157 int32_t lsm6dsr_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsr_xl_usr_offset_x_get() argument
1161 ret = lsm6dsr_read_reg(ctx, LSM6DSR_X_OFS_USR, buff, 1); in lsm6dsr_xl_usr_offset_x_get()
1176 int32_t lsm6dsr_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsr_xl_usr_offset_y_set() argument
1180 ret = lsm6dsr_write_reg(ctx, LSM6DSR_Y_OFS_USR, buff, 1); in lsm6dsr_xl_usr_offset_y_set()
1195 int32_t lsm6dsr_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsr_xl_usr_offset_y_get() argument
1199 ret = lsm6dsr_read_reg(ctx, LSM6DSR_Y_OFS_USR, buff, 1); in lsm6dsr_xl_usr_offset_y_get()
1214 int32_t lsm6dsr_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsr_xl_usr_offset_z_set() argument
1218 ret = lsm6dsr_write_reg(ctx, LSM6DSR_Z_OFS_USR, buff, 1); in lsm6dsr_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dsrx_STdC/driver/
Dlsm6dsrx_reg.c1359 int32_t lsm6dsrx_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsrx_xl_usr_offset_x_set() argument
1363 ret = lsm6dsrx_write_reg(ctx, LSM6DSRX_X_OFS_USR, buff, 1); in lsm6dsrx_xl_usr_offset_x_set()
1378 int32_t lsm6dsrx_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsrx_xl_usr_offset_x_get() argument
1382 ret = lsm6dsrx_read_reg(ctx, LSM6DSRX_X_OFS_USR, buff, 1); in lsm6dsrx_xl_usr_offset_x_get()
1397 int32_t lsm6dsrx_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsrx_xl_usr_offset_y_set() argument
1401 ret = lsm6dsrx_write_reg(ctx, LSM6DSRX_Y_OFS_USR, buff, 1); in lsm6dsrx_xl_usr_offset_y_set()
1416 int32_t lsm6dsrx_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsrx_xl_usr_offset_y_get() argument
1420 ret = lsm6dsrx_read_reg(ctx, LSM6DSRX_Y_OFS_USR, buff, 1); in lsm6dsrx_xl_usr_offset_y_get()
1435 int32_t lsm6dsrx_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsrx_xl_usr_offset_z_set() argument
1439 ret = lsm6dsrx_write_reg(ctx, LSM6DSRX_Z_OFS_USR, buff, 1); in lsm6dsrx_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps25hb_STdC/driver/
Dlps25hb_reg.c126 uint8_t buff[3]; in lps25hb_pressure_ref_set() local
129 buff[2] = (uint8_t)((uint32_t)val / 65536U); in lps25hb_pressure_ref_set()
130 buff[1] = (uint8_t)((uint32_t)val - (buff[2] * 65536U)) / 256U; in lps25hb_pressure_ref_set()
131 buff[0] = (uint8_t)((uint32_t)val - (buff[2] * 65536U) - in lps25hb_pressure_ref_set()
132 (buff[1] * 256U)); in lps25hb_pressure_ref_set()
133 ret = lps25hb_read_reg(ctx, LPS25HB_REF_P_XL, buff, 3); in lps25hb_pressure_ref_set()
150 uint8_t buff[3]; in lps25hb_pressure_ref_get() local
153 ret = lps25hb_read_reg(ctx, LPS25HB_REF_P_XL, buff, 3); in lps25hb_pressure_ref_get()
154 *val = (int32_t)buff[2]; in lps25hb_pressure_ref_get()
155 *val = (*val * 256) + (int32_t)buff[1]; in lps25hb_pressure_ref_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps33w_STdC/driver/
Dlps33w_reg.c533 uint8_t buff[3]; in lps33w_pressure_ref_set() local
536 buff[2] = (uint8_t)((uint32_t)val / 65536U); in lps33w_pressure_ref_set()
537 buff[1] = (uint8_t)((uint32_t)val - (buff[2] * 65536U)) / 256U; in lps33w_pressure_ref_set()
538 buff[0] = (uint8_t)((uint32_t)val - (buff[2] * 65536U) - in lps33w_pressure_ref_set()
539 (buff[1] * 256U)); in lps33w_pressure_ref_set()
540 ret = lps33w_write_reg(ctx, LPS33W_REF_P_XL, buff, 3); in lps33w_pressure_ref_set()
557 uint8_t buff[3]; in lps33w_pressure_ref_get() local
560 ret = lps33w_read_reg(ctx, LPS33W_REF_P_XL, buff, 3); in lps33w_pressure_ref_get()
561 *val = (int32_t)buff[2]; in lps33w_pressure_ref_get()
562 *val = (*val * 256) + (int32_t)buff[1]; in lps33w_pressure_ref_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps33hw_STdC/driver/
Dlps33hw_reg.c535 uint8_t buff[3]; in lps33hw_pressure_ref_set() local
538 buff[2] = (uint8_t)((uint32_t)val / 65536U); in lps33hw_pressure_ref_set()
539 buff[1] = (uint8_t)((uint32_t)val - (buff[2] * 65536U)) / 256U; in lps33hw_pressure_ref_set()
540 buff[0] = (uint8_t)((uint32_t)val - (buff[2] * 65536U) - in lps33hw_pressure_ref_set()
541 (buff[1] * 256U)); in lps33hw_pressure_ref_set()
542 ret = lps33hw_write_reg(ctx, LPS33HW_REF_P_XL, buff, 3); in lps33hw_pressure_ref_set()
559 uint8_t buff[3]; in lps33hw_pressure_ref_get() local
562 ret = lps33hw_read_reg(ctx, LPS33HW_REF_P_XL, buff, 3); in lps33hw_pressure_ref_get()
563 *val = (int32_t)buff[2]; in lps33hw_pressure_ref_get()
564 *val = (*val * 256) + (int32_t)buff[1]; in lps33hw_pressure_ref_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps22hb_STdC/driver/
Dlps22hb_reg.c535 uint8_t buff[3]; in lps22hb_pressure_ref_set() local
538 buff[2] = (uint8_t)((uint32_t)val / 65536U); in lps22hb_pressure_ref_set()
539 buff[1] = (uint8_t)((uint32_t)val - (buff[2] * 65536U)) / 256U; in lps22hb_pressure_ref_set()
540 buff[0] = (uint8_t)((uint32_t)val - (buff[2] * 65536U) - in lps22hb_pressure_ref_set()
541 (buff[1] * 256U)); in lps22hb_pressure_ref_set()
542 ret = lps22hb_write_reg(ctx, LPS22HB_REF_P_XL, buff, 3); in lps22hb_pressure_ref_set()
559 uint8_t buff[3]; in lps22hb_pressure_ref_get() local
562 ret = lps22hb_read_reg(ctx, LPS22HB_REF_P_XL, buff, 3); in lps22hb_pressure_ref_get()
563 *val = (int32_t)buff[2]; in lps22hb_pressure_ref_get()
564 *val = (*val * 256) + (int32_t)buff[1]; in lps22hb_pressure_ref_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dsv16x_STdC/driver/
Dlsm6dsv16x_reg.c2004 uint8_t buff[8]; in lsm6dsv16x_all_sources_get() local
2016 ret = lsm6dsv16x_read_reg(ctx, LSM6DSV16X_FIFO_STATUS1, (uint8_t *)&buff, 4); in lsm6dsv16x_all_sources_get()
2018 bytecpy((uint8_t *)&fifo_status2, &buff[1]); in lsm6dsv16x_all_sources_get()
2019 bytecpy((uint8_t *)&all_int_src, &buff[2]); in lsm6dsv16x_all_sources_get()
2020 bytecpy((uint8_t *)&status_reg, &buff[3]); in lsm6dsv16x_all_sources_get()
2051 ret = lsm6dsv16x_read_reg(ctx, LSM6DSV16X_UI_STATUS_REG_OIS, (uint8_t *)&buff, 8); in lsm6dsv16x_all_sources_get()
2054 bytecpy((uint8_t *)&status_reg_ois, &buff[0]); in lsm6dsv16x_all_sources_get()
2055 bytecpy((uint8_t *)&wake_up_src, &buff[1]); in lsm6dsv16x_all_sources_get()
2056 bytecpy((uint8_t *)&tap_src, &buff[2]); in lsm6dsv16x_all_sources_get()
2057 bytecpy((uint8_t *)&d6d_src, &buff[3]); in lsm6dsv16x_all_sources_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lps33k_STdC/driver/
Dlps33k_reg.c347 uint8_t buff[2]; in lps33k_pressure_offset_set() local
350 buff[1] = (uint8_t)((uint16_t)val / 256U); in lps33k_pressure_offset_set()
351 buff[0] = (uint8_t)((uint16_t)val - (buff[1] * 256U)); in lps33k_pressure_offset_set()
352 ret = lps33k_write_reg(ctx, LPS33K_RPDS_L, buff, 2); in lps33k_pressure_offset_set()
368 uint8_t buff[2]; in lps33k_pressure_offset_get() local
371 ret = lps33k_read_reg(ctx, LPS33K_RPDS_L, buff, 2); in lps33k_pressure_offset_get()
372 *val = (int16_t)buff[1]; in lps33k_pressure_offset_get()
373 *val = (*val * 256) + (int16_t)buff[0]; in lps33k_pressure_offset_get()
462 int32_t lps33k_pressure_raw_get(stmdev_ctx_t *ctx, uint32_t *buff) in lps33k_pressure_raw_get() argument
468 *buff = reg[2]; in lps33k_pressure_raw_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dso32x_STdC/driver/
Dlsm6dso32x_reg.c1302 int32_t lsm6dso32x_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso32x_xl_usr_offset_x_set() argument
1306 ret = lsm6dso32x_write_reg(ctx, LSM6DSO32X_X_OFS_USR, buff, 1); in lsm6dso32x_xl_usr_offset_x_set()
1321 int32_t lsm6dso32x_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso32x_xl_usr_offset_x_get() argument
1325 ret = lsm6dso32x_read_reg(ctx, LSM6DSO32X_X_OFS_USR, buff, 1); in lsm6dso32x_xl_usr_offset_x_get()
1340 int32_t lsm6dso32x_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso32x_xl_usr_offset_y_set() argument
1344 ret = lsm6dso32x_write_reg(ctx, LSM6DSO32X_Y_OFS_USR, buff, 1); in lsm6dso32x_xl_usr_offset_y_set()
1359 int32_t lsm6dso32x_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso32x_xl_usr_offset_y_get() argument
1363 ret = lsm6dso32x_read_reg(ctx, LSM6DSO32X_Y_OFS_USR, buff, 1); in lsm6dso32x_xl_usr_offset_y_get()
1378 int32_t lsm6dso32x_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso32x_xl_usr_offset_z_set() argument
1382 ret = lsm6dso32x_write_reg(ctx, LSM6DSO32X_Z_OFS_USR, buff, 1); in lsm6dso32x_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dsox_STdC/driver/
Dlsm6dsox_reg.c1307 int32_t lsm6dsox_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsox_xl_usr_offset_x_set() argument
1311 ret = lsm6dsox_write_reg(ctx, LSM6DSOX_X_OFS_USR, buff, 1); in lsm6dsox_xl_usr_offset_x_set()
1326 int32_t lsm6dsox_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsox_xl_usr_offset_x_get() argument
1330 ret = lsm6dsox_read_reg(ctx, LSM6DSOX_X_OFS_USR, buff, 1); in lsm6dsox_xl_usr_offset_x_get()
1345 int32_t lsm6dsox_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsox_xl_usr_offset_y_set() argument
1349 ret = lsm6dsox_write_reg(ctx, LSM6DSOX_Y_OFS_USR, buff, 1); in lsm6dsox_xl_usr_offset_y_set()
1364 int32_t lsm6dsox_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsox_xl_usr_offset_y_get() argument
1368 ret = lsm6dsox_read_reg(ctx, LSM6DSOX_Y_OFS_USR, buff, 1); in lsm6dsox_xl_usr_offset_y_get()
1383 int32_t lsm6dsox_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dsox_xl_usr_offset_z_set() argument
1387 ret = lsm6dsox_write_reg(ctx, LSM6DSOX_Z_OFS_USR, buff, 1); in lsm6dsox_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm303agr_STdC/driver/
Dlsm303agr_reg.c194 uint8_t *buff) in lsm303agr_temp_status_reg_get() argument
198 ret = lsm303agr_read_reg(ctx, LSM303AGR_STATUS_REG_AUX_A, buff, 1); in lsm303agr_temp_status_reg_get()
253 uint8_t buff[2]; in lsm303agr_temperature_raw_get() local
256 ret = lsm303agr_read_reg(ctx, LSM303AGR_OUT_TEMP_L_A, buff, 2); in lsm303agr_temperature_raw_get()
257 val[0] = (int16_t)buff[1]; in lsm303agr_temperature_raw_get()
258 val[0] = (val[0] * 256) + (int16_t)buff[0]; in lsm303agr_temperature_raw_get()
855 uint8_t *buff) in lsm303agr_xl_filter_reference_set() argument
859 ret = lsm303agr_write_reg(ctx, LSM303AGR_REFERENCE_A, buff, 1); in lsm303agr_xl_filter_reference_set()
874 uint8_t *buff) in lsm303agr_xl_filter_reference_get() argument
878 ret = lsm303agr_read_reg(ctx, LSM303AGR_REFERENCE_A, buff, 1); in lsm303agr_xl_filter_reference_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dso_STdC/driver/
Dlsm6dso_reg.c1088 int32_t lsm6dso_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso_xl_usr_offset_x_set() argument
1092 ret = lsm6dso_write_reg(ctx, LSM6DSO_X_OFS_USR, buff, 1); in lsm6dso_xl_usr_offset_x_set()
1107 int32_t lsm6dso_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso_xl_usr_offset_x_get() argument
1111 ret = lsm6dso_read_reg(ctx, LSM6DSO_X_OFS_USR, buff, 1); in lsm6dso_xl_usr_offset_x_get()
1126 int32_t lsm6dso_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso_xl_usr_offset_y_set() argument
1130 ret = lsm6dso_write_reg(ctx, LSM6DSO_Y_OFS_USR, buff, 1); in lsm6dso_xl_usr_offset_y_set()
1145 int32_t lsm6dso_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso_xl_usr_offset_y_get() argument
1149 ret = lsm6dso_read_reg(ctx, LSM6DSO_Y_OFS_USR, buff, 1); in lsm6dso_xl_usr_offset_y_get()
1164 int32_t lsm6dso_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) in lsm6dso_xl_usr_offset_z_set() argument
1168 ret = lsm6dso_write_reg(ctx, LSM6DSO_Z_OFS_USR, buff, 1); in lsm6dso_xl_usr_offset_z_set()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dsv16bx_STdC/driver/
Dlsm6dsv16bx_reg.c1152 uint8_t buff[7]; in lsm6dsv16bx_all_sources_get() local
1164 ret = lsm6dsv16bx_read_reg(ctx, LSM6DSV16BX_FIFO_STATUS1, (uint8_t *)&buff, 4); in lsm6dsv16bx_all_sources_get()
1166 bytecpy((uint8_t *)&fifo_status2, &buff[1]); in lsm6dsv16bx_all_sources_get()
1167 bytecpy((uint8_t *)&all_int_src, &buff[2]); in lsm6dsv16bx_all_sources_get()
1168 bytecpy((uint8_t *)&status_reg, &buff[3]); in lsm6dsv16bx_all_sources_get()
1197 ret = lsm6dsv16bx_read_reg(ctx, LSM6DSV16BX_WAKE_UP_SRC, (uint8_t *)&buff, 7); in lsm6dsv16bx_all_sources_get()
1202 bytecpy((uint8_t *)&wake_up_src, &buff[0]); in lsm6dsv16bx_all_sources_get()
1203 bytecpy((uint8_t *)&tap_src, &buff[1]); in lsm6dsv16bx_all_sources_get()
1204 bytecpy((uint8_t *)&d6d_src, &buff[2]); in lsm6dsv16bx_all_sources_get()
1205 bytecpy((uint8_t *)&emb_func_status_mainpage, &buff[4]); in lsm6dsv16bx_all_sources_get()
[all …]
/hal_st-3.4.0/sensor/stmemsc/lsm6dso16is_STdC/driver/
Dlsm6dso16is_reg.c1458 uint8_t buff[4]; in lsm6dso16is_timestamp_raw_get() local
1461 ret = lsm6dso16is_read_reg(ctx, LSM6DSO16IS_TIMESTAMP0, &buff[0], 4); in lsm6dso16is_timestamp_raw_get()
1463 *val = (uint32_t)buff[3]; in lsm6dso16is_timestamp_raw_get()
1464 *val = (*val * 256U) + (uint32_t)buff[2]; in lsm6dso16is_timestamp_raw_get()
1465 *val = (*val * 256U) + (uint32_t)buff[1]; in lsm6dso16is_timestamp_raw_get()
1466 *val = (*val * 256U) + (uint32_t)buff[0]; in lsm6dso16is_timestamp_raw_get()
1607 uint8_t buff[2]; in lsm6dso16is_temperature_raw_get() local
1610 ret = lsm6dso16is_read_reg(ctx, LSM6DSO16IS_OUT_TEMP_L, &buff[0], 2); in lsm6dso16is_temperature_raw_get()
1611 *val = (int16_t)buff[1]; in lsm6dso16is_temperature_raw_get()
1612 *val = (*val * 256) + (int16_t)buff[0]; in lsm6dso16is_temperature_raw_get()
[all …]

123456