Пример #1
0
 void error(const GpioPinRef& gpio) {
   for(;;) {
     gpio.reset();
     MillisecondTimer::delay(100);
     gpio.set();
     MillisecondTimer::delay(100);
   }
 }
Пример #2
0
    void onError(UsbErrorEvent& /* uee */) {

      // flash the RED led on PD5 at 1Hz

      for(;;) {
        _errorLed.reset();
        MillisecondTimer::delay(500);
        _errorLed.set();
        MillisecondTimer::delay(500);
      }
    }
Пример #3
0
    void onInit() {

      // create the new instance, power up the card and initialise

      _sdcard.reset(new SdioDmaSdCard);

      // check for error and delete the instance if not working

      if(errorProvider.hasError()) {
        _sdcard.reset(nullptr);
        _errorLed.set();
      }
      else
        _errorLed.reset();
    }
Пример #4
0
 void onDeInit() {
   _sdcard.reset(nullptr);
   _errorLed.reset();
 }