From: Michel Pollet Date: Tue, 6 Oct 2015 16:06:25 +0000 (+0100) Subject: irq: Added a FLAG_USER to the set X-Git-Tag: v1.6~49 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=7db47491ee3d18362dc1e08b78595e71442d7c25;p=sx%2Fsimavr.git 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 --- 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