Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

タイマ割り込み関数を修正 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kuwamai
Copy link

@Kuwamai Kuwamai commented Apr 4, 2024

What does this implement/fix?

Arduino_Core_STM32のアップデートによりArduino_Sample/STEP9_2/STEP9_2.inoで、タイマ割り込みに関するコンパイルエラーが発生するようになっていたためコンパイルが通るように修正しました。

Does this close any currently open issues?

しません。

How has this been tested?

Arduino_Sample/STEP9_2/STEP9_2.inoをコンパイルしタイマ割り込みに関するエラーが生じなくなることを確認しました。

Any other comments?

エラー発生時のログはこちらです。

/home/kuwagata/Downloads/TrainingTracer_Samples-0.2.1/Arduino_Sample/STEP9_2/STEP9_2.ino: In function 'void setup()':
/home/kuwagata/Downloads/TrainingTracer_Samples-0.2.1/Arduino_Sample/STEP9_2/STEP9_2.ino:181:26: error: no matching function for call to 'HardwareTimer::attachInterrupt(void (&)(HardwareTimer*))'
  181 |   Timer2->attachInterrupt(TimerCNT);
      |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/stm32/analog.h:45,
                 from /home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/board.h:8,
                 from /home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/wiring.h:40,
                 from /home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/Arduino.h:36,
                 from /tmp/arduino/sketches/A2CF2F48D154B65EF3DD9166065BFE1B/sketch/STEP9_2.ino.cpp:1:
/home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/HardwareTimer.h:156:10: note: candidate: 'void HardwareTimer::attachInterrupt(callback_function_t)'
  156 |     void attachInterrupt(callback_function_t callback); // Attach interrupt callback which will be called upon update event (timer rollover)
      |          ^~~~~~~~~~~~~~~
/home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/HardwareTimer.h:156:46: note:   no known conversion for argument 1 from 'void(HardwareTimer*)' to 'callback_function_t' {aka 'std::function<void()>'}
  156 |     void attachInterrupt(callback_function_t callback); // Attach interrupt callback which will be called upon update event (timer rollover)
      |                          ~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/HardwareTimer.h:160:10: note: candidate: 'void HardwareTimer::attachInterrupt(uint32_t, callback_function_t)'
  160 |     void attachInterrupt(uint32_t channel, callback_function_t callback); // Attach interrupt callback which will be called upon compare match event of specified channel
      |          ^~~~~~~~~~~~~~~
/home/kuwagata/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/cores/arduino/HardwareTimer.h:160:10: note:   candidate expects 2 arguments, 1 provided

exit status 1

Compilation error: no matching function for call to 'HardwareTimer::attachInterrupt(void (&)(HardwareTimer*))'

Checklists

@Kuwamai Kuwamai added the Type: Bug Bug or Bug fixes label Apr 4, 2024
@Kuwamai Kuwamai self-assigned this Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant