From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Willy Tarreau <w@1wt.eu>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Andreas Klinger <ak@it-klinger.de>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>, Ben Whitten <ben.whitten@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Philippe Ombredanne <pombredanne@nexb.com>,
Greg KH <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-leds@vger.kernel.org
Subject: Re: [PATCH v2] leds: ledtrig-morse: send out morse code
Date: Fri, 6 Jul 2018 09:22:46 +0200 [thread overview]
Message-ID: <CAMuHMdXE3MdCQRq6Y5sEu+B8668b5mEEfNT=5qva4AzxWFyijA@mail.gmail.com> (raw)
In-Reply-To: <20180704024112.GB9015@1wt.eu>
Hi Willy,
On Wed, Jul 4, 2018 at 4:41 AM Willy Tarreau <w@1wt.eu> wrote:
> On Tue, Jul 03, 2018 at 09:43:06PM +0300, Andy Shevchenko wrote:
> Well, in this case it's even possible to go further and avoid storing
> 36 strings. Indeed, no representation is longer than 5 symbols, so you
> can use 5 bits for the encoding (0=".", 1="-") and 3 bits for the
> length, it gives you a single byte per character instead of a pointer
> to a string plus 6 chars. Then in order to make it readable, 5 macros
> can be provided to emit the code :
And using the scheme from
https://plus.google.com/u/0/117536210417097546339/posts/hvctn17WUZu
you can store up to 7 symbols in a single byte, which you need when going
beyond plain alphanumeric:
-0111111
--011111
---01111
----0111
-----011
------01
-------0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2018-07-06 7:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 15:53 [PATCH v2] leds: ledtrig-morse: send out morse code Andreas Klinger
2018-07-03 18:43 ` Andy Shevchenko
2018-07-04 2:41 ` Willy Tarreau
2018-07-04 7:46 ` Geert Uytterhoeven
2018-07-04 16:25 ` Andy Shevchenko
2018-07-06 7:22 ` Geert Uytterhoeven [this message]
2018-07-04 6:53 ` Pavel Machek
2018-07-04 7:34 ` Willy Tarreau
2018-07-04 11:36 ` Greg KH
2018-07-04 18:19 ` Pavel Machek
2018-07-04 20:36 ` Jacek Anaszewski
2018-07-05 10:56 ` David Laight
2018-07-04 20:36 ` Jacek Anaszewski
2018-07-04 21:21 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMuHMdXE3MdCQRq6Y5sEu+B8668b5mEEfNT=5qva4AzxWFyijA@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=ak@it-klinger.de \
--cc=andy.shevchenko@gmail.com \
--cc=ben.whitten@gmail.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=pombredanne@nexb.com \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).