This is used by [[BTM_services|btm]], this should not be used by other processes.
This is used by [[BTM_services|btm]], this should not be used by other processes.
+
+
This first initializes the funcptr table interfaces to the defaults (same as [[#DisableBluetooth]]). [[Settings_services#GetConfigurationId1|GetConfigurationId1]] is used, an error is thrown if the output string is empty, or if it matches "SDEV_00_01_00".
+
+
If the flag for [[#IsManufacturingMode]] is 0, or if this cmd was already used where that flag was 1, an interface funcptr is called. This is passed a ptr to a table of funcptrs. The ret is converted to a Result and returned if needed.
+
+
The funcptr does the following:
+
* A func is called, which copies the input funcptr table into global state. These are used for writing events into [[#EventInfo]].
+
* A func is called 5 times with input param = [1-5]. This initializes the specified nn::bluetooth::CircularBuffer (sharedmem and internal).
+
* A func is called for creating the "nn.bluetooth.HidMessageHandler" thread.
+
+
Lastly, the Event is created and returned (which global state the Event is stored in depends on whether the code-path which calls the above funcptr was used).