Lines Matching defs:elements

166 static uint_fast16_t inv_set_fifo_accuracy(uint_fast16_t elements,
170 if (elements) {
189 * bit set in element. The value returned are the elements that should be sent
192 static uint_fast16_t inv_set_fifo_reference(uint_fast16_t elements,
201 if ((elements & 1)
205 elements >>= 1;
209 if (elements & 1)
211 elements >>= 1;
214 elements = 0;
217 elements |= (1 << kk);
219 return elements;
227 uint_fast16_t elements,
236 elements = inv_set_fifo_reference(elements, accuracy, refOffset, 3);
237 accuracy = inv_set_fifo_accuracy(elements, accuracy, configOffset);
243 fifo_obj.data_config[configOffset] = elements | accuracy;
246 if ((elements & 1) == 0)
248 elements >>= 1;
983 * @param[in] elements Which of the 3 elements to send. Use INV_ALL for 3 axis
990 inv_error_t inv_send_accel(uint_fast16_t elements, uint_fast16_t accuracy)
1000 result = inv_construct3_fifo(regs, elements, accuracy, REF_ACCEL,
1017 * @param[in] elements Which of the 4 elements to send. Use INV_ALL for all
1024 inv_error_t inv_send_cntrl_data(uint_fast16_t elements, uint_fast16_t accuracy)
1034 elements = inv_set_fifo_reference(elements, accuracy, REF_CONTROL, 4);
1035 accuracy = inv_set_fifo_accuracy(elements, accuracy, CONFIG_CONTROL_DATA);
1041 fifo_obj.data_config[CONFIG_CONTROL_DATA] = elements | accuracy;
1044 if ((elements & 1) == 0)
1046 elements >>= 1;
1080 uint_fast16_t elements;
1085 elements = inv_set_fifo_reference(1, accuracy, REF_DMP_PACKET, 1);
1086 if (elements & 1) {
1110 * @param elements
1122 inv_error_t inv_send_gravity(uint_fast16_t elements, uint_fast16_t accuracy)
1138 * @param[in] elements Which of the 3 elements to send. Use INV_ALL for all of them
1144 inv_error_t inv_send_gyro(uint_fast16_t elements, uint_fast16_t accuracy)
1176 result = inv_construct3_fifo(regs, elements, accuracy, REF_GYROS,
1188 * @param[in] elements Which of the 3 elements to send. Use INV_ALL for all of
1196 inv_error_t inv_send_linear_accel(uint_fast16_t elements,
1206 result = inv_send_gravity(elements, accuracy);
1211 result = inv_send_accel(elements, accuracy);
1225 * @param[in] elements Which of the 3 elements to send. Use INV_ALL for all of
1231 inv_error_t inv_send_linear_accel_in_world(uint_fast16_t elements,
1258 uint_fast16_t elements, kk;
1264 elements = inv_set_fifo_reference(0xf, accuracy, REF_QUATERNION, 4);
1265 accuracy = inv_set_fifo_accuracy(elements, accuracy, CONFIG_QUAT);
1271 fifo_obj.data_config[CONFIG_QUAT] = elements | accuracy;
1274 if ((elements & 1) == 0)
1276 elements >>= 1;
1290 * @param[in] elements Which of the 7 elements to send. Use INV_ALL for all of them
1298 inv_error_t inv_send_sensor_data(uint_fast16_t elements, uint_fast16_t accuracy)
1314 elements = inv_set_fifo_reference(elements, accuracy, REF_RAW, 7);
1316 if (elements & 1)
1320 if (elements & 0x7e)
1322 (0x3f & (elements >> 1)) | INV_16_BIT;
1326 if (elements & INV_ELEMENT_1) {
1329 if (elements & INV_ELEMENT_2) {
1332 if (elements & INV_ELEMENT_3) {
1335 if (elements & INV_ELEMENT_4) {
1338 if (elements & INV_ELEMENT_5) {
1341 if (elements & INV_ELEMENT_6) {
1344 if (elements & INV_ELEMENT_7) {
1369 elements = inv_set_fifo_reference(elements, accuracy, REF_RAW, 7);
1371 if (elements & 0x03) {
1372 elements |= 0x03;
1375 if (elements & 0x0C) {
1376 elements |= 0x0C;
1379 if (elements & 0x30) {
1380 elements |= 0x30;
1383 if (elements & 0x40) {
1384 elements |= 0xC0;
1394 if (elements & 0x01)
1398 if (elements & 0xfe)
1400 (0x7f & (elements >> 1)) | INV_16_BIT;
1410 * @param[in] elements Which of the 3 elements to send. Use INV_ALL for all of them
1417 inv_error_t inv_send_external_sensor_data(uint_fast16_t elements,
1433 elements = inv_set_fifo_reference(elements, accuracy, REF_RAW_EXTERNAL, 6);
1435 if (elements)
1436 fifo_obj.data_config[CONFIG_RAW_EXTERNAL] = elements | INV_16_BIT;
1440 if (elements & INV_ELEMENT_1) {
1443 if (elements & INV_ELEMENT_2) {
1446 if (elements & INV_ELEMENT_3) {
1449 if (elements & INV_ELEMENT_4) {
1452 if (elements & INV_ELEMENT_5) {
1455 if (elements & INV_ELEMENT_6) {
1479 * @param elements
1490 inv_error_t inv_send_quantized_accel(uint_fast16_t elements,
1507 elements = inv_set_fifo_reference(elements, accuracy, REF_QUANT_ACCEL, 8);
1509 if (elements) {
1510 fifo_obj.data_config[CONFIG_DMP_QUANT_ACCEL] = (elements) | INV_32_BIT;
1523 if ((elements & 1) == 0)
1525 elements >>= 1;
1535 if ((elements & 1) == 0)
1537 elements >>= 1;
1549 inv_error_t inv_send_eis(uint_fast16_t elements, uint_fast16_t accuracy)
1563 elements = inv_set_fifo_reference(elements, accuracy, REF_EIS, 3);
1564 accuracy = inv_set_fifo_accuracy(elements, accuracy, CONFIG_EIS);
1566 fifo_obj.data_config[CONFIG_EIS] = elements | accuracy;
1569 if ((elements & 1) == 0)
1571 elements >>= 1;