SWRA769 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 executionand 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. It is preferred to start the value with “0x” and use a six digit value after that. Without doing this, the Class of Device writtenwill be assumed decimal and will be converted to hexadecimal format and change the values given.
"SetClassOfDevice 123456" Attempts to set the Class of Device for the local Bluetooth Device to "0x01E240" which is equivalent to the decimal value of 123456.
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 writtento the local Bluetooth device. This function will return zero if the class of device was successfully changed, or a negative return error code if there was an error condition.