Gemphet8 ; 8-polyphonic synthesizer control application

Dependencies:   MIDI REnc button mbed

Committer:
ChuckTimber
Date:
Thu Nov 27 06:47:43 2014 +0000
Revision:
11:e6a47dc75120
Gem8 application 1st launched.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ChuckTimber 11:e6a47dc75120 1 /**
ChuckTimber 11:e6a47dc75120 2 * @file btn2.h
ChuckTimber 11:e6a47dc75120 3 * Project button long press handling sample
ChuckTimber 11:e6a47dc75120 4 * @brief button long press handling class
ChuckTimber 11:e6a47dc75120 5 * @version 1.00
ChuckTimber 11:e6a47dc75120 6 * @author Chuck Timber
ChuckTimber 11:e6a47dc75120 7 * @date 09/08/2014
ChuckTimber 11:e6a47dc75120 8 */
ChuckTimber 11:e6a47dc75120 9
ChuckTimber 11:e6a47dc75120 10 #ifndef MBED_BUTTON2_H
ChuckTimber 11:e6a47dc75120 11 #define MBED_BUTTON2_H
ChuckTimber 11:e6a47dc75120 12
ChuckTimber 11:e6a47dc75120 13 #include "mbed.h"
ChuckTimber 11:e6a47dc75120 14 #include "button.h"
ChuckTimber 11:e6a47dc75120 15
ChuckTimber 11:e6a47dc75120 16 namespace mbed {
ChuckTimber 11:e6a47dc75120 17
ChuckTimber 11:e6a47dc75120 18 /** Class: BTN2
ChuckTimber 11:e6a47dc75120 19 * A class handles button long press
ChuckTimber 11:e6a47dc75120 20 */
ChuckTimber 11:e6a47dc75120 21 class BTN2 {
ChuckTimber 11:e6a47dc75120 22
ChuckTimber 11:e6a47dc75120 23 public:
ChuckTimber 11:e6a47dc75120 24 /// constructor
ChuckTimber 11:e6a47dc75120 25 BTN2(PinName pin);
ChuckTimber 11:e6a47dc75120 26 /** button return value
ChuckTimber 11:e6a47dc75120 27 *
ChuckTimber 11:e6a47dc75120 28 * @retval 1 - button pressed shortly
ChuckTimber 11:e6a47dc75120 29 * @retval 2 - button pressed longly
ChuckTimber 11:e6a47dc75120 30 */
ChuckTimber 11:e6a47dc75120 31 unsigned char CMD2;
ChuckTimber 11:e6a47dc75120 32
ChuckTimber 11:e6a47dc75120 33 private:
ChuckTimber 11:e6a47dc75120 34 /// use BTN lib
ChuckTimber 11:e6a47dc75120 35 BTN _btn;
ChuckTimber 11:e6a47dc75120 36 /// use Ticker for intaval timer
ChuckTimber 11:e6a47dc75120 37 Ticker _tick;
ChuckTimber 11:e6a47dc75120 38 /// button check function
ChuckTimber 11:e6a47dc75120 39 void check_btn_pressed(void);
ChuckTimber 11:e6a47dc75120 40 };
ChuckTimber 11:e6a47dc75120 41
ChuckTimber 11:e6a47dc75120 42 }
ChuckTimber 11:e6a47dc75120 43 #endif