Re: Correct way to manage LCD backlight brightness

2024-01-03 Thread Alan C. Assis
Hi Tim, AFAIK NuttX doesn't have a standard way to do it. It is normally done at board level (do a "git grep backlight" inside boards/ to see some examples). A proper way to do that should be implementing a backlight subsystem, like a subset of Linux backlight subsystem: https://docs.kernel.org/g

Correct way to manage LCD backlight brightness

2024-01-03 Thread Tim Hardisty
My SAMA5 board has an LCD with variable brightness (pwm controlled). arch/arm/src/chip/sam_lcd.c has a function called "sam_backlight) that takes a level value, but it appears to be local to that file, and the only call to it is in the LCD init functions in that file, complete with a comment t

Re: debugassert vs assert in apps

2024-01-03 Thread Fotis Panagiotopoulos
Just to be clear, I am always referring to the standard C assert() function/macro. Not the unconditional NuttX ASSERT() macro. Notice the capitalization! (Which is another confusing point worth improving... +1 for NX_ASSERT() ) On Wed, Jan 3, 2024 at 7:32 PM Fotis Panagiotopoulos wrote: > I am

Re: debugassert vs assert in apps

2024-01-03 Thread Fotis Panagiotopoulos
I am sorry, but I still don't see the difference. See this line here: https://github.com/apache/nuttx/blob/master/include/assert.h#L119 When NDEBUG is defined, assert also compiles to nothing. As it ought to do. (NDEBUG definition is also controlled by Kconfig, with CONFIG_NDEBUG) So, is there

Re: debugassert vs assert in apps

2024-01-03 Thread Tomek CEDRO
+1 :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info On Wed, Jan 3, 2024, 17:44 Gregory Nutt wrote: > +1 > > On 1/3/2024 10:43 AM, Nathan Hartman wrote: > > On Wed, Jan 3, 2024 at 11:22 AM Gregory Nutt > wrote: > >> On 1/3/2024 10:11 AM, Fotis Panagiotopoulos wrote: > That would seem a

Re: debugassert vs assert in apps

2024-01-03 Thread Gregory Nutt
+1 On 1/3/2024 10:43 AM, Nathan Hartman wrote: On Wed, Jan 3, 2024 at 11:22 AM Gregory Nutt wrote: On 1/3/2024 10:11 AM, Fotis Panagiotopoulos wrote: That would seem a little odd since there was a PR a few years ago to change all instances of assert/ASSERT to DEBUGASSERT to save code size.

Re: debugassert vs assert in apps

2024-01-03 Thread Nathan Hartman
On Wed, Jan 3, 2024 at 11:22 AM Gregory Nutt wrote: > > On 1/3/2024 10:11 AM, Fotis Panagiotopoulos wrote: > >> That would seem a little odd since there was a PR a few years ago to > > change all instances of assert/ASSERT to DEBUGASSERT to save code size. > > > > How is that so? > > > > As I see

Re: debugassert vs assert in apps

2024-01-03 Thread Gregory Nutt
On 1/3/2024 10:11 AM, Fotis Panagiotopoulos wrote: That would seem a little odd since there was a PR a few years ago to change all instances of assert/ASSERT to DEBUGASSERT to save code size. How is that so? As I see here: https://github.com/apache/nuttx/blob/master/include/assert.h#L122 asser

Re: debugassert vs assert in apps

2024-01-03 Thread Fotis Panagiotopoulos
> That would seem a little odd since there was a PR a few years ago to change all instances of assert/ASSERT to DEBUGASSERT to save code size. How is that so? As I see here: https://github.com/apache/nuttx/blob/master/include/assert.h#L122 assert defined exactly as DEBUGASSERT. There shouldn't b

Re: debugassert vs assert in apps

2024-01-03 Thread Gregory Nutt
On 1/3/2024 5:12 AM, Fotis Panagiotopoulos wrote: Hello everyone, I am glad that we all agree on this matter. We can handle this in the following steps: 1. Ensure that any new PRs and apps follow this convention. This is up to the reviewers, to enforce. 2. Get rid of all DEBUGASSERTs in apps.

Re: debugassert vs assert in apps

2024-01-03 Thread Fotis Panagiotopoulos
Hello everyone, I am glad that we all agree on this matter. We can handle this in the following steps: 1. Ensure that any new PRs and apps follow this convention. This is up to the reviewers, to enforce. 2. Get rid of all DEBUGASSERTs in apps. Unfortunately, a quick grep yielded 3410 results...