SWRA770 august 2023 CC2564C
The SetClassOfDevice command is responsible for setting the class of device of the local Bluetooth Device to a class of device value. This function returns zero on a successful execution and a negative value on all errors. A Bluetooth Stack ID must exist before attempting to call this function.
The only parameter needed is the new class of device value. Start the value with “0x” and use a six digit value after that. If this is not done, the class of device written is assumed decimal and is converted to hexadecimal format and changes the values given.
GAP_Set_Class_of_Device(BluetoothStackID, Class_of_Device)
int BTPSAPI GAP_Set_Class_Of_Device(unsigned int BluetoothStackID, Class_of_Device_t Class_of_Device)
This function is provided to allow the changing of the class of device of the local Bluetooth Device. The Class_of_Device parameter represents the class of device value that is to be written to the local Bluetooth Device. This function returns zero if the class of device was successfully changed, or a negative return error code if there was an error condition.