Lines Matching refs:ddp
87 struct divider_data *ddp = ÷r_data; in divider_setup() local
88 struct adc_sequence *asp = &ddp->adc_seq; in divider_setup()
89 struct adc_channel_cfg *accp = &ddp->adc_cfg; in divider_setup()
92 if (!device_is_ready(ddp->adc)) { in divider_setup()
93 LOG_ERR("ADC device is not ready %s", ddp->adc->name); in divider_setup()
112 .buffer = &ddp->raw, in divider_setup()
113 .buffer_size = sizeof(ddp->raw), in divider_setup()
137 rc = adc_channel_setup(ddp->adc, accp); in divider_setup()
176 struct divider_data *ddp = ÷r_data; in battery_sample() local
178 struct adc_sequence *sp = &ddp->adc_seq; in battery_sample()
180 rc = adc_read(ddp->adc, sp); in battery_sample()
183 int32_t val = ddp->raw; in battery_sample()
185 adc_raw_to_millivolts(adc_ref_internal(ddp->adc), in battery_sample()
186 ddp->adc_cfg.gain, in battery_sample()
194 ddp->raw, val, rc); in battery_sample()
197 LOG_INF("raw %u ~ %u mV\n", ddp->raw, val); in battery_sample()