Release 1.01
Diff: ButtonController.cpp
- Revision:
- 2:1d5204d29bc5
- Parent:
- 1:86f6ebbe4fd1
diff -r 86f6ebbe4fd1 -r 1d5204d29bc5 ButtonController.cpp --- a/ButtonController.cpp Thu Sep 12 11:27:59 2019 +0000 +++ b/ButtonController.cpp Tue Sep 17 13:48:28 2019 +0000 @@ -1,6 +1,29 @@ +/**************************************************************************//** + * @file ButtonController.cpp + * @brief Base class for wrapping the interface with the GPIO Extender. + * @version: V1.0 + * @date: 9/17/2019 + + * + * @note + * Copyright (C) 2019 E3 Design. All rights reserved. + * + * @par + * E3 Designers LLC is supplying this software for use with Cortex-M3 LPC1768 + * processor based microcontroller for the ESCM 2000 Monitor and Display. + * * + * @par + * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED + * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. + * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR + * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. + * + ******************************************************************************/ #include "ButtonController.h" +/******************************************************************************/ ButtonController::ButtonController() { @@ -28,16 +51,19 @@ } +/******************************************************************************/ ButtonController::~ButtonController() { } +/******************************************************************************/ void ButtonController::init(void) { } +/******************************************************************************/ void ButtonController::processCmdQueue(Menu * activeMenu) { while (!cmd_queue.empty()) { @@ -75,6 +101,7 @@ } +/******************************************************************************/ uint8_t ButtonController::getCurrentState() { currentValue = spi_io_exp->readGpioPort(); @@ -83,6 +110,7 @@ } +/******************************************************************************/ void ButtonController::update(void) { @@ -133,34 +161,41 @@ } +/******************************************************************************/ void ButtonController::pressButtonUp(void) { printf("Up Button Pressed:%d\n\r",currentValue); } +/******************************************************************************/ void ButtonController::pressButtonDown(void) { printf("Down Button Pressed:%d\n\r",currentValue); } +/******************************************************************************/ void ButtonController::pressButtonSet(void) { printf("Set Button Pressed:%d\n\r",currentValue); } +/******************************************************************************/ void ButtonController::pressButtonMode(void) { printf("Mode Button Pressed:%d\n\r",currentValue); } +/******************************************************************************/ void ButtonController::pressButtonClear(void) { printf("Clear Button Pressed:%d\n\r",currentValue); } +/******************************************************************************/ void ButtonController::releaseButton(void) { //printf("Button Released:%d\n\r",currentValue); isHeld = 0; countsSinceChange = 0; } +/******************************************************************************/