BLE switch interface with GROVE joystic for micro:bit http://mahoro-ba.net/e2073.html
KeyValueInt.h
- Committer:
- masakjm
- Date:
- 2018-09-17
- Revision:
- 0:28fb3e9ef81a
- Child:
- 3:b6e9850d3e76
File content as of revision 0:28fb3e9ef81a:
//================================= // Class KeyValueInt //================================= // The MIT License (MIT) Copyright (c) 2018 Masatomo Kojima #ifndef KEY_VALUE_INT #define KEY_VALUE_INT class KeyValueInt { public: const char *key; char disp; int value; int min; int max; bool rotation; int range(int data); int set(int data); void inc(int delta=1); void dec(int delta=1); KeyValueInt(const char *key, char disp=0, int value=0, int min=0, int max=4095, bool rotation=false); }; #endif // KEY_VALUE_INT