Skip to content
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

Add definitions of Serial1x #34

Closed

Conversation

matsujirushi
Copy link

Serial1x can communicate Raspberry Pi UART.

Uart Serial1x(&SERCOM_SERIAL1X, PIN_SERIAL1X_RX, PIN_SERIAL1X_TX, PAD_SERIAL1X_RX, PAD_SERIAL1X_TX);
INTERRUPT_HANDLER_IMPLEMENT_SERIAL1X(Serial1x)

void setup() {
  SerialUSB.begin(115200);
  Serial1x.begin(9600);
}

void loop() {
  while (Serial1x.available() >= 1)
  {
    SerialUSB.write(Serial1x.read());
  }
  while (SerialUSB.available() >= 1)
  {
    Serial1x.write(SerialUSB.read());
  }
}

@matsujirushi
Copy link
Author

Review comment:

You replaced Serial1 with sercom4, but sercom4 was previously occupied by i2c1, which can cause other problems.

@LynnL4
Copy link
Member

LynnL4 commented Nov 6, 2020

Thanks!

@LynnL4 LynnL4 closed this Nov 6, 2020
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