mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
More SAMD cleanup
This commit is contained in:
parent
aa3c3c2ee4
commit
090acdae44
@ -914,7 +914,7 @@ bool DCCEXParser::parseD(Print *stream, int16_t params, int16_t p[])
|
|||||||
// Disable all interrupts and reset uC
|
// Disable all interrupts and reset uC
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
while(true);
|
while(true) {};
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
break; // and <X> if we didnt restart
|
break; // and <X> if we didnt restart
|
||||||
|
@ -110,11 +110,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Uncomment following line to enable Wire library instead of native I2C drivers
|
// Add following line to config.h to enable Wire library instead of native I2C drivers
|
||||||
#define I2C_USE_WIRE
|
//#define I2C_USE_WIRE
|
||||||
|
|
||||||
// Uncomment following line to disable the use of interrupts by the native I2C drivers.
|
// Add following line to config.h to disable the use of interrupts by the native I2C drivers.
|
||||||
#define I2C_NO_INTERRUPTS
|
//#define I2C_NO_INTERRUPTS
|
||||||
|
|
||||||
// Default to use interrupts within the native I2C drivers.
|
// Default to use interrupts within the native I2C drivers.
|
||||||
#ifndef I2C_NO_INTERRUPTS
|
#ifndef I2C_NO_INTERRUPTS
|
||||||
|
@ -75,6 +75,14 @@
|
|||||||
#elif defined(ARDUINO_ARCH_SAMD)
|
#elif defined(ARDUINO_ARCH_SAMD)
|
||||||
#define ARDUINO_TYPE "SAMD21"
|
#define ARDUINO_TYPE "SAMD21"
|
||||||
#undef HAS_AVR_WDT
|
#undef HAS_AVR_WDT
|
||||||
|
// SAMD support for I2C is awaiting development
|
||||||
|
#ifndef DISABLE_EEPROM
|
||||||
|
#define DISABLE_EEPROM
|
||||||
|
#endif
|
||||||
|
#ifndef I2C_NO_INTERRUPTS
|
||||||
|
#define I2C_NO_INTERRUPTS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* TODO when ready
|
/* TODO when ready
|
||||||
#elif defined(ARDUINO_ARCH_RP2040)
|
#elif defined(ARDUINO_ARCH_RP2040)
|
||||||
|
@ -32,7 +32,7 @@ lib_deps =
|
|||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_flags = --echo
|
monitor_flags = --echo
|
||||||
build_flags = -std=c++17 -DI2C_USE_WIRE -DDISABLE_EEPROM
|
build_flags = -std=c++17
|
||||||
|
|
||||||
[env:samd21-zero-usb]
|
[env:samd21-zero-usb]
|
||||||
platform = atmelsam
|
platform = atmelsam
|
||||||
@ -43,7 +43,7 @@ lib_deps =
|
|||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_flags = --echo
|
monitor_flags = --echo
|
||||||
build_flags = -std=c++17 -DI2C_USE_WIRE -DDISABLE_EEPROM
|
build_flags = -std=c++17
|
||||||
|
|
||||||
[env:samc21-firebox]
|
[env:samc21-firebox]
|
||||||
platform = atmelsam
|
platform = atmelsam
|
||||||
@ -55,7 +55,7 @@ lib_deps =
|
|||||||
SparkFun External EEPROM Arduino Library
|
SparkFun External EEPROM Arduino Library
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_flags = --echo
|
monitor_flags = --echo
|
||||||
build_flags = -std=c++17 -DI2C_USE_WIRE -DDISABLE_EEPROM
|
build_flags = -std=c++17
|
||||||
|
|
||||||
[env:mega2560-debug]
|
[env:mega2560-debug]
|
||||||
platform = atmelavr
|
platform = atmelavr
|
||||||
|
Loading…
Reference in New Issue
Block a user