Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TargetManagerManualTest NerfUSTarget
Bumper.cpp
00001 #include "Bumper.hpp" 00002 00003 Bumper::Bumper(PinName pin, NerfusCallbackInterface* nerfus_rise_callback) : 00004 interrupt_in(pin), 00005 nerfus_rise_callback(nerfus_rise_callback) 00006 { 00007 interrupt_in.rise(callback(this, &Bumper::rise_callback)); 00008 } 00009 00010 void Bumper::set_callbacks(NerfusCallbackInterface* nerfus_rise_callback) 00011 { 00012 this->nerfus_rise_callback = nerfus_rise_callback; 00013 } 00014 00015 void Bumper::rise_callback() 00016 { 00017 if(nerfus_rise_callback) 00018 { 00019 nerfus_rise_callback->call(); 00020 } 00021 }
Generated on Tue Jul 12 2022 17:18:21 by
1.7.2