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.
Dependencies: BLE_API X_NUCLEO_6180XA1 X_NUCLEO_IDB0XA1 mbed
Fork of BLE_HeartRate_IDB0XA1 by
stop.cpp
00001 // stop.cpp - stop button functionality 00002 00003 #include "bricks/stop.h" 00004 00005 //============================================================================== 00006 // Stop Button Functionality 00007 //============================================================================== 00008 00009 static bool flag; // stop indication flag 00010 00011 static void cbButton(void) // button press callback 00012 { 00013 flag = true; 00014 } 00015 00016 void StopButton::set() // set stop flag 00017 { 00018 flag = true; 00019 } 00020 00021 void StopButton::clear() // clear stop flag 00022 { 00023 flag = false; 00024 } 00025 00026 bool StopButton::request() // stop requested? 00027 { 00028 return flag; 00029 } 00030 00031 StopButton::StopButton(PinName pin) : InterruptIn(pin) // constructor 00032 { 00033 clear(); 00034 rise(&cbButton); 00035 } 00036 00037 // eof
Generated on Sat Jul 16 2022 07:45:39 by
1.7.2
