|
547 | 547 | #define RH_PLATFORM_STM32F4_HAL 8 |
548 | 548 | #define RH_PLATFORM_RASPI 9 |
549 | 549 | #define RH_PLATFORM_NRF51 10 |
| 550 | +#define RH_PLATFORM_PARTICLE 11 |
550 | 551 |
|
551 | 552 | //////////////////////////////////////////////////// |
552 | 553 | // Select platform automatically, if possible |
|
557 | 558 | #define RH_PLATFORM RH_PLATFORM_NRF51 |
558 | 559 | #elif defined(ARDUINO) |
559 | 560 | #define RH_PLATFORM RH_PLATFORM_ARDUINO |
| 561 | + #elif defined(SPARK) |
| 562 | + #define RH_PLATFORM RH_PLATFORM_PARTICLE |
560 | 563 | #elif defined(__MSP430G2452__) || defined(__MSP430G2553__) |
561 | 564 | #define RH_PLATFORM RH_PLATFORM_MSP430 |
562 | 565 | #elif defined(MCU_STM32F103RE) |
|
594 | 597 | #define RH_HAVE_SERIAL |
595 | 598 | #endif |
596 | 599 |
|
| 600 | +#elif (RH_PLATFORM == RH_PLATFORM_PARTICLE) |
| 601 | + #include "application.h" |
| 602 | + #define RH_HAVE_HARDWARE_SPI |
| 603 | + #define RH_HAVE_SERIAL |
| 604 | + #define PROGMEM |
| 605 | + #define memcpy_P memcpy |
| 606 | + #include "math.h" |
| 607 | + |
597 | 608 | #elif (RH_PLATFORM == RH_PLATFORM_MSP430) // LaunchPad specific |
598 | 609 | #include "legacymsp430.h" |
599 | 610 | #include "Energia.h" |
|
624 | 635 |
|
625 | 636 | #elif (RH_PLATFORM == RH_PLATFORM_STM32STD) // STM32 with STM32F4xx_StdPeriph_Driver |
626 | 637 | #include <stm32f4xx.h> |
627 | | - #include <wirish.h> |
| 638 | + #include <wirish.h> |
628 | 639 | #include <stdint.h> |
629 | 640 | #include <string.h> |
630 | 641 | #include <math.h> |
|
678 | 689 | //////////////////////////////////////////////////// |
679 | 690 | // This is an attempt to make a portable atomic block |
680 | 691 | #if (RH_PLATFORM == RH_PLATFORM_ARDUINO) |
| 692 | +#ifndef ESP8266 |
681 | 693 | #if defined(__arm__) |
682 | 694 | #include <RHutil/atomic.h> |
683 | 695 | #else |
684 | 696 | #include <util/atomic.h> |
685 | 697 | #endif |
686 | 698 | #define ATOMIC_BLOCK_START ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { |
687 | 699 | #define ATOMIC_BLOCK_END } |
| 700 | +#else |
| 701 | +// If you want to pool instead wiring and check RF69 DIO0 pin |
| 702 | +// uncomment to define the following line |
| 703 | +//#define RH_RF69_IRQLESS |
| 704 | +#define ATOMIC_BLOCK_START |
| 705 | +#define ATOMIC_BLOCK_END |
| 706 | +#endif |
| 707 | + |
688 | 708 | #elif (RH_PLATFORM == RH_PLATFORM_UNO32) |
689 | 709 | #include <peripheral/int.h> |
690 | 710 | #define ATOMIC_BLOCK_START unsigned int __status = INTDisableInterrupts(); { |
|
0 commit comments