summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2019-02-25 16:25:27 +0100
committernorly <ny-git@enpas.org>2019-02-25 16:28:22 +0100
commit7f51e65e33fc33e3d10421648f64eb750a721403 (patch)
treee361c3e6727cc0ad031c0f578c41c8f126967b0e
parent89630dbcd24a9e6f50431c591a1b992c47eea834 (diff)
Comments
-rw-r--r--module/elmcan.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/module/elmcan.c b/module/elmcan.c
index 0eb4fe8..ef6fc6d 100644
--- a/module/elmcan.c
+++ b/module/elmcan.c
@@ -194,7 +194,11 @@ static void elm327_send(struct elmcan *elm, const void *buf, size_t len)
}
-/* Take the ELM327 out of almost any state and back into command mode. */
+/* Take the ELM327 out of almost any state and back into command mode.
+ * We send ELM327_MAGIC_CHAR which will either abort any running
+ * operation, or be echoed back to us in case we're already in command
+ * mode.
+ */
static void elm327_kick_into_cmd_mode(struct elmcan *elm)
{
if (elm->state != ELM_GETMAGICCHAR && elm->state != ELM_GETPROMPT) {
@@ -1254,12 +1258,6 @@ static struct tty_ldisc_ops elmcan_ldisc = {
-
-
- /************************************************************************
- * Module init/exit *
- ************************************************************************/
-
static int __init elmcan_init(void)
{
int status;