Test

Dependencies:   mbed MODDMA

main.cpp

Committer:
ktseng
Date:
2019-04-25
Revision:
1:e2cd5b82d2e1
Parent:
0:96e88f67730b

File content as of revision 1:e2cd5b82d2e1:

/*
 * Demonstrates capturing the GPIO P0.4 to P0.7 "nibble" to memory 
 * using GPDMA. The transfers from port pins to memory buffer are
 * triggered using Timer1 MAT1.0 match compare.
 *
 * In this example all inputs have pullups. So with nothing connected
 * the P0.4/7 reads as 0xF. Connecting a wire from one or more of the four 
 * inputs to ground will show up in the captured buffer sequence.
 */
 
#include "mbed.h"
#include "dshot.h"
#include "MODDMA.h"
#include "iomacros.h" // within MODDMA library.

int main(){
dshotOutput(1024);
}