Skip to content

Commit

Permalink
Posix: add test for allowing/disallowing incoming connections
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoquesada committed Oct 9, 2024
1 parent 41724df commit de11e6f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/posix/src/my_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ static void posix_on_controller_data(uni_hid_device_t* d, uni_controller_t* ctl)
uni_bt_start_scanning_and_autoconnect_safe();
enabled = true;
}

if (gp->buttons & BUTTON_THUMB_L) {
logi("Incoming connections allowed\n");
uni_bt_allow_incoming_connections(true);
} else if (gp->buttons & BUTTON_THUMB_R) {
logi("Incoming connections disallowed\n");
uni_bt_allow_incoming_connections(false);
}
break;
case UNI_CONTROLLER_CLASS_MOUSE:
// TODO: Do something
Expand Down

0 comments on commit de11e6f

Please sign in to comment.