@@ -2177,6 +2177,26 @@ ISM330DHCXStatusTypeDef ISM330DHCXSensor::FIFO_ACC_Get_Axes(int32_t *Acceleratio
21772177 return ISM330DHCX_OK;
21782178}
21792179
2180+ /* *
2181+ * @brief Get the ISM330DHCX FIFO accelero single sample (16-bit data per 3 axes) raw data
2182+ * @param Acceleration FIFO accelerometer raw axes reading
2183+ * @retval 0 in case of success, an error code otherwise
2184+ */
2185+ ISM330DHCXStatusTypeDef ISM330DHCXSensor::FIFO_ACC_Get_AxesRaw (int16_t *AccelerationRaw)
2186+ {
2187+ uint8_t data[6 ];
2188+
2189+ if (FIFO_Get_Data (data) != ISM330DHCX_OK) {
2190+ return ISM330DHCX_ERROR;
2191+ }
2192+
2193+ AccelerationRaw[0 ] = ((int16_t )data[1 ] << 8 ) | data[0 ];
2194+ AccelerationRaw[1 ] = ((int16_t )data[3 ] << 8 ) | data[2 ];
2195+ AccelerationRaw[2 ] = ((int16_t )data[5 ] << 8 ) | data[4 ];
2196+
2197+ return ISM330DHCX_OK;
2198+ }
2199+
21802200/* *
21812201 * @brief Get the ISM330DHCX FIFO gyro single sample (16-bit data per 3 axes) and calculate angular velocity [mDPS]
21822202 * @param AngularVelocity FIFO gyroscope axes [mDPS]
@@ -2212,6 +2232,26 @@ ISM330DHCXStatusTypeDef ISM330DHCXSensor::FIFO_GYRO_Get_Axes(int32_t *AngularVel
22122232 return ISM330DHCX_OK;
22132233}
22142234
2235+ /* *
2236+ * @brief Get the ISM330DHCX FIFO gyro single sample (16-bit data per 3 axes) raw data
2237+ * @param AngularVelocity FIFO gyroscope raw axes reading
2238+ * @retval 0 in case of success, an error code otherwise
2239+ */
2240+ ISM330DHCXStatusTypeDef ISM330DHCXSensor::FIFO_GYRO_Get_AxesRaw (int16_t *AngularVelocityRaw)
2241+ {
2242+ uint8_t data[6 ];
2243+
2244+ if (FIFO_Get_Data (data) != ISM330DHCX_OK) {
2245+ return ISM330DHCX_ERROR;
2246+ }
2247+
2248+ AngularVelocityRaw[0 ] = ((int16_t )data[1 ] << 8 ) | data[0 ];
2249+ AngularVelocityRaw[1 ] = ((int16_t )data[3 ] << 8 ) | data[2 ];
2250+ AngularVelocityRaw[2 ] = ((int16_t )data[5 ] << 8 ) | data[4 ];
2251+
2252+ return ISM330DHCX_OK;
2253+ }
2254+
22152255/* *
22162256 * @brief Enable ISM330DHCX accelerometer DRDY interrupt on INT1
22172257 * @retval 0 in case of success, an error code otherwise
0 commit comments