[mw_shl_code=c,true]/*
*Copy Right 2006~2010
*Aperture Electronic Inc. Image & Doduo & Joe Labortory
*Intel Edison Development Board GPIO Speed Test
*/
//C/C++ Main Header Files
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
//Intel Edison MRAA GPIO Header File
#include "mraa/gpio.h"
int main(int argc, char **argv)
{
int count;
mraa_gpio_context TestPin;
fprintf(stdout,"Welecome to Aperture Electronic Inc.\n"
"Image & Doduo & Joe Labortory\n"
"Intel Edison Development Board Test Experience\n\n");
fprintf(stdout,"Now we start the first test:GPIO Speed Test\n"
"Please get ready for your oscilloscope
\n");
//Initialize GPIO and Put Its Hardware Address Into a Variable
TestPin = mraa_gpio_init(13);
//Set GPIO Mode to Output
mraa_gpio_dir(TestPin,MRAA_GPIO_OUT);
fprintf(stdout,"Now start!!\n"
"Please put your oscilloscope's probe to the D13 pin on board.\n");
for(;;)
{
mraa_gpio_write(TestPin,0);
mraa_gpio_write(TestPin,1);
}
return 0;
}
[/mw_shl_code]
STM32F4这边我使用了一个自制的简易示波器+FFT分析仪。