Fork of EFM32 Segment LCD library - used as pull request source for bugfixes
Fork of EFM32_SegmentLCD by
Revision 3:4e4f16874281, committed 2015-03-18
- Comitter:
- Steven Cooreman
- Date:
- Wed Mar 18 16:06:15 2015 -0500
- Parent:
- 2:ee5ef7bb4fb0
- Child:
- 4:b00dd7d93faf
- Commit message:
- Add destructor to segmentLCD driver, block correct sleep mode.
Changed in this revision
| EFM32_SegmentLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
| EFM32_SegmentLCD.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/EFM32_SegmentLCD.cpp Tue Mar 17 12:02:41 2015 -0500
+++ b/EFM32_SegmentLCD.cpp Wed Mar 18 16:06:15 2015 -0500
@@ -33,6 +33,7 @@
#include "pinmap.h"
#include "EFM32_SegmentLCD.h"
#include "segmentlcd.h"
+#include "sleep_api.h"
namespace silabs {
/*
@@ -47,6 +48,17 @@
/* Initialize the LCD without voltage booster */
SegmentLCD_Init(false);
+
+ /* Block sleep mode */
+ blockSleepMode(EM2);
+}
+
+~EFM32_SegmentLCD::EFM32_SegmentLCD() {
+ /* Shut off LCD peripheral */
+ SegmentLCD_Disable();
+
+ /* Unblock sleep mode */
+ unblockSleepMode(EM2);
}
void EFM32_SegmentLCD::AllOff( void ) {
--- a/EFM32_SegmentLCD.h Tue Mar 17 12:02:41 2015 -0500 +++ b/EFM32_SegmentLCD.h Wed Mar 18 16:06:15 2015 -0500 @@ -67,6 +67,11 @@ * Constructor. */ EFM32_SegmentLCD(); + + /** + * Destructor. + */ + ~EFM32_SegmentLCD(); /** * Switch off all elements