Kevin Tseng / Mbed 2 deprecated DSHOT_test

Dependencies:   mbed MODDMA

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /*
00002  * Demonstrates capturing the GPIO P0.4 to P0.7 "nibble" to memory 
00003  * using GPDMA. The transfers from port pins to memory buffer are
00004  * triggered using Timer1 MAT1.0 match compare.
00005  *
00006  * In this example all inputs have pullups. So with nothing connected
00007  * the P0.4/7 reads as 0xF. Connecting a wire from one or more of the four 
00008  * inputs to ground will show up in the captured buffer sequence.
00009  */
00010  
00011 #include "mbed.h"
00012 #include "dshot.h"
00013 #include "MODDMA.h"
00014 #include "iomacros.h" // within MODDMA library.
00015 
00016 int main(){
00017 dshotOutput(1024);
00018 }