Skip to content

Serial library utilising DMA on the SAM3X8E MCU (Arduino Due).

License

Notifications You must be signed in to change notification settings

rblilja/DmaSerial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DmaSerial

Serial library utilising DMA on the SAM3X8E MCU (Arduino Due).

If used with the Arduino environment, find the file variant.h (under sam/variants/arduino_due_x) and comment out the USARTClass and/or UARTClass objects that you want to replace with DmaSerial objects.

For an instance, if replacing Serial1, you shall comment out the lines containing:

RingBuffer rx_buffer2;

USARTClass Serial1(USART0, USART0_IRQn, ID_USART0, &rx_buffer2);

Serial1.IrqHandler();

if (Serial1.available()) serialEvent1();

Serial1.IrqHandler();

Then you simply instansiate (in the top of your sketch) a DmaSerial object as:

DmaSerial dma_serial1 = DmaSerial((Uart*)USART0, ID_USART0);

Use the put() and get() members to send/retreive data, don't forget to call begin() in the setup.

About

Serial library utilising DMA on the SAM3X8E MCU (Arduino Due).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages