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
blink.h
00001 // blink.h - blinking sequences for LED1 00002 #ifndef _BLINK_H_ 00003 #define _BLINK_H_ 00004 00005 #include <mbed.h> 00006 #include "bricks/o.h" 00007 00008 # define BLINK_SEQUENCE_IDLE "x " 00009 # define BLINK_SEQUENCE_ADVERTISE "x xxx " 00010 # define BLINK_SEQUENCE_CONNECTED " xxx " 00011 # define BLINK_SEQUENCE_ACTION "x x x x x " 00012 # define BLINK_SEQUENCE_ERROR "x x x x xxx " 00013 # define BLINK_SEQUENCE_TRANSITION "x x x " 00014 00015 void morse(O&o,const char *pattern, double periode = 0.2); 00016 void blink(O&o,const char *pattern, const char* next, double interval = 0.2); 00017 void blink(O&o,const char *pattern, double periode = 0.2); 00018 00019 inline void blinkIdle(O&o, const char *action = BLINK_SEQUENCE_IDLE) 00020 { 00021 blink(o,action,BLINK_SEQUENCE_IDLE); 00022 } 00023 00024 inline void blinkAdvertise(O&o,const char *action = BLINK_SEQUENCE_ADVERTISE) 00025 { 00026 blink(o,action,BLINK_SEQUENCE_ADVERTISE); 00027 } 00028 00029 inline void blinkConnected(O&o, const char *action = BLINK_SEQUENCE_ACTION) 00030 { 00031 blink(o,action, BLINK_SEQUENCE_CONNECTED); 00032 } 00033 00034 inline void blinkAction(O&o) // 'action' blink sequence 00035 { 00036 blink(o,BLINK_SEQUENCE_ACTION, BLINK_SEQUENCE_IDLE); 00037 } 00038 00039 inline void blinkError(O&o, const char *action = BLINK_SEQUENCE_ERROR) 00040 { 00041 blink(o,action,BLINK_SEQUENCE_ERROR); 00042 } 00043 00044 inline void blink(O&o) // stop blinking 00045 { 00046 blink(o,""); // empty blinking pattern 00047 } 00048 00049 #endif // _BLINK_H_
Generated on Tue Jul 12 2022 21:31:05 by
1.7.2
