Skip to content

DMA ifcr register doesn't have indexed writer #6

@gpgreen

Description

@gpgreen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions