File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 43
43
44
44
#include "lpc17xx_wdt.h"
45
45
46
- #define ISP_BTN P2_12
46
+ #define PLAY_BTN P2_12
47
+ #define ISP_BTN P2_10
48
+
49
+ #define DFU_BTN PLAY_BTN
47
50
48
51
#ifndef DEBUG_MESSAGES
49
52
#define printf (...) do {} while (0)
@@ -64,9 +67,9 @@ void setleds(int leds)
64
67
GPIO_write (LED5 , leds & 16 );
65
68
}
66
69
67
- int isp_btn_pressed (void )
70
+ int dfu_btn_pressed (void )
68
71
{
69
- return GPIO_get (ISP_BTN );
72
+ return GPIO_get (DFU_BTN );
70
73
}
71
74
72
75
void start_dfu (void )
@@ -182,7 +185,7 @@ int main(void)
182
185
{
183
186
WDT_Feed ();
184
187
185
- GPIO_init (ISP_BTN ); GPIO_input (ISP_BTN );
188
+ GPIO_init (DFU_BTN ); GPIO_input (DFU_BTN );
186
189
187
190
GPIO_init (LED1 ); GPIO_output (LED1 );
188
191
GPIO_init (LED2 ); GPIO_output (LED2 );
@@ -210,7 +213,7 @@ int main(void)
210
213
check_sd_firmware ();
211
214
212
215
int dfu = 0 ;
213
- if (isp_btn_pressed () == 0 )
216
+ if (dfu_btn_pressed () == 0 )
214
217
{
215
218
printf ("ISP button pressed, entering DFU mode\n" );
216
219
dfu = 1 ;
You can’t perform that action at this time.
0 commit comments