USB device bulk in/out communicatiion control

I have a beaglebone black, It has a usb device, when i connect it to PC, PC shows the U disk device
If i want to change it for BULK IN / OUT communication control
How do i set kernel menuconfig? How do i coding the application?? is there any example??