Lines Matching +full:4 +full:u

45 #define TMAG5170_CONV_AVG_POS		12U
46 #define TMAG5170_CONV_AVG_MASK (BIT_MASK(3U) << TMAG5170_CONV_AVG_POS)
50 #define TMAG5170_MAG_TEMPCO_POS 8U
51 #define TMAG5170_MAG_TEMPCO_MASK (BIT_MASK(2U) << TMAG5170_MAG_TEMPCO_POS)
55 #define TMAG5170_OPERATING_MODE_POS 4U
56 #define TMAG5170_OPERATING_MODE_MASK (BIT_MASK(3U) << TMAG5170_OPERATING_MODE_POS)
60 #define TMAG5170_T_CH_EN_POS 3U
61 #define TMAG5170_T_CH_EN_MASK (BIT_MASK(1U) << TMAG5170_T_CH_EN_POS)
65 #define TMAG5170_T_RATE_POS 2U
66 #define TMAG5170_T_RATE_MASK (BIT_MASK(1U) << TMAG5170_T_RATE_POS)
70 #define TMAG5170_ANGLE_EN_POS 14U
71 #define TMAG5170_ANGLE_EN_MASK (BIT_MASK(2U) << TMAG5170_ANGLE_EN_POS)
75 #define TMAG5170_SLEEPTIME_POS 10U
76 #define TMAG5170_SLEEPTIME_MASK (BIT_MASK(4U) << TMAG5170_SLEEPTIME_POS)
80 #define TMAG5170_MAG_CH_EN_POS 6U
81 #define TMAG5170_MAG_CH_EN_MASK (BIT_MASK(4U) << TMAG5170_MAG_CH_EN_POS)
85 #define TMAG5170_Z_RANGE_POS 4U
86 #define TMAG5170_Z_RANGE_MASK (BIT_MASK(2U) << TMAG5170_Z_RANGE_POS)
90 #define TMAG5170_Y_RANGE_POS 2U
91 #define TMAG5170_Y_RANGE_MASK (BIT_MASK(2U) << TMAG5170_Y_RANGE_POS)
95 #define TMAG5170_X_RANGE_POS 0U
96 #define TMAG5170_X_RANGE_MASK (BIT_MASK(2U) << TMAG5170_X_RANGE_POS)
100 #define TMAG5170_RSLT_ALRT_POS 8U
101 #define TMAG5170_RSLT_ALRT_MASK (BIT_MASK(1U) << TMAG5170_RSLT_ALRT_POS)
105 #define TMAG5170_VER_POS 4U
106 #define TMAG5170_VER_MASK (BIT_MASK(2U) << TMAG5170_VER_POS)
123 #define TMAG5170_MT_TO_GAUSS_RATIO 10U
124 #define TMAG5170_T_SENS_T0 25U
125 #define TMAG5170_T_ADC_T0 17522U
126 #define TMAG5170_T_ADC_RES 60U
128 #define TMAG5170_CMD_TRIGGER_CONVERSION BIT(0U)
132 #define TMAG5170_SPI_BUFFER_LEN 4U
194 uint8_t buffer_tx[4] = { reg, (data >> 8) & 0xFF, data & 0xFF, 0x00U }; in tmag5170_write_register()
204 uint8_t buffer_tx[4] = { BIT(7) | reg, 0x00U, 0x00U, (cmd & BIT_MASK(4U)) << 4U }; in tmag5170_read_register()
205 uint8_t buffer_rx[4] = { 0x00U }; in tmag5170_read_register()
219 uint16_t max_range_mt = 0U; in tmag5170_convert_magn_reading_to_gauss()
222 max_range_mt = 50U; in tmag5170_convert_magn_reading_to_gauss()
224 max_range_mt = 25U; in tmag5170_convert_magn_reading_to_gauss()
226 max_range_mt = 100U; in tmag5170_convert_magn_reading_to_gauss()
235 max_range_mt *= 2U; in tmag5170_convert_magn_reading_to_gauss()
273 * 4 LSBs store the fractional part of the result in tmag5170_covert_angle_reading_to_degrees()
275 output->val1 = chan_reading >> 4; in tmag5170_covert_angle_reading_to_degrees()
298 k_sleep(K_MSEC(5U)); in tmag5170_sample_fetch()
303 ret = tmag5170_read_register(dev, TMAG5170_REG_X_CH_RESULT, &drv_data->x, 0U); in tmag5170_sample_fetch()
306 ret = tmag5170_read_register(dev, TMAG5170_REG_Y_CH_RESULT, &drv_data->y, 0U); in tmag5170_sample_fetch()
309 ret = tmag5170_read_register(dev, TMAG5170_REG_Z_CH_RESULT, &drv_data->z, 0U); in tmag5170_sample_fetch()
312 ret = tmag5170_read_register(dev, TMAG5170_REG_X_CH_RESULT, &drv_data->x, 0U); in tmag5170_sample_fetch()
318 0U); in tmag5170_sample_fetch()
324 0U); in tmag5170_sample_fetch()
331 0U); in tmag5170_sample_fetch()
337 0U); in tmag5170_sample_fetch()
343 0U); in tmag5170_sample_fetch()
349 0U); in tmag5170_sample_fetch()
356 0U); in tmag5170_sample_fetch()
363 0U); in tmag5170_sample_fetch()
370 0U); in tmag5170_sample_fetch()
447 uint16_t test_cfg_reg = 0U; in tmag5170_init_registers()
451 const uint8_t disable_crc_packet[4] = { 0x0FU, 0x0U, 0x04U, 0x07U }; in tmag5170_init_registers()
456 ret = tmag5170_read_register(dev, TMAG5170_REG_TEST_CONFIG, &test_cfg_reg, 0U); in tmag5170_init_registers()
476 TMAG5170_RSLT_ALRT_SET(1U)); in tmag5170_init_registers()