Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
fc5fca51
Commit
fc5fca51
authored
7 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Add MAX value definitions to go along with irq_t and irq_mapped_t
parent
e1218c4b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/Kconfig
+2
-2
2 additions, 2 deletions
arch/Kconfig
include/nuttx/irq.h
+22
-2
22 additions, 2 deletions
include/nuttx/irq.h
with
24 additions
and
4 deletions
arch/Kconfig
+
2
−
2
View file @
fc5fca51
...
@@ -644,10 +644,10 @@ config ARCH_MINIMAL_VECTORTABLE
...
@@ -644,10 +644,10 @@ config ARCH_MINIMAL_VECTORTABLE
This table is index by the hardware IRQ number and provides a value
This table is index by the hardware IRQ number and provides a value
in the range of 0 to CONFIG_ARCH_NUSER_INTERRUPTS that is the new,
in the range of 0 to CONFIG_ARCH_NUSER_INTERRUPTS that is the new,
mapped index into the vector table. Unused, unmapped interrupts
mapped index into the vector table. Unused, unmapped interrupts
should be set to
(irq_mapped_t)-1
. So, for example, if g_irqmap[37]
should be set to
IRQMAPPED_MAX
. So, for example, if g_irqmap[37]
== 24, then the hardware interrupt vector 37 will be mapped to the
== 24, then the hardware interrupt vector 37 will be mapped to the
interrupt vector table at index 24. if g_irqmap[42] ==
interrupt vector table at index 24. if g_irqmap[42] ==
(irq_mapped_t)-1
, then hardware interrupt vector 42 is not used and
IRQMAPPED_MAX
, then hardware interrupt vector 42 is not used and
if it occurs will result in an unexpected interrupt crash.
if it occurs will result in an unexpected interrupt crash.
config ARCH_NUSER_INTERRUPTS
config ARCH_NUSER_INTERRUPTS
...
...
This diff is collapsed.
Click to expand it.
include/nuttx/irq.h
+
22
−
2
View file @
fc5fca51
...
@@ -52,13 +52,33 @@
...
@@ -52,13 +52,33 @@
* Pre-processor Definitions
* Pre-processor Definitions
****************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
/* IRQ detach is a convenience definition. Detaching an interrupt handler
/* IRQ detach is a convenience definition. Detaching an interrupt handler
* is equivalent to setting a NULL interrupt handler.
* is equivalent to setting a NULL interrupt handler.
*/
*/
#ifndef __ASSEMBLY__
# define irq_detach(isr) irq_attach(isr, NULL, NULL)
# define irq_detach(isr) irq_attach(isr, NULL, NULL)
#endif
/* Maximum/minimum values of IRQ integer types */
# if NR_IRQS <= 256
# define IRQT_MAX UINT8_MAX
# elif NR_IRQS <= 65536
# define IRQT_MAX UINT16_MAX
# else
# define IRQT_MAX UINT32_MAX
# endif
# ifdef CONFIG_ARCH_MINIMAL_VECTORTABLE
# if CONFIG_ARCH_NUSER_INTERRUPTS <= 256
# define IRQMAPPED_MAX UINT8_MAX
# elif CONFIG_ARCH_NUSER_INTERRUPTS <= 65536
# define IRQMAPPED_MAX UINT16_MAX
# else
# define IRQMAPPED_MAX UINT32_MAX
# endif
#endif
/* __ASSEMBLY__ */
/****************************************************************************
/****************************************************************************
* Public Types
* Public Types
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment