Skip to content

Commit 01232bf

Browse files
committed
DM: bugfixes
1 parent 13707df commit 01232bf

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ adafruit_metro_m4.build.usb_product="Adafruit Metro M4"
172172
adafruit_metro_m4.build.usb_manufacturer="Adafruit LLC"
173173
adafruit_metro_m4.build.board=SAMD_51
174174
adafruit_metro_m4.build.core=arduino
175-
adafruit_metro_m4.build.extra_flags=-D__SAMD51J20A__ -D__SAMD51__ {build.usb_flags} -D__FPU_USED
175+
adafruit_metro_m4.build.extra_flags=-D__SAMD51J20A__ -D__SAMD51__ {build.usb_flags}
176176
adafruit_metro_m4.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
177177
adafruit_metro_m4.build.openocdscript=openocd_scripts/arduino_zero.cfg
178178
adafruit_metro_m4.build.variant=metro_m4

cores/arduino/Arduino.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,4 @@ void loop( void ) ;
130130
#include "USB/USBAPI.h"
131131
#include "USB/USB_host.h"
132132

133-
#define _U(x) x ## U /**< C code: Unsigned integer literal constant value */
134-
#define _L(x) x ## L /**< C code: Long integer literal constant value */
135-
#define _UL(x) x ## UL /**< C code: Unsigned Long integer literal constant value */
136-
137133
#endif // Arduino_h

cores/arduino/wiring_analog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ uint32_t analogRead(uint32_t pin)
215215
#ifdef DAC
216216

217217
#if defined(__SAMD51__)
218-
if (pin == A0 || pin == A4) { // Disable DAC, if analogWrite(A0,dval) used previously the DAC is enabled
218+
if (pin == A0 || pin == A1) { // Disable DAC, if analogWrite(A0,dval) used previously the DAC is enabled
219219
uint8_t channel = (pin == PIN_A0 ? 0 : 1);
220220

221221
if(dacEnabled[channel]){
@@ -341,7 +341,7 @@ void analogWrite(uint32_t pin, uint32_t value)
341341
{
342342
// DAC handling code
343343
#if defined(__SAMD51__)
344-
if (pin != PIN_A0 && pin != PIN_A4) { // 2 DACs on A0 (PA02) and A4 (PA05)
344+
if (pin != PIN_A0 && pin != PIN_A1) { // 2 DACs on A0 (PA02) and A1 (PA05)
345345
#else
346346
if (pin != PIN_A0) { // Only 1 DAC on A0 (PA02)
347347
#endif

0 commit comments

Comments
 (0)