Skip to content

Commit

Permalink
tests: gpio: basic_api: correct constant test for interrupt trigger
Browse files Browse the repository at this point in the history
Interrupts default to trigger on level for historical reasons, so use of
GPIO_INT_LEVEL` as a mask results in a zero value.  Use a mask macro to
isolate the trigger configuration.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
  • Loading branch information
pabigot committed Feb 5, 2019
1 parent e0e3d38 commit 241f9b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static int test_callback(int mode)
goto pass_exit;
}

if ((mode & GPIO_INT_LEVEL) == GPIO_INT_LEVEL) {
if ((mode & GPIO_INT_TRIGGER_MASK) == GPIO_INT_LEVEL) {
if (cb_cnt != MAX_INT_CNT) {
TC_ERROR("not trigger callback correctly\n");
goto err_exit;
Expand Down

0 comments on commit 241f9b4

Please sign in to comment.