summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/system-as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/system-as3525.c')
-rw-r--r--firmware/target/arm/as3525/system-as3525.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 2e4747efaf..8f6291201f 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -173,9 +173,7 @@ void fiq_handler(void)
173} 173}
174 174
175#if defined(SANSA_C200V2) 175#if defined(SANSA_C200V2)
176#include "dbop-as3525.h" 176int c200v2_variant;
177
178int c200v2_variant = 0;
179 177
180static void check_model_variant(void) 178static void check_model_variant(void)
181{ 179{
@@ -188,24 +186,22 @@ static void check_model_variant(void)
188 * to charge the input capacitance */ 186 * to charge the input capacitance */
189 for (i=0; i<1000; i++) asm volatile ("nop\n"); 187 for (i=0; i<1000; i++) asm volatile ("nop\n");
190 /* read the pullup/pulldown value on A7 to determine the variant */ 188 /* read the pullup/pulldown value on A7 to determine the variant */
191 if (GPIOA_PIN(7) == 0) { 189 c200v2_variant = !GPIOA_PIN(7);
192 /*
193 * Backlight on A7.
194 */
195 c200v2_variant = 1;
196 } else {
197 /*
198 * Backlight on A5.
199 */
200 c200v2_variant = 0;
201 }
202 GPIOA_DIR = saved_dir; 190 GPIOA_DIR = saved_dir;
203} 191}
192#elif defined(SANSA_FUZEV2)
193int fuzev2_variant;
194
195static void check_model_variant(void)
196{
197 GPIOB_DIR &= ~(1<<5);
198 fuzev2_variant = !!GPIOB_PIN(5);
199}
204#else 200#else
205static inline void check_model_variant(void) 201static inline void check_model_variant(void)
206{ 202{
207} 203}
208#endif /* SANSA_C200V2*/ 204#endif /* model selection */
209 205
210void system_init(void) 206void system_init(void)
211{ 207{