No, not that I've created, although there might be one related to all the PIO I guess. Think I hoped that the basic NuttX interrupt mechanisms might inherently hold the state but couldn't immediately see it (including via debug).
No big deal - reading the PIO status is no issue, and I don't need to retain the state: if the input is low, there's an overcurrent state and if high there's not: kill power or don't, maybe notify any waiters to let the user know, that sort of thing. >-----Original Message----- >From: Nathan Hartman <hartman.nat...@gmail.com> >Sent: 27 January 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 PM Tim Hardisty <t...@hardisty.co.uk> wrote: > >> 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 the state of the input pin, but I sort of feel I >> should be able to pass the state as an arg to the handler (via xcpt_t >> handler). >> >> Is that possible and, if so, how? >>