// SPDX-License-Identifier: GPL-2.0 /* suncore.c * * Common SUN serial routines. Based entirely * upon drivers/sbus/char/sunserial.c which is: * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) * * Adaptation to new UART layer is: * * Copyright (C) 2002 David S. Miller (davem@redhat.com)
*/
/* Basically, when the baud rate is wrong the mouse spits out * breaks to us.
*/ int suncore_mouse_baud_detection(unsignedchar ch, int is_break)
{ staticint mouse_got_break = 0; staticint ctr = 0;
if (is_break) { /* Let a few normal bytes go by before we jump the gun * and say we need to try another baud rate.
*/ if (mouse_got_break && ctr < 8) return 1;
/* Ok, we need to try another baud. */
ctr = 0;
mouse_got_break = 1; return 2;
} if (mouse_got_break) {
ctr++; if (ch == 0x87) { /* Correct baud rate determined. */
mouse_got_break = 0;
} return 1;
} return 0;
}
#if 0 /* ..def MODULE ; never supported as such */
MODULE_AUTHOR("Eddie C. Dost, David S. Miller");
MODULE_DESCRIPTION("Sun serial common layer");
MODULE_LICENSE("GPL"); #endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.9 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.