summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/xduoo/button-xduoo.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/xduoo/button-xduoo.c')
-rw-r--r--firmware/target/hosted/xduoo/button-xduoo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/target/hosted/xduoo/button-xduoo.c b/firmware/target/hosted/xduoo/button-xduoo.c
index 99b0908378..503e49e001 100644
--- a/firmware/target/hosted/xduoo/button-xduoo.c
+++ b/firmware/target/hosted/xduoo/button-xduoo.c
@@ -138,15 +138,22 @@ int button_read_device(void)
138 138
139bool headphones_inserted(void) 139bool headphones_inserted(void)
140{ 140{
141#ifdef BOOTLOADER
142 int ps = 0;
143#else
141 int ps = xduoo_get_outputs(); 144 int ps = xduoo_get_outputs();
145#endif
142 146
143 return (ps == 2 || ps == 3); 147 return (ps == 2 || ps == 3);
144} 148}
145 149
146bool lineout_inserted(void) 150bool lineout_inserted(void)
147{ 151{
152#ifdef BOOTLOADER
153 int ps = 0;
154#else
148 int ps = xduoo_get_outputs(); 155 int ps = xduoo_get_outputs();
149 156#endif
150 return (ps == 1); 157 return (ps == 1);
151} 158}
152 159