dart-archive / sdk

The Dartino project was an experiment seeking to improve productivity when writing application code for embedded devices.
https://dartino.org
Other
330 stars 36 forks source link

Missing waitFor implementation in _STM32GpioInputPin produces a warning #506

Closed sgjesse closed 8 years ago

sgjesse commented 8 years ago

Running the following code

import 'package:stm32/stm32f746g_disco.dart';

main() {
  var board = new STM32F746GDiscovery();
  var led1 = board.gpio.initOutput(STM32F746GDiscovery.LED1);
  var button1 = board.gpio.initInput(STM32F746GDiscovery.Button1);
  while (true) {
    led1.state = button1.state;
  }
 }

produces this warning:

$ /Users/sgjesse/dartino-sdk/bin/dartino flash /Users/sgjesse/dartino-projects/gpio/main.dart
Using template settings file '/Users/sgjesse/dartino-sdk/internal/.dartino-settings'
Users/sgjesse/dartino-sdk/pkg/stm32/lib/gpio.dart:247:1:
Warning: '_STM32GpioInputPin' doesn't implement 'abstract bool waitFor(bool a, int a1)' declared in 'GpioInputPin'.
Try adding an implementation of 'waitFor' or declaring '_STM32GpioInputPin' to be 'abstract'.
class _STM32GpioInputPin extends GpioInputPin {
^^^^^
Users/sgjesse/dartino-sdk/pkg/gpio/lib/gpio.dart:139:3:
Info: The method 'waitFor' is declared here in class 'GpioInputPin'.
  bool waitFor(bool value, int timeout);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Done building image: /Users/sgjesse/dartino-projects/gpio/main.bin
Flashing image: file:///Users/sgjesse/dartino-projects/gpio/main.bin