x なぜかまちがっている
x mbed2リビジョン144
x リビジョンの変更ができる人むけ
目的
GPIOのテスト
//GPIO_800KHz_812_1
#include "mbed.h"
// TX RX
//Serial pc(P0_4, P0_0); //812
//GPIOA->ODR 7,995Mhz 010
DigitalOut myled(P0_7);
#define io_def 0x80
// 654321009876543210
#define on1 0b0000000010000000
#define off1 0b0000000000000000
//メイン関数
int main() {
//__disable_irq(); // disable interrupt
//__enable_irq(); // enable interrupt
//pc.printf("%x\r\n", (LPC_GPIO_PORT->DIR0) ); //0x80
//GPIO bkup
//int ii = LPC_GPIO_PORT->DIR0;
// // 1234567890123456
// int on1 = LPC_GPIO_PORT->DIR0 | 0b0000000000010000;
// int off1 = LPC_GPIO_PORT->DIR0 & 0b1111111111101111;
//while(1){}
//1:1
while(1) {
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = on1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
LPC_GPIO_PORT->DIR0 = off1;
}//while
// 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
/*
//0.3us 800khz
while(1) {
}//while
*/
// 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
/*
//1us 800khz
while(1) {
}//while
*/
}//main
-13-