On 21/07/2021 20:28, Gedare Bloom wrote:
Why not throw an error here instead? In production, you wouldn't want this code...
The main issue is the bad chip design. If we don't have this code, we can't test the extended interrupts. In production, you want tested code.
+ rtems_interrupt_lock_context lock_context; + + /* + * This is a very dangerous operation and should only be used for test + * software. We may accidentally clear the pending state set by + * peripherals with this read-modify-write operation. + */ + LEON3_IRQCTRL_ACQUIRE(&lock_context); + LEON3_IrqCtrl_Regs->ipend |= bit; + LEON3_IRQCTRL_RELEASE(&lock_context); + } + + return RTEMS_SUCCESSFUL; }
-- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel