diff options
Diffstat (limited to 'firmware/target/arm/imx233')
-rw-r--r-- | firmware/target/arm/imx233/debug-imx233.c | 1 | ||||
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | 17 |
2 files changed, 11 insertions, 7 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c index 63172c8c1e..55dbe183b4 100644 --- a/firmware/target/arm/imx233/debug-imx233.c +++ b/firmware/target/arm/imx233/debug-imx233.c | |||
@@ -947,6 +947,7 @@ bool dbg_hw_info(void) | |||
947 | lcd_update(); | 947 | lcd_update(); |
948 | yield(); | 948 | yield(); |
949 | } | 949 | } |
950 | return false; | ||
950 | } | 951 | } |
951 | 952 | ||
952 | bool dbg_ports(void) | 953 | bool dbg_ports(void) |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c index 05c4da8540..a3a6465aa7 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | |||
@@ -36,10 +36,13 @@ bool button_debug_screen(void) | |||
36 | { | 36 | { |
37 | char product_id[RMI_PRODUCT_ID_LEN]; | 37 | char product_id[RMI_PRODUCT_ID_LEN]; |
38 | rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id); | 38 | rmi_read(RMI_PRODUCT_ID, RMI_PRODUCT_ID_LEN, product_id); |
39 | uint8_t product_info[RMI_PRODUCT_INFO_LEN]; | ||
40 | rmi_read(RMI_PRODUCT_INFO, RMI_PRODUCT_INFO_LEN, product_info); | ||
41 | char product_info_str[RMI_PRODUCT_INFO_LEN * 2 + 1]; | ||
42 | for(int i = 0; i < RMI_PRODUCT_INFO_LEN; i++) | ||
43 | snprintf(product_info_str + 2 * i, 3, "%02x", product_info[i]); | ||
39 | int x_max = rmi_read_single(RMI_2D_SENSOR_XMAX_MSB(0)) << 8 | rmi_read_single(RMI_2D_SENSOR_XMAX_LSB(0)); | 44 | int x_max = rmi_read_single(RMI_2D_SENSOR_XMAX_MSB(0)) << 8 | rmi_read_single(RMI_2D_SENSOR_XMAX_LSB(0)); |
40 | int y_max = rmi_read_single(RMI_2D_SENSOR_YMAX_MSB(0)) << 8 | rmi_read_single(RMI_2D_SENSOR_YMAX_LSB(0)); | 45 | int y_max = rmi_read_single(RMI_2D_SENSOR_YMAX_MSB(0)) << 8 | rmi_read_single(RMI_2D_SENSOR_YMAX_LSB(0)); |
41 | int func_presence = rmi_read_single(RMI_FUNCTION_PRESENCE(RMI_2D_TOUCHPAD_FUNCTION)); | ||
42 | int sensor_prop = rmi_read_single(RMI_2D_SENSOR_PROP2(0)); | ||
43 | int sensor_resol = rmi_read_single(RMI_2D_SENSOR_RESOLUTION(0)); | 46 | int sensor_resol = rmi_read_single(RMI_2D_SENSOR_RESOLUTION(0)); |
44 | int min_dist = rmi_read_single(RMI_2D_MIN_DIST); | 47 | int min_dist = rmi_read_single(RMI_2D_MIN_DIST); |
45 | int gesture_settings = rmi_read_single(RMI_2D_GESTURE_SETTINGS); | 48 | int gesture_settings = rmi_read_single(RMI_2D_GESTURE_SETTINGS); |
@@ -70,7 +73,7 @@ bool button_debug_screen(void) | |||
70 | gesture_vp.y = zone_y - 80; | 73 | gesture_vp.y = zone_y - 80; |
71 | gesture_vp.width = LCD_WIDTH / 2; | 74 | gesture_vp.width = LCD_WIDTH / 2; |
72 | gesture_vp.height = 80; | 75 | gesture_vp.height = 80; |
73 | 76 | ||
74 | while(1) | 77 | while(1) |
75 | { | 78 | { |
76 | unsigned char sleep_mode = rmi_read_single(RMI_DEVICE_CONTROL) & RMI_SLEEP_MODE_BM; | 79 | unsigned char sleep_mode = rmi_read_single(RMI_DEVICE_CONTROL) & RMI_SLEEP_MODE_BM; |
@@ -78,7 +81,7 @@ bool button_debug_screen(void) | |||
78 | lcd_clear_display(); | 81 | lcd_clear_display(); |
79 | int btns = button_read_device(); | 82 | int btns = button_read_device(); |
80 | lcd_putsf(0, 0, "button bitmap: %x", btns); | 83 | lcd_putsf(0, 0, "button bitmap: %x", btns); |
81 | lcd_putsf(0, 1, "RMI: id=%s p=%x s=%x", product_id, func_presence, sensor_prop); | 84 | lcd_putsf(0, 1, "RMI: id=%s info=%s", product_id, product_info_str); |
82 | lcd_putsf(0, 2, "xmax=%d ymax=%d res=%d", x_max, y_max, sensor_resol); | 85 | lcd_putsf(0, 2, "xmax=%d ymax=%d res=%d", x_max, y_max, sensor_resol); |
83 | lcd_putsf(0, 3, "attn=%d ctl=%x int=%x", | 86 | lcd_putsf(0, 3, "attn=%d ctl=%x int=%x", |
84 | imx233_pinctrl_get_gpio(0, 27) ? 0 : 1, | 87 | imx233_pinctrl_get_gpio(0, 27) ? 0 : 1, |
@@ -139,7 +142,7 @@ bool button_debug_screen(void) | |||
139 | break; | 142 | break; |
140 | default: break; | 143 | default: break; |
141 | } | 144 | } |
142 | 145 | ||
143 | if(u.s.gesture.misc & RMI_2D_GEST_MISC_FLICK) | 146 | if(u.s.gesture.misc & RMI_2D_GEST_MISC_FLICK) |
144 | { | 147 | { |
145 | lcd_putsf(0, 1, "FLICK!"); | 148 | lcd_putsf(0, 1, "FLICK!"); |
@@ -149,7 +152,7 @@ bool button_debug_screen(void) | |||
149 | if(a & 8) a = -((a ^ 0xf) + 1); | 152 | if(a & 8) a = -((a ^ 0xf) + 1); |
150 | SIGN4EXT(flick_x); | 153 | SIGN4EXT(flick_x); |
151 | SIGN4EXT(flick_y); | 154 | SIGN4EXT(flick_y); |
152 | 155 | ||
153 | int center_x = (LCD_WIDTH * 2) / 3; | 156 | int center_x = (LCD_WIDTH * 2) / 3; |
154 | int center_y = 40; | 157 | int center_y = 40; |
155 | lcd_drawline(center_x, center_y, center_x + flick_x * 5, center_y - flick_y * 5); | 158 | lcd_drawline(center_x, center_y, center_x + flick_x * 5, center_y - flick_y * 5); |
@@ -173,7 +176,7 @@ bool button_debug_screen(void) | |||
173 | volkeys_delay_counter = 0; | 176 | volkeys_delay_counter = 0; |
174 | } | 177 | } |
175 | } | 178 | } |
176 | 179 | ||
177 | yield(); | 180 | yield(); |
178 | } | 181 | } |
179 | 182 | ||