Re: Pass interrupt status to handler

2023-01-27 Thread Nathan Hartman
On Fri, Jan 27, 2023 at 1:57 PM Gregory Nutt wrote: > On 1/27/2023 12:15 PM, Nathan Hartman wrote: > > Is there a global structure where you retain state information where it > > would be appropriate to save the most refent known state in a volatile > > variable? > Good, modular design would disc

RE: Pass interrupt status to handler

2023-01-27 Thread TimH
tx.apache.org >Subject: Re: Pass interrupt status to handler > >Typically, if you want to pass a small amount of information from an >interrupt handler to a task, you would use a normal IPC like sigqueue() >(https://pubs.opengroup.org/onlinepubs/7908799/xsh/sigqueue.html) which >

Re: Pass interrupt status to handler

2023-01-27 Thread Xiang Xiao
On Sat, Jan 28, 2023 at 2:46 AM Gregory Nutt wrote: > Typically, if you want to pass a small amount of information from an > interrupt handler to a task, you would use a normal IPC like sigqueue() > (https://pubs.opengroup.org/onlinepubs/7908799/xsh/sigqueue.html) which > allows to send a type un

Re: Pass interrupt status to handler

2023-01-27 Thread Gregory Nutt
On 1/27/2023 12:15 PM, Nathan Hartman wrote: Is there a global structure where you retain state information where it would be appropriate to save the most refent known state in a volatile variable? Good, modular design would discourage the use of global variables in such a way.

Re: Pass interrupt status to handler

2023-01-27 Thread Gregory Nutt
Typically, if you want to pass a small amount of information from an interrupt handler to a task, you would use a normal IPC like sigqueue() (https://pubs.opengroup.org/onlinepubs/7908799/xsh/sigqueue.html) which allows to send a type union sigval to the task. The task would have to catch the

RE: Pass interrupt status to handler

2023-01-27 Thread Tim Hardisty
ry 2023 18:15 >To: dev@nuttx.apache.org >Subject: Re: Pass interrupt status to handler > >Is there a global structure where you retain state information where it >would be appropriate to save the most refent known state in a volatile >variable? > >On Fri, Jan 27, 2023 at 1:00

Re: Pass interrupt status to handler

2023-01-27 Thread Nathan Hartman
Is there a global structure where you retain state information where it would be appropriate to save the most refent known state in a volatile variable? On Fri, Jan 27, 2023 at 1:00 PM Tim Hardisty wrote: > Think this is an easy one but it's stumped me so far... > > I am setting up the USB Overc

Pass interrupt status to handler

2023-01-27 Thread Tim Hardisty
Think this is an easy one but it's stumped me so far... I am setting up the USB Overcurrent interrupt and can't find any fully implemented examples. The interrupt is set to both edges as I want to know when the over current state is first set and later hopefully cleared. I can obviously read t