Skip to content

Commit 61690c6

Browse files
Daniel Newtonjgriffiths
authored andcommitted
change name of usb_connected() to usb_is_powered()
1 parent 3f207ee commit 61690c6

File tree

18 files changed

+18
-18
lines changed

18 files changed

+18
-18
lines changed

main/gui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ static bool update_status_bar(const bool force_redraw)
21912191
status_bar.updated = true;
21922192
}
21932193

2194-
const bool new_usb = usb_connected();
2194+
const bool new_usb = usb_is_powered();
21952195
if (new_usb != status_bar.last_usb_val) {
21962196
status_bar.last_usb_val = new_usb;
21972197
if (new_usb) {

main/idletimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void idletimer_task(void* ignore)
133133
if (!idle_timeout_disabled && (projected_timeout_time <= checktime)) {
134134
// If usb is connected instead of deactivating we can reboot (if wallet loaded) and dim the screen
135135
typedef enum { SCREEN_DIMMED, REBOOT, POWER_OFF } reset_action_t;
136-
reset_action_t action = !usb_connected() ? POWER_OFF : (keychain_get() ? REBOOT : SCREEN_DIMMED);
136+
reset_action_t action = !usb_is_powered() ? POWER_OFF : (keychain_get() ? REBOOT : SCREEN_DIMMED);
137137
JADE_LOGW("Idle-timeout elapsed - action: %u", action);
138138

139139
if (action != SCREEN_DIMMED) {

main/power.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ uint16_t power_get_vusb(void);
3131
uint16_t power_get_iusb(void);
3232
uint16_t power_get_temp(void);
3333

34-
bool usb_connected(void);
34+
bool usb_is_powered(void);
3535

3636
#ifdef CONFIG_IDF_TARGET_ESP32S3
3737
void enable_usb_host(void);

main/power/ip5306.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ uint16_t power_get_vusb(void) { return 0; }
8686
uint16_t power_get_iusb(void) { return 0; }
8787
uint16_t power_get_temp(void) { return 0; }
8888

89-
bool usb_connected(void)
89+
bool usb_is_powered(void)
9090
{
9191
uint8_t chargedata, chargedata2;
9292
JADE_SEMAPHORE_TAKE(i2c_mutex);

main/power/jadev10.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ uint16_t power_get_temp(void)
205205
return temp;
206206
}
207207

208-
bool usb_connected(void)
208+
bool usb_is_powered(void)
209209
{
210210
uint8_t buf;
211211
JADE_SEMAPHORE_TAKE(i2c_mutex);

main/power/jadev11.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ uint16_t power_get_temp(void)
261261
return temp;
262262
}
263263

264-
bool usb_connected(void)
264+
bool usb_is_powered(void)
265265
{
266266
uint8_t buf;
267267
JADE_SEMAPHORE_TAKE(i2c_mutex);

main/power/jadev20.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void enable_usb_host(void)
274274
JADE_SEMAPHORE_GIVE(i2c_mutex);
275275
}
276276

277-
bool usb_connected(void)
277+
bool usb_is_powered(void)
278278
{
279279
uint8_t usb_type;
280280
JADE_SEMAPHORE_TAKE(i2c_mutex);

main/power/m5stackcores3.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ uint16_t power_get_iusb(void) { return 0; }
8585

8686
uint16_t power_get_temp(void) { return 0; }
8787

88-
bool usb_connected(void) { return false; }
88+
bool usb_is_powered(void) { return false; }

main/power/m5stickcplus.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ uint16_t power_get_temp(void)
361361
return temp;
362362
}
363363

364-
bool usb_connected(void)
364+
bool usb_is_powered(void)
365365
{
366366
uint8_t buf;
367367
JADE_SEMAPHORE_TAKE(i2c_mutex);

main/power/m5stickcplus2.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ uint16_t power_get_vusb(void) { return 0; }
8181
uint16_t power_get_iusb(void) { return 0; }
8282
uint16_t power_get_temp(void) { return 0; }
8383

84-
bool usb_connected(void) { return true; }
84+
bool usb_is_powered(void) { return true; }

0 commit comments

Comments
 (0)