diff --git a/framework/rsc_enum.h b/framework/rsc_enum.h index 9013406..3b83e0c 100644 --- a/framework/rsc_enum.h +++ b/framework/rsc_enum.h @@ -68,7 +68,7 @@ typedef uint8_t ResourceMap[RSCMAP_LEN]; static inline bool rscmap_is_free(ResourceMap *rscmap, Resource rsc) { - return (0 == (*rscmap[((rsc)>>3)&0xFF] & (1<<((rsc)&0x7)))); + return (0 == ((*rscmap)[((rsc)>>3)&0xFF] & (1<<((rsc)&0x7)))); } static inline bool rscmap_is_held(ResourceMap *rscmap, Resource rsc) @@ -78,12 +78,12 @@ static inline bool rscmap_is_held(ResourceMap *rscmap, Resource rsc) static inline void rscmap_claim(ResourceMap *rscmap, Resource rsc) { - *rscmap[((rsc)>>3)&0xFF] |= (1<<((rsc)&0x7)); + (*rscmap)[((rsc)>>3)&0xFF] |= (1<<((rsc)&0x7)); } static inline void rscmap_free(ResourceMap *rscmap, Resource rsc) { - *rscmap[((rsc)>>3)&0xFF] &= ~(1<<((rsc)&0x7)); + (*rscmap)[((rsc)>>3)&0xFF] &= ~(1<<((rsc)&0x7)); } //#define RSC_IS_FREE(rscmap, rsc) (0 == (rscmap[((rsc)>>3)&0xFF] & (1<<((rsc)&0x7)))) diff --git a/platform/irq_dispatcher.c b/platform/irq_dispatcher.c index 7f00d8e..74e2fee 100644 --- a/platform/irq_dispatcher.c +++ b/platform/irq_dispatcher.c @@ -85,8 +85,6 @@ void irqd_init(void) // NVIC_EnableIRQ(TIM1_BRK_UP_TRG_COM_IRQn); /*!< TIM1 Break, Update, Trigger and Commutation Interrupt */ // - handled by hal msp init // NVIC_EnableIRQ(TIM1_CC_IRQn); /*!< TIM1 Capture Compare Interrupt */ // NVIC_EnableIRQ(USB_IRQn); /*!< USB global Interrupt & EXTI Line18 Interrupt */ // - USB IRQ is handled by the USB library - - hexDump("Callbacks", &callbacks, sizeof(callbacks)); } //void Default_Handler(void) @@ -147,12 +145,7 @@ static struct cbslot *get_slot_for_periph(void *periph) void irqd_attach(void *periph, IrqCallback callback, void *arg) { - dbg("Attach irqd for periph %p, cb %p()", periph, callback); - - hexDump("Callbacks", &callbacks, sizeof(callbacks)); - struct cbslot *slot = get_slot_for_periph(periph); - dbg("slot %p cb is %p()", slot, slot->callback); assert_param(slot->callback == NULL); slot->callback = callback; slot->arg = arg;