/** * struct mpr_data * @dev: current device structure * @ops: functions that implement the sensor reads/writes, bus init * @lock: access to device during read * @pmin: minimal pressure in pascal * @pmax: maximal pressure in pascal * @function: transfer function * @outmin: minimum raw pressure in counts (based on transfer function) * @outmax: maximum raw pressure in counts (based on transfer function) * @scale: pressure scale * @scale2: pressure scale, decimal number * @offset: pressure offset * @offset2: pressure offset, decimal number * @gpiod_reset: reset * @irq: end of conversion irq. used to distinguish between irq mode and * reading in a loop until data is ready * @completion: handshake from irq to read * @chan: channel values for buffered mode * @chan.pres: pressure value * @chan.ts: timestamp * @buffer: raw conversion data
*/ struct mpr_data { struct device *dev; conststruct mpr_ops *ops; struct mutex lock;
u32 pmin;
u32 pmax; enum mpr_func_id function;
u32 outmin;
u32 outmax; int scale; int scale2; int offset; int offset2; struct gpio_desc *gpiod_reset; int irq; struct completion completion; struct {
s32 pres;
aligned_s64 ts;
} chan;
u8 buffer[MPR_MEASUREMENT_RD_SIZE] __aligned(IIO_DMA_MINALIGN);
};
struct mpr_ops { int (*init)(struct device *dev); int (*read)(struct mpr_data *data, const u8 cmd, const u8 cnt); int (*write)(struct mpr_data *data, const u8 cmd, const u8 cnt);
};
int mpr_common_probe(struct device *dev, conststruct mpr_ops *ops, int irq);
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.