LoginSignup
0
0

More than 1 year has passed since last update.

LPC812MAXでGPIOレジ直で遊ぶ

Last updated at Posted at 2022-09-04

x なぜか間違っているのをUPした

目的
GPIOのテスト




//GPIO_P0_7_test_812_1

#include "mbed.h"


DigitalOut myled(P0_7);

//            654321009876543210
#define on1   0b0000000010000000
#define off1  0b0000000000000000

//メイン関数
int main()
{

    //無限ループ
    while(1) {

        LPC_GPIO_PORT->DIR0 = on1;

        wait_ms(1000);//1秒待つ

        LPC_GPIO_PORT->DIR0 = off1;

        wait_ms(1000);//1秒待つ

    }//while

}//main





o_con833.jpg

-9-

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0