I'm working on my first battery powered project and I'm using USB for charging (no data). As part of the user interface for the device I need to be able to tell the difference between two different charging bases. The UI changes when the device is plugged into 'base A' and a different behavior when it is plugged into 'base B'. The device needs to be able to identify the two different bases even if the base is unplugged. This isn't for something like setting the charging rate, it is purely a UI behavior specific to the device.
My initial plan was to use the ID pin for this, but it seems that using D+ and D- are preferred. However the USB battery charger spec says that Dedicated Charging Port should short D+ to D-.
My current idea is to pull D+ to 3v3 though a 4k7, D- to ground with a 4k7 and connect D- to an ADC pin. In one base I'll put a 4k7 and the other a 10k across D+/D-. This way I'll be able to tell if the device is connected to the base even if the base itself is not plugged in (the 3v3 comes from the battery). Most chargers seem to leave D+ and D- open others short D+ to D-. If D+/D- is open I'll get 0V on the ADC and 1.65V if it is shorted. However, I'm not sure how a PC handle having D+ at 3v3 and D- at GND.
I realize this is non-standard, but any ideas how non-compatible it will be? Any ideas for a better way to implement this?