Commit Graph

72 Commits

Author SHA1 Message Date
Diego Herranz
d9d649105d drivers/leds/ws2812: optimize reset bytes
It's not necessary to send a reset pulse after sending the RGB data
since the first thing that a new transmission does is sending the long
reset pulse. I have left 1 reset byte after the RGB data to keep some
padding given that the bits inside the byte are shifted by 1 bit although
I think it wouldn't be necessary either. But just in case.

This reduces the memory usage (you can easily save 60 bytes) and increases
the maximum refresh rate.
2020-12-10 20:39:08 -06:00
Diego Herranz
d838ea596f boards/arm/stm32/common: devpath not long enough for apa102 and veml6070
Also header path updated in drivers/leds/apa102.c
2020-12-09 09:22:03 +01:00
Diego Herranz
3edb3a47b2 drivers/leds/ws2812: fix code style
As reported by the CI checks.
2020-12-07 21:15:35 -08:00
Diego Herranz
441180b08c drivers/leds/ws2812: make frequency selection more flexible
Previously only 4 MHz and 8 MHz were allowed. Given the tolerance
allowed in the WS2812 timing spec, frequency ranges around those
two can be used too which is useful for boards in which it is
difficult to generate those specific frequencies.
2020-12-07 21:15:35 -08:00
Diego Herranz
117947b5a1 drivers/led/ws2812: fix comments
Complete or improve some explanations and fix some typos
2020-12-02 21:22:12 -08:00
YAMAMOTO Takashi
d05299f37d drivers/leds/userled_lower.c: Fix a syslog format 2020-11-22 19:01:05 -08:00
YAMAMOTO Takashi
fc2ae3a8dd drivers/leds/userled_upper.c: Fix a syslog foramt 2020-11-22 19:01:05 -08:00
YAMAMOTO Takashi
9b7d87738f drivers/leds/userled_upper.c: Appease nxstyle 2020-11-22 19:01:05 -08:00
Diego Herranz
d4c0786f52 drivers/leds/apa102: Fix code style
As reported by the CI tests
2020-11-17 18:47:45 -08:00
Diego Herranz
d742eaac89 drivers/leds/apa102: remove/fix references to I2C/LM-75 2020-11-17 18:47:45 -08:00
Brennan Ashton
f41b9a10b3 ws2812: moved SPI_LOCK and forgot to change spi drv var name
This snuck in durring a slight PR fixup.
2020-09-28 08:25:43 +01:00
Brennan Ashton
e2fd1fdd84 LED: Support for WS2812 led controller (aka Adafruit NeoPixel)
The WS2812 is very common in LED strips as it is an integrated
controller and LED. It is driven by a single data line, but
the timing requirements can be met by using most SPI controllers
and the use of DMA.

This driver has been validated on the nRF52 arch both with a
single LED and a strip of 144.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-16 10:35:56 -07:00
Ouss4
02ad0e9094 drivers/leds/ncp5623c&pca9635pw: Fix nxstyle issues. 2020-06-12 17:51:23 -03:00
Ouss4
ebfc12d3d2 drivers/: Fix some drivers mode priviliges. It's not used but it's
better to get it right.
2020-06-12 17:51:23 -03:00
Xiang Xiao
76965474ac drivers/led: Let board_userled_initialize return the led number
so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf6638a6865bac42150b5957376e55909f041d40
2020-06-07 19:28:10 +01:00
Xiang Xiao
1ba1c34b01 drivers/led: Decopule USERLED from ARCH_HAVE_LEDS
and let USERLED_LOWER depends on ARCH_HAVE_LEDS instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie03e76d90b61a3d8d3457ccdd319a247b6075fa8
2020-06-07 19:28:10 +01:00
Xiang Xiao
23668a4b9b build: Remove the empty variable assignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao
f8a809eb5b Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao
5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Xiang Xiao
3bc62f1ccc Change space to tab and help to ---help--- in Kconfig files. 2019-10-05 21:39:12 -06:00
Augusto Fraga Giachero
68bbc8438c drivers/timers/pwm.c: Move the pwm/pwm.c driver to timers/pwm.c, The drivers/pwm contained only one .c file (pwm.c), so to avoid the proliferation of sub-directories inside drivers/ is better to move the pwm.c driver to drivers/timers. The pwm.h header was moved to include/nuttx/timers to keep consistency, so all files referencing it need to be updated. 2019-09-02 07:57:10 -06:00
Gregory Nutt
b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Jussi Kivilinna
4b2264fa16 drivers/leds/userled: Fix ledset validity check in ULEDIOC_SETALL ioctl. 2019-04-15 07:54:11 -06:00
Alan Carvalho de Assis
c4a906aef4 drivers/leds/max7219.c: Support all digits presented in the MAX7219 datasheet. 2018-09-29 11:16:45 -06:00
Alan Carvalho de Assis
f887bdb6d6 Squashed commit of the following:
configs/stm32f4discovery/src: Add board support to MAX7219 as numeric display controller

    drivers/leds/max7219.c: Add support to MAX7219 to control 7-segment displays
2018-07-22 15:13:39 -06:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Alan Carvalho de Assis
a764e4ab5c drivers/leds/pca9635pw.c configs/stm32f4discovery/src/stm32_pca9635.c: Fix pca9635pw LED driver compilation 2018-07-07 16:24:11 -06:00
Gregory Nutt
3a34b29f76 arch/arm/src/imxrt/chip: Add pin multiplexing header files. 2018-05-14 13:29:53 -06:00
Anthony Merlino
addf7f1a4c Merged in antmerlino/nuttx/multichan_rgbled_fix (pull request #641)
rgbled: Fixes led issues caused by uninitialized memory with CONFIG_RGBLED_MULTICHAN.

The uninitialized pwm_info_s struct caused a rogue channel to be started causing errros in the pwm driver

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-05-14 17:57:03 +00:00
Gregory Nutt
ec7c4020f9 drivers/leds/rgbled.c: Fix a compilation error introduced with a recent change to add multi-channel operation to RGB LED driver. 2018-05-05 12:26:45 -06:00
Gregory Nutt
cd12ea7788 Costmetic changes from review of last PR. 2018-05-02 16:29:22 -06:00
Anthony Merlino
385d4a9108 Merged in antmerlino/nuttx/rgb_multichan (pull request #635)
drivers/rgbled: Adds support for multichannel PWM (multiple PWM channels on a single timer)

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-05-02 22:21:49 +00:00
Sebastien Lorquet
0885ad7b14 drivrs/leds: Userled driver was using LCD debug output instead of LED debug output. 2018-03-11 17:43:04 -06:00
Dmitriy Linikov
a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt
936df1bcb5 Adds new OS internal functions nxsig_sleep() and nxsig_usleep. These differ from the standard sleep() and usleep() in that (1) they don't cause cancellation points, and (2) don't set the errno variable (if applicable). All calls to sleep() and usleep() changed to calls to nxsig_sleep() and nxsig_usleep().
Squashed commit of the following:

    Change all calls to usleep() in the OS proper to calls to nxsig_usleep()

    sched/signal:  Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.

    sched/signal:  Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.
2017-10-06 10:15:01 -06:00
Gregory Nutt
9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Alan Carvalho de Assis
dca62a68a8 Add driver for APA102 LED controller. These LEDs are used on LED Strips and are controlled over SPI. 2017-09-18 16:48:55 -06:00
Jeff
b6d5e7b9e1 Lightness correction for RGB LED driver 2017-07-28 06:54:38 -06:00
Jeff
7f8f833714 Lightness correction for RGB LED driver 2017-07-28 06:54:06 -06:00
Jeff
552ed255f6 Add support for inverted LEDS. See common anode RGB LED discussion in the Yahoo group 2017-07-27 07:43:59 -06:00
Gregory Nutt
0de294a586 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:35:56 -06:00
Gregory Nutt
1b9b3a7b47 pwm.h moved from include/nuttx/ to include/nuttx/drivers. 2016-07-20 13:48:24 -06:00
Gregory Nutt
43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt
027490924e Cosmetic, fix alignment 2016-06-15 14:13:18 -06:00
Gregory Nutt
2ddd57c674 Centralize definitions associated with CONFIG_DEBUG_LEDS 2016-06-15 14:12:19 -06:00