pub fn enable_interrupt(&mut self, edge: Edge, channel: GpioteChannel) {
        let gpiote_regs = unsafe { &*GPIOTE::ptr() };

        gpiote_regs.config[channel as usize].modify(|_, w| unsafe {
            w.mode().bits(GpioteMode::Event as u8);
            w.psel().bits(self.pin);
            w.port().bit(self.port as u8 != 0);
            w.polarity().bits(edge as u8)
        });

        gpiote_regs
            .intenset
            .write(|w| unsafe { w.bits(1 << channel as usize) })
    }
/// Enable a GPIO pin interrupt. Sets `GPIOTE_INTENSET` register.
Enable a GPIO pin interrupt.
Enable a GPIO pin interrupt .
pub fn enable_interrupt(&mut self, edge: Edge, channel: GpioteChannel) {
        let gpiote_regs = unsafe { &*GPIOTE::ptr() };
        gpiote_regs.config[channel as usize].modify(|_, w| unsafe {
            w.mode().bits(GpioteMode::Event as u8);
            w.psel().bits(self.pin);
            w.port().bit(self.port as u8 != 0);
            w.polarity().bits(edge as u8)
        });
        gpiote_regs
            .intenset
            .write(|w| unsafe { w.bits(1 << channel as usize) })
    }
pub fn enable_interrupt ( & mut self , edge : Edge , channel : GpioteChannel ) { let gpiote_regs = unsafe { & * GPIOTE :: ptr ( ) } ; gpiote_regs . config [ channel as usize ] . modify ( | _ , w | unsafe { w . mode ( ) . bits ( GpioteMode :: Event as u8 ) ; w . psel ( ) . bits ( self . pin ) ; w . port ( ) . bit ( self . port as u8 != 0 ) ; w . polarity ( ) . bits ( edge as u8 ) } ) ; gpiote_regs . intenset . write ( | w | unsafe { w . bits ( 1 << channel as usize ) } ) }
Enable a GPIO pin interrupt.
Enable a GPIO pin interrupt .
&mut self
edge
Edge
channel
GpioteChannel
&mut self
edge
Edge
channel
GpioteChannel