View Single Post
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#350
Originally Posted by pobstil View Post
The same file changes based on the mode, but doesn't display 'otg' or 'host', rather 'a_wait_bcon' and 'b_idle'.. I guess that might be reliable enough to check the state?
Looks like it returns one of these when in host mode:
a_idle
a_wait_vrise
a_wait_bcon
a_host
a_suspend
a_peripheral
a_wait_vfall
a_vbus_err

And one of these in OTG mode:
b_idle
b_srp_init
b_peripheral
b_wait_acon
b_host

I think when connected, it will return a_host or b_host depending on mode. Could you test both modes connected to devices and tell me if this is correct? I can use this to display "connected" in the widget.

Do you know what peripheral mode is for? Does adv-power support it?