-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The last commit that added "_array" to the DMA ifcr and isr register, so that interrupt flags can be addressed using the channel index instead of hard coded names is only partially correct.
The isr register, which is Read only, can address each flag separately using and index, here is the code generated for one flag:
/**Channel [1-3] Global interrupt flag*/ #[inline(always)] pub unsafe fn gif(&self, n: u8) -> GIF_R { GIF_R::new(((self.bits >> ((n - 1) * 4)) & 1) != 0) }
The ifcr register, which is Write only, doesn't have that generated code. I am having to redo the bit swizzling in the HAL code as there is no way to clear a flag using a DMA channel index. I think that the problem is in the code generation, as I did not detect any differences in the patched svd file.