Here is it run again, but printing the parsed information 000007.974,I,BMP388,get_calib_data results: 00 DD 6A 51 49 F6 C9 00 1E F6 23 00 55 61 CA 77 F3 F6 A3 3F 16 000008.055,I,BMP388,get_calib_data parsed results: 000008.059,I,BMP388,dev->calib_data.reg_calib_data.par_p1: -13834 000008.063,I,BMP388,dev->calib_data.reg_calib_data.par_p2: 7680 000008.067,I,BMP388,dev->calib_data.reg_calib_data.par_p3: -10 000008.072,I,BMP388,dev->calib_data.reg_calib_data.par_p4: 35 000008.076,I,BMP388,dev->calib_data.reg_calib_data.par_p5: 21760 000008.080,I,BMP388,dev->calib_data.reg_calib_data.par_p6: 51809 000008.084,I,BMP388,dev->calib_data.reg_calib_data.par_p7: 119 000008.088,I,BMP388,dev->calib_data.reg_calib_data.par_p8: -13 000008.092,I,BMP388,dev->calib_data.reg_calib_data.par_p9: -23562 000008.096,I,BMP388,dev->calib_data.reg_calib_data.par_p10: 63 000008.100,I,BMP388,dev->calib_data.reg_calib_data.par_p11: 22 Code to produce this is: static int8_t get_calib_data(struct bmp3_dev *dev) { int8_t rslt; uint8_t reg_addr = BMP3_CALIB_DATA_ADDR; /* Array to store calibration data */ uint8_t calib_data[BMP3_CALIB_DATA_LEN] = { 0 }; /* Read the calibration data from the sensor */ rslt = bmp3_get_regs(reg_addr, calib_data, BMP3_CALIB_DATA_LEN, dev); LOG_C_INFO("BMP388", "get_calib_data results: "); for(int idx = 0; idx < BMP3_CALIB_DATA_LEN; idx++) { LOG_C_INFO_BASIC("%02X ", (unsigned int) calib_data[idx]); } LOG_C_INFO_BASIC("\n"); /* Parse calibration data and store it in device structure */ parse_calib_data(calib_data, dev); LOG_C_INFO("BMP388", "get_calib_data parsed results: "); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p1: %d", (int) dev->calib_data.reg_calib_data.par_p1); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p2: %d", (int) dev->calib_data.reg_calib_data.par_p2); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p3: %d", (int) dev->calib_data.reg_calib_data.par_p3); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p4: %d", (int) dev->calib_data.reg_calib_data.par_p4); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p5: %u", (int) dev->calib_data.reg_calib_data.par_p5); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p6: %u", (int) dev->calib_data.reg_calib_data.par_p6); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p7: %d", (int) dev->calib_data.reg_calib_data.par_p7); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p8: %d", (int) dev->calib_data.reg_calib_data.par_p8); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p9: %d", (int) dev->calib_data.reg_calib_data.par_p9); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p10: %d", (int) dev->calib_data.reg_calib_data.par_p10); LOG_C_INFO("BMP388", "dev->calib_data.reg_calib_data.par_p11: %d", (int) dev->calib_data.reg_calib_data.par_p11); return rslt; }
... View more