Arduino-LCD
LCD library for Arduino
LCD_Keypad.h
Go to the documentation of this file.
1 
19 #ifndef LCD_KEYPAD_H
20 #define LCD_KEYPAD_H
21 
22 #include "LCD.h"
23 #include "GPIO.h"
24 #include "Keypad.h"
25 #include "Driver/HD44780.h"
26 #include "Adapter/PP7W.h"
27 
32 class LCD_Keypad : public Keypad<A0>, public HD44780 {
33 public:
34  enum {
35  NO_KEY = 0,
41  } __attribute__((packed));
42 
44  LCD_Keypad() : Keypad(keymap()), HD44780(m_io) {}
45 
46 protected:
48  LCD::PP7W<BOARD::D4, BOARD::D5, BOARD::D6, BOARD::D7,
49  BOARD::D8, BOARD::D9, BOARD::D10> m_io;
50 
55  const uint16_t* keymap()
56  __attribute__((always_inline))
57  {
58  static const uint16_t map[] PROGMEM = {
59  1000, 700, 400, 300, 100, 0
60  };
61  return (map);
62  }
63 };
64 
65 #endif
Definition: PP7W.h:73
const uint16_t * keymap()
Definition: LCD_Keypad.h:55
LCD::PP7W< BOARD::D4, BOARD::D5, BOARD::D6, BOARD::D7, BOARD::D8, BOARD::D9, BOARD::D10 > m_io
Definition: LCD_Keypad.h:49