File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,20 @@ uint16_t power_get_iusb(void) { return 0; }
249249
250250uint16_t power_get_temp (void ) { return 0 ; }
251251
252+ void disable_usb_host (void )
253+ {
254+ JADE_SEMAPHORE_TAKE (i2c_mutex);
255+ I2C_LOG_ANY_ERROR (_power_write_command (PMIC_ADDR, PMIC_REG_OTG, 0x00 ));
256+ JADE_SEMAPHORE_GIVE (i2c_mutex);
257+ }
258+
259+ void enable_usb_host (void )
260+ {
261+ JADE_SEMAPHORE_TAKE (i2c_mutex);
262+ I2C_LOG_ANY_ERROR (_power_write_command (PMIC_ADDR, PMIC_REG_OTG, 0x01 ));
263+ JADE_SEMAPHORE_GIVE (i2c_mutex);
264+ }
265+
252266bool usb_connected (void )
253267{
254268 uint8_t usb_type;
Original file line number Diff line number Diff line change @@ -28,4 +28,7 @@ uint16_t power_get_vusb(void) { return 0; }
2828uint16_t power_get_iusb (void ) { return 0 ; }
2929uint16_t power_get_temp (void ) { return 0 ; }
3030
31+ void disable_usb_host (void ) {}
32+ void enable_usb_host (void ) {}
33+
3134bool usb_connected (void ) { return true ; }
You can’t perform that action at this time.
0 commit comments