示例#1
0
文件: joystick.c 项目: Mazetti/asf
/*!
 * \brief Stop the joystick sensor.
 */
void v_joystick_stop( void )
{
  /* Disable joystick input change ITs. */
  gpio_disable_pin_interrupt( GPIO_JOYSTICK_UP );
  gpio_disable_pin_interrupt( GPIO_JOYSTICK_DOWN );
  gpio_disable_pin_interrupt( GPIO_JOYSTICK_RIGHT );
  gpio_disable_pin_interrupt( GPIO_JOYSTICK_LEFT );
  gpio_disable_pin_interrupt( GPIO_JOYSTICK_PUSH );
}
示例#2
0
void encoder_init_all ()
	{
	uint8_t isr_counter = 0;
	
	Disable_global_interrupt();
	/* Initialization loop, this loop inits all required IO and interrupts
	 * for EIC module and pins used to read encoders.  */	
	while(isr_counter < ENCODER_COUNT)
		{
		/* Init io for interrupt line and state poll line. */
		gpio_enable_gpio_pin(encoder_handle[isr_counter].a_pin);
		gpio_enable_gpio_pin(encoder_handle[isr_counter].b_pin);
		
		/* Set pullup for both gpio channels. */
		gpio_enable_pin_pull_up(encoder_handle[isr_counter].a_pin);
		gpio_enable_pin_pull_up(encoder_handle[isr_counter].b_pin);
			
		/* Init interrupt from encoder A line */
		gpio_enable_pin_interrupt(encoder_handle[isr_counter].a_pin, GPIO_FALLING_EDGE);
		gpio_disable_pin_interrupt(encoder_handle[isr_counter].b_pin);
		
		INTC_register_interrupt(&encoders_and_buttons_isr, 
			AVR32_GPIO_IRQ_0 + (encoder_handle[isr_counter].a_pin/8),
			AVR32_INTC_INT0);			
		isr_counter++;
		}
	Enable_global_interrupt();
	}
示例#3
0
文件: rtouch.c 项目: InSoonPark/asf
static void inline rtouch_disable_detect_int(void)
{
	/* Disable interrupt for Y lines. */
	/* Clear the pin interrupt, or otherwise it will trigger when
	 * enabled again */
	gpio_clear_pin_interrupt_flag(rtouch_gpio_ymap[0].pin);
	gpio_disable_pin_interrupt(rtouch_gpio_ymap[0].pin);
}
示例#4
0
__interrupt
#endif
void touch_button_isr(void)
{
  // Unfreeze the clock (this has been done in the SUSPEND state
  Usb_unfreeze_clock();

  // Launch the remote wakeup
  Usb_initiate_remote_wake_up();

  //Disable the GPIO activity detection
  gpio_clear_pin_interrupt_flag(QT1081_TOUCH_SENSOR_ENTER);
  gpio_disable_pin_interrupt(QT1081_TOUCH_SENSOR_ENTER);
}
示例#5
0
文件: pushb.c 项目: kerichsen/asf
/*!
 * \brief Stop the push button 3 sensor.
 */
void v_pushb3_stop( void )
{
  /* Disable the IT. */
  gpio_disable_pin_interrupt( PB3_POSITION );
}