From 7db47491ee3d18362dc1e08b78595e71442d7c25 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Tue, 6 Oct 2015 17:06:25 +0100 Subject: [PATCH] irq: Added a FLAG_USER to the set This one has no functional use, but can be used by application to (for example) differentiate two IRQ source. Signed-off-by: Michel Pollet --- simavr/sim/sim_irq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simavr/sim/sim_irq.h b/simavr/sim/sim_irq.h index d3ac30b..f40809c 100644 --- a/simavr/sim/sim_irq.h +++ b/simavr/sim/sim_irq.h @@ -50,12 +50,12 @@ typedef void (*avr_irq_notify_t)( uint32_t value, void * param); - enum { IRQ_FLAG_NOT = (1 << 0), //!< change polarity of the IRQ IRQ_FLAG_FILTERED = (1 << 1), //!< do not "notify" if "value" is the same as previous raise IRQ_FLAG_ALLOC = (1 << 2), //!< this irq structure was malloced via avr_alloc_irq IRQ_FLAG_INIT = (1 << 3), //!< this irq hasn't been used yet + IRQ_FLAG_USER = (1 << 4), //!< Can be used by irq users }; /* @@ -71,7 +71,7 @@ typedef struct avr_irq_pool_t { */ typedef struct avr_irq_t { struct avr_irq_pool_t * pool; // TODO: migration in progress - const char * name; + const char * name; uint32_t irq; //!< any value the user needs uint32_t value; //!< current value uint8_t flags; //!< IRQ_* flags -- 2.39.5