File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
source/hic_hal/maxim/max32625 Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ static inline void use_vddioh(int port, int pin)
57
57
}
58
58
59
59
/******************************************************************************/
60
+ #if !defined(MAX3625_FORCE_IO_SWD_EXT ) && !defined(MAX3625_FORCE_IO_DIP_EXT )
60
61
static uint16_t readADC (uint8_t ch )
61
62
{
62
63
uint32_t ctrl_tmp ;
@@ -95,6 +96,7 @@ static uint16_t readADC(uint8_t ch)
95
96
96
97
return (uint16_t )(MXC_ADC -> data );
97
98
}
99
+ #endif
98
100
99
101
/******************************************************************************/
100
102
void target_set_interface (TARGET_INTERFACE mode )
@@ -195,6 +197,11 @@ void gpio_init(void)
195
197
MXC_PWRMAN -> pwr_rst_ctrl |= MXC_F_PWRMAN_PWR_RST_CTRL_AFE_POWERED ;
196
198
MXC_CLKMAN -> clk_ctrl |= MXC_F_CLKMAN_CLK_CTRL_ADC_CLOCK_ENABLE ;
197
199
200
+ #if defined(MAX3625_FORCE_IO_SWD_EXT )
201
+ target_set_interface (IO_SWD_EXT );
202
+ #elif defined(MAX3625_FORCE_IO_DIP_EXT )
203
+ target_set_interface (IO_DIP_EXT );
204
+ #else
198
205
MXC_ADC -> ctrl = (MXC_F_ADC_CTRL_ADC_PU |
199
206
MXC_F_ADC_CTRL_ADC_CLK_EN |
200
207
MXC_F_ADC_CTRL_BUF_PU |
@@ -217,6 +224,7 @@ void gpio_init(void)
217
224
// Default to SWD interface
218
225
target_set_interface (IO_SWD_EXT );
219
226
}
227
+ #endif
220
228
}
221
229
222
230
/******************************************************************************/
You can’t perform that action at this time.
0 commit comments