Skip to content

Commit fb011ea

Browse files
committed
DM: we have a 12 bit dac lets use
1 parent 3ce572a commit fb011ea

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-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
@@ -236,7 +237,7 @@ adafruit_metro_m4.build.usb_product="Adafruit Metro M4"
236237
adafruit_metro_m4.build.usb_manufacturer="Adafruit LLC"
237238
adafruit_metro_m4.build.board=METRO_M4
238239
adafruit_metro_m4.build.core=arduino
239-
adafruit_metro_m4.build.extra_flags=-D__SAMD51J19A__ -D__SAMD51__ {build.usb_flags}
240+
adafruit_metro_m4.build.extra_flags=-D__SAMD51J19A__ -D__SAMD51__ {build.usb_flags} -DARM_MATH_CM4
240241
adafruit_metro_m4.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
241242
adafruit_metro_m4.build.openocdscript=openocd_scripts/arduino_zero.cfg
242243
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ compiler.S.extra_flags=
6262
compiler.ar.extra_flags=
6363
compiler.elf2hex.extra_flags=
6464

65-
compiler.arm.cmsis.path="-I{runtime.tools.CMSIS.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS.path}/Device/ATMEL/"
65+
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/"
66+
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/"
6667

6768
# USB Flags
6869
# ---------

0 commit comments

Comments
 (0)