Exemple #1
0
    def _parse_interrupts(self, interrupt_node):
        tags = [
            TextElement('name'),
            OptionalElement(TextElement('description')),
            TextElement('value'),
        ]

        for (name, value,
             description) in _parse_sequences(interrupt_node, *tags):
            yield SVDInterrupt(name=_get_text(interrupt_node, 'name'),
                               value=_get_int(interrupt_node, 'value'),
                               description=_get_text(interrupt_node,
                                                     'description'))
Exemple #2
0
 def _parse_interrupt(self, interrupt_node):
     return SVDInterrupt(
         name=_get_text(interrupt_node, 'name'),
         value=_get_int(interrupt_node, 'value'),
         description=_get_text(interrupt_node, 'description')
     )