Skip to content

Commit 03590c5

Browse files
committed
DM: we have a 12 bit dac lets use
1 parent ca58c2f commit 03590c5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

boards.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ adafruit_feather_m0.build.vid=0x239A
4141
adafruit_feather_m0.build.pid=0x800B
4242
adafruit_feather_m0.bootloader.tool=openocd
4343
adafruit_feather_m0.bootloader.file=feather/samd21_sam_ba.bin
44+
adafruit_feather_m0.compiler.arm.cmsis.ldflags=-larm_cortexM0l_math
4445

4546
adafruit_feather_m0_express.name=Adafruit Feather M0 Express
4647
adafruit_feather_m0_express.vid.0=0x239A
@@ -172,7 +173,7 @@ adafruit_metro_m4.build.usb_product="Adafruit Metro M4"
172173
adafruit_metro_m4.build.usb_manufacturer="Adafruit LLC"
173174
adafruit_metro_m4.build.board=METRO_M4
174175
adafruit_metro_m4.build.core=arduino
175-
adafruit_metro_m4.build.extra_flags=-D__SAMD51J19A__ -D__SAMD51__ {build.usb_flags}
176+
adafruit_metro_m4.build.extra_flags=-D__SAMD51J19A__ -D__SAMD51__ {build.usb_flags} -DARM_MATH_CM4
176177
adafruit_metro_m4.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
177178
adafruit_metro_m4.build.openocdscript=openocd_scripts/arduino_zero.cfg
178179
adafruit_metro_m4.build.variant=metro_m4

cores/arduino/wiring_analog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ extern "C" {
2525

2626
static int _readResolution = 10;
2727
static int _ADCResolution = 10;
28-
static int _writeResolution = 8;
2928

3029
#if defined(__SAMD51__)
30+
static int _writeResolution = 12;
3131
static int _dacResolution = 12;
3232
#else
33+
static int _writeResolution = 8;
3334
static int _dacResolution = 8;
3435
#endif
3536

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ compiler.ar.extra_flags=
6565
compiler.elf2hex.extra_flags=
6666

6767
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.1.0.path}/CMSIS/Device/ATMEL/"
68-
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
68+
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/"
6969

7070
# USB Flags
7171
# ---------

0 commit comments

Comments
 (0)