diff options
Diffstat (limited to 'firmware/target/arm/as3525/system-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 26 |
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" | 176 | int c200v2_variant; |
177 | |||
178 | int c200v2_variant = 0; | ||
179 | 177 | ||
180 | static void check_model_variant(void) | 178 | static 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) | ||
193 | int fuzev2_variant; | ||
194 | |||
195 | static void check_model_variant(void) | ||
196 | { | ||
197 | GPIOB_DIR &= ~(1<<5); | ||
198 | fuzev2_variant = !!GPIOB_PIN(5); | ||
199 | } | ||
204 | #else | 200 | #else |
205 | static inline void check_model_variant(void) | 201 | static inline void check_model_variant(void) |
206 | { | 202 | { |
207 | } | 203 | } |
208 | #endif /* SANSA_C200V2*/ | 204 | #endif /* model selection */ |
209 | 205 | ||
210 | void system_init(void) | 206 | void system_init(void) |
211 | { | 207 | { |