main/buttons.c

changeset 1
ad2c8b13eb88
parent 0
b74b0e4902c3
child 19
49e2960d4642
--- a/main/buttons.c	Sat Oct 20 13:23:15 2018 +0200
+++ b/main/buttons.c	Sat Oct 20 17:09:48 2018 +0200
@@ -6,18 +6,17 @@
 #include "config.h"
 
 
-sButton				Buttons[MAXBUTTONS];	// 40 buttons on a screen.
-int				level = 1;		// Keyboard level.
+sButton				Buttons[MAXBUTTONS];	///< 40 buttons on a screen.
+int				level = 1;		///< Keyboard level.
 
-extern uint8_t			VNC_pointer_button;
-extern uint16_t			VNC_pointer_x;
-extern uint16_t			VNC_pointer_y;
+extern uint8_t			VNC_pointer_button;	///< Mouse buttons mask
+extern uint16_t			VNC_pointer_x;		///< Mouse coordinate X
+extern uint16_t			VNC_pointer_y;		///< Mouse coordinate Y
 
-//static const char		*TAG = "buttons";
 
-#define	EDIT_TYPE_TEXT		0
-#define	EDIT_TYPE_INT		1
-#define	EDIT_TYPE_FLOAT		2
+#define	EDIT_TYPE_TEXT		0			///< Editor type is text
+#define	EDIT_TYPE_INT		1			///< Editor type is integer
+#define	EDIT_TYPE_FLOAT		2			///< Editor type is float
 
 
 /***************************************************************************/
@@ -157,7 +156,9 @@
 					'a','s','d','f','g','h','j','k','l',
 					'z','x','c','v','b','n','m' };
 
-/* Level 1 keys */
+/**
+ * @brief Level 1 keys, lowercase alpha.
+ */
 void B_AlphaLow(void)
 {
     Buttons_Clear();
@@ -216,7 +217,9 @@
 					 'A','S','D','F','G','H','J','K','L',
 					 'Z','X','C','V','B','N','M' };
 
-/* Level 2 and 3 keys */
+/**
+ * @brief Level 2 and 3 keys, uppercase alpha.
+ */
 void B_AlphaCaps(int level)
 {
     Buttons_Clear();
@@ -278,7 +281,9 @@
 				     '!','@','#','$','/','^','&','*','(',')', 
 				     '-','\'','\"',':',';',',','?' };
 
-/* Level 4 keys */
+/**
+ * @brief Level 4, numeric keys and symbol
+ */
 void B_Nums1(void)
 {
     Buttons_Clear();
@@ -335,7 +340,9 @@
 	                             ' ',' ',' ',' ','%','~','`',' ',' ',' ',
 				     '_','\\','|',' ',' ',' ',' ' };
 
-/* Level 5 */
+/**
+ * @brief Level 5, symbol keys
+ */
 void B_Nums2(void)
 {
     Buttons_Clear();
@@ -390,6 +397,9 @@
 
 static const uint8_t digits_tab[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '+', '-', '.' };
 
+/**
+ * @brief A small nummeric keyboard
+ */
 void B_Digits(void)
 {
     Buttons_Clear();

mercurial