summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sansa-fuze/button-fuze.c')
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/button-fuze.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
index ff07965f90..e52a1d37d8 100644
--- a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
+++ b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
@@ -42,8 +42,8 @@ static bool hold_button_old = false;
42#else 42#else
43#define hold_button false 43#define hold_button false
44#endif /* !BOOTLOADER */ 44#endif /* !BOOTLOADER */
45static int int_btn = BUTTON_NONE; 45static int int_btn = BUTTON_NONE;
46static short dbop_din = BUTTON_NONE; 46short _dbop_din = BUTTON_NONE;
47 47
48void button_init_device(void) 48void button_init_device(void)
49{ 49{
@@ -76,7 +76,7 @@ static void get_wheel(void)
76 { 2, 0, 3, 1 }, /* Clockwise rotation */ 76 { 2, 0, 3, 1 }, /* Clockwise rotation */
77 { 1, 3, 0, 2 }, /* Counter-clockwise */ 77 { 1, 3, 0, 2 }, /* Counter-clockwise */
78 }; 78 };
79 wheel_value = dbop_din & (1<<13|1<<14); 79 wheel_value = _dbop_din & (1<<13|1<<14);
80 wheel_value >>= 13; 80 wheel_value >>= 13;
81 /* did the wheel value change? */ 81 /* did the wheel value change? */
82 if (!hold_button) 82 if (!hold_button)
@@ -130,7 +130,7 @@ static void get_wheel(void)
130/* get hold button state */ 130/* get hold button state */
131static void get_hold(void) 131static void get_hold(void)
132{ 132{
133 hold_button = dbop_din & (1<<12); 133 hold_button = _dbop_din & (1<<12);
134} 134}
135#endif 135#endif
136 136
@@ -141,7 +141,7 @@ bool button_hold(void)
141 141
142static void get_power(void) 142static void get_power(void)
143{ 143{
144 if (dbop_din & (1<<8)) 144 if (_dbop_din & (1<<8))
145 int_btn |= BUTTON_POWER; 145 int_btn |= BUTTON_POWER;
146} 146}
147 147
@@ -172,7 +172,7 @@ static void get_button_from_dbob(void)
172 temp = DBOP_STAT; 172 temp = DBOP_STAT;
173 } while ((temp & (1<<16)) == 0); /* wait for valid data */ 173 } while ((temp & (1<<16)) == 0); /* wait for valid data */
174 174
175 dbop_din = DBOP_DIN; /* now read */ 175 _dbop_din = DBOP_DIN; /* now read */
176 176
177 DBOP_TIMPOL_01 = 0x6e167; 177 DBOP_TIMPOL_01 = 0x6e167;
178 DBOP_TIMPOL_23 = 0xa167e06f; 178 DBOP_TIMPOL_23 = 0xa167e06f;