LoginSignup
0
0

More than 1 year has passed since last update.

STM32G031J6M6用の俺の考えた最強のLチカ(Keil Studio)(タイマー割り込み)

Last updated at Posted at 2022-08-12

x 過去ログを見よ!!

目的
最強のLチカを作る。
PA_11(5ピン)
STM32G031 mbed-osの攻略の進捗が少し進んだ
なんか動かなくて1か月くらい悩んでいたが「すっきり」

o_con660.jpg

o_con661.jpg

o_con656.jpg

o_con657.jpg

o_con658.jpg


//PA_11_L_TI_KA_031_K1

#include "mbed.h"


//LEDのポートの定義
DigitalOut myled(PA_11);

//タイマー割り込みの定義
Ticker flipper;


//タイマー割り込みの呼び出し関数
void flip()
{

    //LEDの反転
    myled = !myled;

} //flip


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

    //タイマー割り込みの開始
    flipper.attach(&flip, 2s);

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

} //main



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