Merge "stm32: use level interrupt instead of edge"

This commit is contained in:
Vincent Palatin
2012-05-30 16:27:51 -07:00
committed by Gerrit Code Review
5 changed files with 11 additions and 11 deletions

View File

@@ -135,11 +135,10 @@ void configure_board(void)
gpio_set_level(GPIO_EC_INT, 1);
}
void board_interrupt_host(void)
void board_interrupt_host(int active)
{
/* interrupt host by toggling EC_INT */
gpio_set_level(GPIO_EC_INT, 0);
gpio_set_level(GPIO_EC_INT, 1);
/* interrupt host by using active low EC_INT signal */
gpio_set_level(GPIO_EC_INT, !active);
}
void board_keyboard_suppress_noise(void)

View File

@@ -85,6 +85,6 @@ void matrix_interrupt(enum gpio_signal signal);
void board_keyboard_suppress_noise(void);
/* Signal to AP that data is waiting */
void board_interrupt_host(void);
void board_interrupt_host(int active);
#endif /* __BOARD_H */

View File

@@ -107,9 +107,8 @@ void configure_board(void)
gpio_set_level(GPIO_EC_INT, 1);
}
void board_interrupt_host(void)
void board_interrupt_host(int active)
{
/* interrupt host by toggling EC_INT */
gpio_set_level(GPIO_EC_INT, 0);
gpio_set_level(GPIO_EC_INT, 1);
/* interrupt host by using active low EC_INT signal */
gpio_set_level(GPIO_EC_INT, !active);
}

View File

@@ -80,6 +80,6 @@ void configure_board(void);
void matrix_interrupt(enum gpio_signal signal);
/* Signal to AP that data is waiting */
void board_interrupt_host(void);
void board_interrupt_host(int active);
#endif /* __BOARD_H */

View File

@@ -307,7 +307,7 @@ static int check_keys_changed(void)
CPUTS("]\n");
if (kb_fifo_add(raw_state) == EC_SUCCESS)
board_interrupt_host();
board_interrupt_host(1);
else
CPRINTF("dropped keystroke\n");
}
@@ -383,6 +383,8 @@ int keyboard_scan_recovery_pressed(void)
static int keyboard_get_scan(uint8_t *data, int *resp_size)
{
kb_fifo_remove(data);
if (!kb_fifo_entries)
board_interrupt_host(0);
*resp_size = KB_OUTPUTS;
return EC_RES_SUCCESS;