Skip to content

Commit f06ecfd

Browse files
committed
Add startFPGA weak hook to allow bitstream autostart
1 parent 5839907 commit f06ecfd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

variants/mkrvidor/variant.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ void initVariant() {
215215
#if defined(USE_BQ24195L_PMIC)
216216
enable_battery_charging();
217217
#endif
218+
startFPGA();
218219
}
219220

220221
void enableFpgaClock() {
@@ -231,6 +232,8 @@ void disableFpgaClock() {
231232
delay(1000);
232233
}
233234

235+
__attribute__ ((weak)) void startFPGA() {};
236+
234237
// Multi-serial objects instantiation
235238
SERCOM sercom0(SERCOM0);
236239
SERCOM sercom1(SERCOM1);

variants/mkrvidor/variant.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,12 @@ extern Uart Serial1;
199199
// Alias Serial to SerialUSB
200200
#define Serial SerialUSB
201201

202-
// FPGA-specific clock
202+
// FPGA-specific functions
203203
#ifdef __cplusplus
204204
extern "C" {
205205
#endif
206206
void clockout(uint32_t gclk, int32_t divisor);
207+
void startFPGA();
207208
#ifdef __cplusplus
208209
}
209210
#endif

0 commit comments

Comments
 (0)