/ src / input / input_hal.h
input_hal.h
 1  #pragma once
 2  
 3  #include <map>
 4  #include "lvgl.h"
 5  
 6  #include "nrf_gpio.h"
 7  
 8  namespace input
 9  {
10  	using std::map;
11  
12  	// constants
13  	constexpr uint32_t BUTTON_NONE = 0xFFFFFFFF;
14  	constexpr lv_key_t LV_KEY_NONE = 0xFF;
15  
16  	// the key to function map
17  	extern map<lv_key_t, uint32_t> KeyMap;
18  
19  	void InitializeHal();
20  	const bool KeyIsPressed(lv_key_t key);
21  	const lv_key_t GetPressedKey();
22  }