Im working on a somewhat universal powerbank for cellphones (lt1374 switching regulator provides 5v fed to female USB). It seems that to get a fast charge (1-2A) on an iPhone it needs 2.8v on D- and 2.0v on the D+ line of the USB, certain Samsung tablets need 1.25v on both D+ and D- and others (I believe newer spec) simply need the D+ and D- lines shorted.
You can get these voltages by using voltage dividers but in order to simplify I'm currently applying these voltages through PWM pins on an Arduino and an RC filter to convert the PWM to different voltages (set using a button and a switchcase). For the Samsung this works fine and I presume also for the iPhone (cellphones recognise high charge capability) but where I am stumped is how to create the third option: shorting the D+ and D- pins . How would you go about this? Transistors... mosfet?