> From: Joe Xue
>
> The LED pattern trigger allows LEDs blink in user defined pattern.
>
> v2: Change the pattern memory from fixed static to malloc
> Change the timer schedule way to save cpu time
> Add the mutex to protect the pattern operation
>
> v3: Tiny fix,
I set the in-reply-to to try to put my new patch here, but failed.
I need to figure it out.
From: Joe Xue
The LED pattern trigger allows LEDs blink in user defined pattern.
v2: Change the pattern memory from fixed static to malloc
Change the timer schedule way to save cpu time
Add the
From: Joe Xue
The LED pattern trigger allows LEDs blink in user defined pattern.
v2: Change the pattern memory from fixed static to malloc
Change the timer schedule way to save cpu time
Add the mutex to protect the pattern operation
new file: Documentation/leds/ledtrig
>> + * Based on Richard Purdie's ledtrig-timer.c and Atsushi Nemoto's
>> + * ledtrig-heartbeat.c and Shuah Khan's ledtrig-transient.c
>
> I stil think this belongs in user space except for platforms with hardware
> acceleration for it.
This can free the user space application from loop or thread.
> What about something like this?
>
> Not shcheduling timer when nothing changed should save a bit of power/cpu...
>
> if (pattern_data->pattern[pattern_data->count] == '/') {
> return;
> }
>
> this = pattern_data->pattern[pattern_data->count]
> if (this == '#')
> new_brigtness = pattern_data->brig
>> +#define MAX_PATTEN_LEN 255
>
> Arbitary limits that are not needed if it was in userspace, and not it
> seems a sensible one - why not use 256 ?
The maximum memory is 256, we keep one for '\0'
>> +static ssize_t pattern_delay_unit_store(struct device *dev,
>> + struct device_attribute *attr,
modified: drivers/leds/trigger/Makefile
new file: drivers/leds/trigger/ledtrig-pattern.c
Suggested-by: Pavel Machek
Signed-off-by: Joe Xue
---
Documentation/leds/ledtrig-pattern.txt | 60 ++
drivers/leds/trigger/Kconfig | 9 ++
drivers/leds/trigger/Makefile | 1
: Pavel Machek
Signed-off-by: Joe Xue
---
Documentation/leds/ledtrig-pattern.txt | 60 ++
drivers/leds/trigger/Kconfig | 9 ++
drivers/leds/trigger/Makefile | 1 +
drivers/leds/trigger/ledtrig-pattern.c | 207 +
4 files changed, 277
Hi Pavel,
I have finished the patten trigger and have tested it.
Do you mind me putting your name as suggest-by? For part idea is from you.
Joe
> Date: Sat, 28 Dec 2013 20:26:30 +0100
> From: pa...@ucw.cz
> To: lg...@hotmail.com
> CC: coolo...@gmail.com; r
Hi
>> Good idea.
>> I have finished but I'll change it to this way soon and test it in next some
>> days.
>>
>> What the idea about the character to indicate stop?
>>
>> I mean this patten maybe indicate just once maybe indicate repeatedly until
>> the next patten.
>>
>> What about "/"?
>> If th
Hi Pavel,
Good idea.
I have finished but I'll change it to this way soon and test it in next some
days.
What the idea about the character to indicate stop?
I mean this patten maybe indicate just once maybe indicate repeatedly until the
next patten.
What about "/"?
If there is a "/" at end the
Hi,
I'm writing the Morse code trigger.
what about this
echo "-.-. *"> patten
- a long on then a off
. a short on then a off
space a long off
* mean repeat the patten
s mean indicate the patten just one time then stop
Do we also need a "step
Hi all,
I think Pavel's suggestion is a good idea, I'm starting to write another
trigger named Morse code trigger.
I prefer to keeping this burst trigger and add another Morse code trigger for
different application. But I know the Morse code trigger will be the super set
of the burst. Say the
Hi Pavel,
Yes, your suggest looks reasonable. Only issue maybe is not easy to called by
program. After all, the interface is called by program more ofter then by human
being.
I would like to change the way what you suggest, let see if other guys agree
with your idea.
Before that, I'll submit
Hi,
Yes, Morse code can indicate any means. But when we look at the LEDs, would we
like to also have a Morse code book in hand?
The burst led blink idea is because it is easy to use and easy to describe.
Mostly when users on site are describing the LEDs states to the support
engineer.
Joe
--
15 matches
Mail list logo