Search found 114 matches

by Thargon
Thu Nov 14, 2019 7:08 pm
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1583

Re: encoding GPIO ports

[...] there is no guarantee it wont change in future devices. I read this as "might break portability and will thus not be implemented in ChibiOS". I would be absolutely fine with that argument ;) BTW, why don't use one EventSource for each port? you could mask port bits 1:1 with event fl...
by Thargon
Thu Nov 14, 2019 3:14 pm
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1583

Re: encoding GPIO ports

Such a solution would not be portable, as it highly depends on the memory layout of each platform. The mentioned hal_pal_lld.h is defined on a per-port basis, while the PAL_PORT(), PAL_PAD() and PAL_LINE() macros are part of HAL (even though they are implemented for each port specifically). Moreover...
by Thargon
Thu Nov 14, 2019 1:52 pm
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1583

Re: encoding GPIO ports

Unfortunately, PAL_LINE() does not help me here, as it does not fulfill my flag-like encoding requirement. In my current solution, each pad is represented by an individual bit in the eventflags_t value. This is easy, since pads are numbered from 0 to 15, which can be used as-is for shifting. GPIO po...
by Thargon
Thu Nov 14, 2019 11:44 am
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1583

encoding GPIO ports

tl:dr: I would like to encode GPIO ports as integer values [0, 1, 2, ...]. Is there an existing macro/function for this or can it be introduced? In my project, I use a central event source to inform the whole system about GPIO events. In order to distinguish individual sources (i.e. pins) that trigg...
by Thargon
Tue Oct 22, 2019 12:51 pm
Forum: Bug Reports
Topic: STM32 GPIO LLD register naming issue Topic is solved
Replies: 3
Views: 752

Re: STM32 GPIO LLD register naming issue Topic is solved

Hi,

the fix works fine for me. Thank you!
by Thargon
Mon Oct 14, 2019 11:46 am
Forum: Bug Reports
Topic: STM32 GPIO LLD register naming issue Topic is solved
Replies: 3
Views: 752

STM32 GPIO LLD register naming issue Topic is solved

Hi, I just encountered a compilation error when calling palIsLineEventEnabledX() using an STM32L476. The function is defined identically in all three GPIO LLD versions: #define pal_lld_ispadeventenabled(port, pad) \ (bool)((EXTI->IMR & (1U << (uint32_t)pad)) != 0U) Now the issue is, that IMR is ...
by Thargon
Mon May 20, 2019 1:15 pm
Forum: Small Change Requests
Topic: Enhanced event filtering
Replies: 5
Views: 1120

Re: Enhanced event filtering

I see that there is some a priori knowledge used for thread handling, depending whether it is an AND or OR condition. I also understand that modifying all involved components is not trivial and is probably rather something that should be implemented for a major release. However, I disagree that my s...
by Thargon
Tue May 07, 2019 11:58 am
Forum: Small Change Requests
Topic: Enhanced event filtering
Replies: 5
Views: 1120

Re: Enhanced event filtering

Your solution requires the emitter of an event to know about the receiver, which is very bad code design, imho. An emitter must not care about other emitters or any receivers, it just informs about its own actions. Of course, I could introduce meta-instances, which accumulate subsets of events and f...
by Thargon
Tue May 07, 2019 10:42 am
Forum: Small Change Requests
Topic: Enhanced event filtering
Replies: 5
Views: 1120

Enhanced event filtering

Hi, when waiting for events, I encounter situations in my project, where the available chEvtWaitXXX() functions do not provide an optimal solution. It's easy to understand with the following example: Let there be three events with the masks 0x01, 0x10 and 0x20. Depending on the events received, the ...
by Thargon
Mon Feb 25, 2019 4:09 pm
Forum: Small Change Requests
Topic: Renaming ALLCSRC, ALLINC etc.
Replies: 0
Views: 1118

Renaming ALLCSRC, ALLINC etc.

Hi, I just moved my project to ChibiOS 19.1 and finally updated my Makefiles to the new conventions. Thereby I immediately struggled with the "global" make variables ALLCSRC, ALLINC, ALLASM, ALLCPPSRC etc. I see that those have been introduced quite some time ago , but maybe optimizations ...

Go to advanced search