System calls

System.setControlRequestFilter

Since 3.3.0:

Various system parameters can be configued by control requests, which can be sent over USB or authenticated BLE. The default is that requests are allowed.

// PROTOTYPE
int setControlRequestFilter(SystemControlRequestAclAction defaultAction, Vector<SystemControlRequestAcl> filters = {})

// EXAMPLE - Allow all control requests (this is the default)
System.setControlRequestFilter(SystemControlRequestAclAction::ACCEPT);

SystemControlRequestAclAction

The three available actions are:

  • SystemControlRequestAclAction::NONE (0)
  • SystemControlRequestAclAction::ACCEPT (1)
  • SystemControlRequestAclAction::DENY (2)

You will typically only use ACCEPT or DENY.

SystemControlRequestAcl

This class is used to contain an allow or deny for a specific control request. A vector of these is passed to System.setControlRequestFilter.

// PROTOTYPE (constructor)
SystemControlRequestAcl(ctrl_request_type type, SystemControlRequestAclAction action)

ctrl_request_type

There are many of available control requests but you will rarely need fine-grained control over which are enabled.

Additional information can be found in: