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: SDFileSystem app epson mbed msp430 pl tests
page.h
00001 // 00002 // Filename: page.h 00003 // 00004 // Base class for Flexbook pages. 00005 // 00006 00007 // include guards 00008 #ifndef PAGE_H 00009 #define PAGE_H 00010 00011 #include <memory> 00012 #include "mbed.h" 00013 00014 namespace Flexbook 00015 { 00016 00017 class Page 00018 { 00019 public: 00020 // Constructor needs to be explicit. 00021 explicit Page(); 00022 00023 // Destructor needs to be virtual for a polymorphic base class. 00024 virtual ~Page(); 00025 00026 // Handle any page actions. 00027 virtual void HandlePageActions(); 00028 00029 //start mfb adds 00030 // Basic single beep 00031 void Beep(int duration_ms); 00032 00033 // Short single beep 00034 void ShortBeep(); 00035 00036 // Triple beeps 00037 void TripleBeep(); 00038 00039 // Multiple beeps 00040 void MultiBeep(int number, int interval_ms); 00041 00042 DigitalOut buzzer; 00043 //end mfb adds 00044 00045 private: 00046 // Disable the copy constructor. 00047 Page(const Page &); 00048 00049 // Disable assignment. 00050 Page &operator=(const Page &); 00051 00052 }; 00053 00054 00055 // Kludge to account for mbeds lack of C++11 support. 00056 #if(__cplusplus == 199711L) 00057 typedef std::auto_ptr<Page> BookPage; 00058 #define nullptr NULL 00059 #else 00060 typedef std::unique_ptr<Page> BookPage; 00061 #endif 00062 00063 } // End Flexbook namespace. 00064 00065 #endif // PAGE_H 00066
Generated on Tue Jul 12 2022 21:14:35 by
