Skip to content

Commit 9105744

Browse files
Merge pull request #86 from runger1101001/dev
mask out SAMD21 current sensing when compiling on other platforms
2 parents e1f4292 + cb47fd0 commit 9105744

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/current_sense/hardware_specific/samd21_mcu.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#ifdef _SAMD21_
12

23
#include "samd21_mcu.h"
34
#include "../hardware_api.h"
@@ -301,4 +302,7 @@ void DMAC_Handler() {
301302
DMAC->CHINTFLAG.reg = DMAC_CHINTENCLR_TERR;
302303
DMAC->CHINTFLAG.reg = DMAC_CHINTENCLR_SUSP;
303304

304-
}
305+
}
306+
307+
308+
#endif

src/current_sense/hardware_specific/samd21_mcu.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef _SAMD21_
2+
13
#ifndef CURRENT_SENSE_SAMD21_H
24
#define CURRENT_SENSE_SAMD21_H
35

@@ -58,4 +60,8 @@ class SAMDCurrentSenseADCDMA
5860

5961
};
6062

63+
#endif
64+
65+
66+
6167
#endif

0 commit comments

Comments
 (0)