Skip to content

Add support for Arduino MKR WAN 1300 and MKR GSM 1400 #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2018

Conversation

sandeepmistry
Copy link
Contributor

I've based this on the MKR FOX 1200 definition, and left the highest pin as 32 for the battery ADC. There more pins above 32 defined in the variants but they are used for the LoRaWAN and cellular modules on the boards.

Variants for the new boards are available with the new Arduino SAMD 1.6.17 core release:

#define IS_PIN_SERVO(p) (IS_PIN_DIGITAL(p) && (p) < MAX_SERVOS) // deprecated since v2.4
#define IS_PIN_I2C(p) ((p) == 11 || (p) == 12) // SDA = 11, SCL = 12
#define IS_PIN_SPI(p) ((p) == SS || (p) == MOSI || (p) == MISO || (p) == SCK)
#define IS_PIN_SERIAL(p) ((p) == PIN_SERIAL1_RX || (p) == PIN_SERIAL1_TX) //defined in variant.h RX = 13, TX = 14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like each of these variants also defines PIN_SERIAL2_RX and PIN_SERIAL2_TX. Please also include those here (and for the other board definition above) if they are user accessible.

@@ -292,6 +292,37 @@ writePort(port, value, bitmask): Write an 8 bit port.
#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)
#define PIN_TO_SERVO(p) (p) // deprecated since v2.4

// Arduino MKR WAN 1300
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like the definitions for each of these variants is identical. In that case can they be combined:
#elif defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRGSM1400)

@soundanalogous soundanalogous merged commit 3028ba8 into firmata:master Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants