Selecting alt serial pins? (rogers core)

Post here all questions related to LibMaple core if you can't find a relevant section!
Post Reply
User avatar
Mangy_Dog
Posts: 92
Joined: Sat May 02, 2020 11:45 pm
Answers: 1

Selecting alt serial pins? (rogers core)

Post by Mangy_Dog »

Sorry for the repost, (posted this on the backup forum)

But my current project is using a few serial lines, and im filling up my other IOs...

The serial 1 had an alt set of pins for hardware serial. How do I switch which pins serial 1 uses in rogers core? If I can use these alt pins iw ould save me a right headache.
Just a dogs body developer, mostly making props and stuff...
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: Selecting alt serial pins? (rogers core)

Post by stevestrong »

Two options:
1) - change the core file HardwareSerial.cpp lines to adapt the new pins from the board.h
2) - declare your own new HardwareSerial name(USART<?>n, <new_TX_PIN>, <new_RX_PIN>) in your sketch.

In both cases you have to remap the USART pins with afio_remap(<param>), wherein the param is one of these.
Post Reply

Return to “General discussion”