⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 devapi-api.html

📁 ecos 文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
> - interrupt to attach</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Attach the interrupt to the vector so that interrupts will
      be delivered to the ISR when the interrupt occurs. </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12003">cyg_drv_interrupt_detach</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_detach( cyg_handle_t interrupt )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>interrupt</I
></TT
> - interrupt to detach</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Detach the interrupt from the vector so that interrupts
      will no longer be delivered to the ISR. </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12027">cyg_drv_interrupt_mask</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_mask(cyg_vector_t vector )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector to mask</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Program the interrupt controller to stop delivery of
      interrupts on the given vector. On architectures which implement
      interrupt priority levels this may also disable all lower
      priority interrupts. </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12051">cyg_drv_interrupt_mask_intunsafe</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_mask_intunsafe(cyg_vector_t vector )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector to mask</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Program the interrupt controller to stop delivery of
      interrupts on the given vector. On architectures which implement
      interrupt priority levels this may also disable all lower
      priority interrupts. This version differs from
      <TT
CLASS="FUNCTION"
>cyg_drv_interrupt_mask()</TT
> in not being
      interrupt safe. So in situations where, for example, interrupts
      are already known to be disabled, this may be called to avoid
      the extra overhead.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12076">cyg_drv_interrupt_unmask</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_unmask(cyg_vector_t vector )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector to unmask</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Program the interrupt controller to re-allow delivery of
      interrupts on the given <TT
CLASS="PARAMETER"
><I
>vector</I
></TT
>. </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12101">cyg_drv_interrupt_unmask_intunsafe</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_unmask_intunsafe(cyg_vector_t vector )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector to unmask</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Program the interrupt controller to re-allow delivery of
      interrupts on the given <TT
CLASS="PARAMETER"
><I
>vector</I
></TT
>. This
      version differs from
      <TT
CLASS="FUNCTION"
>cyg_drv_interrupt_unmask()</TT
> in not being
      interrupt safe.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12127">cyg_drv_interrupt_acknowledge</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_acknowledge( cyg_vector_t vector )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector to acknowledge</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Perform any processing required at the interrupt
      controller and in the CPU to cancel the current interrupt
      request on the <TT
CLASS="PARAMETER"
><I
>vector</I
></TT
>. An ISR may also
      need to program the hardware of the device to prevent an
      immediate re-triggering of the interrupt. </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12152">cyg_drv_interrupt_configure</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_configure( cyg_vector_t vector,
                                  cyg_bool_t level, 
                                  cyg_bool_t up
                                )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector to configure</P
><P
><TT
CLASS="PARAMETER"
><I
>level</I
></TT
> - level or edge triggered</P
><P
><TT
CLASS="PARAMETER"
><I
>up</I
></TT
> - rising/falling edge, high/low level</P
></DD
><DT
>Result:</DT
><DD
><P
>None</P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Program the interrupt controller with the characteristics
      of the interrupt source. The <TT
CLASS="PARAMETER"
><I
>level</I
></TT
>
      argument chooses between level- or edge-triggered
      interrupts. The <TT
CLASS="PARAMETER"
><I
>up</I
></TT
> argument chooses
      between high and low level for level triggered interrupts or
      rising and falling edges for edge triggered interrupts. This
      function only works with interrupt controllers that can control
      these parameters. </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12182">cyg_drv_interrupt_level</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_level( cyg_vector_t vector,
                              cyg_priority_t level
                            )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector to configure</P
><P
><TT
CLASS="PARAMETER"
><I
>level</I
></TT
> - level to set</P
></DD
><DT
>Result:</DT
><DD
><P
>None </P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>Program the interrupt controller to deliver the given
       interrupt at the supplied priority level. This function only
       works with interrupt controllers that can control this
       parameter.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12208">cyg_drv_interrupt_set_cpu</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void cyg_drv_interrupt_set_cpu( cyg_vector_t vector,
                                cyg_cpu_t cpu
                              )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - interrupt vector to route</P
><P
><TT
CLASS="PARAMETER"
><I
>cpu</I
></TT
> - destination CPU</P
></DD
><DT
>Result:</DT
><DD
><P
>None</P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>      This function causes all interrupts on the given vector to be
      routed to the specified CPU. Subsequently, all such interrupts
      will be handled by that CPU. This only works if the underlying
      hardware is capable of performing this kind of routing. This
      function does nothing on a single CPU system.
      </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12234">cyg_drv_interrupt_get_cpu</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Function:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>cyg_cpu_t cyg_drv_interrupt_set_cpu( cyg_vector_t vector )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Arguments:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - interrupt vector to query</P
></DD
><DT
>Result:</DT
><DD
><P
>The CPU to which this vector is routed</P
></DD
><DT
>Level:</DT
><DD
><P
>ISR</P
></DD
><DT
>Description:</DT
><DD
><P
>      In multi-processor systems this function returns the id of the
      CPU to which interrupts on the given vector are current being
      delivered. In single CPU systems this function returns zero.
      </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12258">cyg_ISR_t</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Type:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>typedef cyg_uint32 cyg_ISR_t( cyg_vector_t vector,
                              cyg_addrword_t data
                            )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Fields:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector being delivered</P
><P
><TT
CLASS="PARAMETER"
><I
>data</I
></TT
> - data value supplied by client</P
></DD
><DT
>Result:</DT
><DD
><P
>Bit mask indicating whether interrupt was handled and
      whether the DSR should be called. </P
></DD
><DT
>Description:</DT
><DD
><P
>Interrupt Service Routine definition. A pointer to a
      function with this prototype is passed to
      <TT
CLASS="FUNCTION"
>cyg_interrupt_create()</TT
> when an interrupt
      object is created. When an interrupt is delivered the function
      will be called with the vector number and the data value that
      was passed to <TT
CLASS="FUNCTION"
>cyg_interrupt_create()</TT
>.
      </P
><P
>The return value is a bit mask containing one or both of the
      following bits: </P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>CYG_ISR_HANDLED</DT
><DD
><P
>indicates that the interrupt was handled by this
	    ISR. It is a configuration option whether this will
	    prevent further ISR being run. </P
></DD
><DT
>CYG_ISR_CALL_DSR</DT
><DD
><P
>causes the DSR that was passed to
	    <TT
CLASS="FUNCTION"
>cyg_interrupt_create()</TT
> to be
	    scheduled to be called.</P
></DD
></DL
></DIV
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN12293">cyg_DSR_t</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Type:</DT
><DD
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>typedef void cyg_DSR_t( cyg_vector_t vector,
                        cyg_ucount32 count,
                        cyg_addrword_t data
                      )</PRE
></TD
></TR
></TABLE
></DD
><DT
>Fields:</DT
><DD
><P
><TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> - vector being delivered</P
><P
><TT
CLASS="PARAMETER"
><I
>count</I
></TT
> - number of times DSR has been scheduled</P
><P
><TT
CLASS="PARAMETER"
><I
>data</I
></TT
> - data value supplied by client</P
></DD
><DT
>Result:</DT
><DD
><P
>None</P
></DD
><DT
>Description:</DT
><DD
><P
>Deferred Service Routine prototype. A pointer to a
      function with this prototype is passed to
      <TT
CLASS="FUNCTION"
>cyg_interrupt_create()</TT
> when an interrupt
      object is created. When the ISR requests the scheduling of its
      DSR, this function will be called at some later point. In
      addition to the <TT
CLASS="PARAMETER"
><I
>vector</I
></TT
> and
      <TT
CLASS="PARAMETER"
><I
>data</I
></TT
> arguments, which will be the same as
      those passed to the ISR, this routine is also passed a
      <TT
CLASS="PARAMETER"
><I
>count</I
></TT
> of the number of times the ISR has
      requested that this DSR be scheduled.  This counter is zeroed
      each time the DSR actually runs, so it indicates how many
      interrupts have occurred since it last ran.</P
></DD
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="devapi-synchronization-levels.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ecos-ref.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="fileio.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Synchronization Levels</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="devapi-device-driver-interface-to-the-kernel.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>File System Support Infrastructure</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -