/** * touchscreen_parse_properties - parse common touchscreen properties * @input: input device that should be parsed * @multitouch: specifies whether parsed properties should be applied to * single-touch or multi-touch axes * @prop: pointer to a struct touchscreen_properties into which to store * axis swap and invert info for use with touchscreen_report_x_y(); * or %NULL * * This function parses common properties for touchscreens and sets up the * input device accordingly. The function keeps previously set up default * values if no value is specified.
*/ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, struct touchscreen_properties *prop)
{ struct device *dev = input->dev.parent; struct input_absinfo *absinfo; unsignedint axis, axis_x, axis_y; unsignedint minimum, maximum, fuzz; bool data_present;
input_alloc_absinfo(input); if (!input->absinfo) return;
/** * touchscreen_set_mt_pos - Set input_mt_pos coordinates * @pos: input_mt_pos to set coordinates of * @prop: pointer to a struct touchscreen_properties * @x: X coordinate to store in pos * @y: Y coordinate to store in pos * * Adjust the passed in x and y values applying any axis inversion and * swapping requested in the passed in touchscreen_properties and store * the result in a struct input_mt_pos.
*/ void touchscreen_set_mt_pos(struct input_mt_pos *pos, conststruct touchscreen_properties *prop, unsignedint x, unsignedint y)
{
touchscreen_apply_prop_to_x_y(prop, &x, &y);
pos->x = x;
pos->y = y;
}
EXPORT_SYMBOL(touchscreen_set_mt_pos);
/** * touchscreen_report_pos - Report touchscreen coordinates * @input: input_device to report coordinates for * @prop: pointer to a struct touchscreen_properties * @x: X coordinate to report * @y: Y coordinate to report * @multitouch: Report coordinates on single-touch or multi-touch axes * * Adjust the passed in x and y values applying any axis inversion and * swapping requested in the passed in touchscreen_properties and then * report the resulting coordinates on the input_dev's x and y axis.
*/ void touchscreen_report_pos(struct input_dev *input, conststruct touchscreen_properties *prop, unsignedint x, unsignedint y, bool multitouch)
{
touchscreen_apply_prop_to_x_y(prop, &x, &y);
input_report_abs(input, multitouch ? ABS_MT_POSITION_X : ABS_X, x);
input_report_abs(input, multitouch ? ABS_MT_POSITION_Y : ABS_Y, y);
}
EXPORT_SYMBOL(touchscreen_report_pos);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Helper functions for touchscreens and other devices");
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.