summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2010-01-18 21:20:36 +0000
committerBertrik Sikken <bertrik@sikken.nl>2010-01-18 21:20:36 +0000
commit552835ebe2b47feb5914060df1df681758a21edf (patch)
treeb30da06add820de7a5b1b5a9a7d36b4ed89ef878
parent99a7cdc46cc58e5965e939be7a31d377d73f0ffd (diff)
Add a missing #include, make a function static, make touchpad_set_buttonlight implementation and declaration consistent
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24281 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/skin_engine/skin_parser.c2
-rw-r--r--apps/usb_keymaps.c1
-rw-r--r--firmware/drivers/synaptics-mep.c23
-rw-r--r--firmware/export/synaptics-mep.h2
4 files changed, 15 insertions, 13 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 9157ffaa3c..c70a9759ee 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -145,7 +145,7 @@ static int parse_setting_and_lang(const char *wps_bufptr,
struct wps_token *token, struct wps_data *wps_data);
-int parse_languagedirection(const char *wps_bufptr,
+static int parse_languagedirection(const char *wps_bufptr,
struct wps_token *token, struct wps_data *wps_data)
{
(void)wps_bufptr;
diff --git a/apps/usb_keymaps.c b/apps/usb_keymaps.c
index 61e6f64d6b..ade2891720 100644
--- a/apps/usb_keymaps.c
+++ b/apps/usb_keymaps.c
@@ -25,6 +25,7 @@
#include "lang.h"
#include "misc.h"
#include "usbstack/usb_hid.h"
+#include "usb_keymaps.h"
/*#define LOGF_ENABLE*/
#include "logf.h"
diff --git a/firmware/drivers/synaptics-mep.c b/firmware/drivers/synaptics-mep.c
index 9c12351f42..87b78d09c1 100644
--- a/firmware/drivers/synaptics-mep.c
+++ b/firmware/drivers/synaptics-mep.c
@@ -25,6 +25,7 @@
#include "system.h"
#include "kernel.h"
#include "button-target.h"
+#include "synaptics-mep.h"
/*#define LOGF_ENABLE*/
#include "logf.h"
@@ -579,7 +580,7 @@ int touchpad_read_device(char *data, int len)
return val;
}
-int touchpad_set_buttonlights(int led_mask, char brightness)
+int touchpad_set_buttonlights(unsigned int led_mask, char brightness)
{
char data[6];
int val = 0;
@@ -589,22 +590,22 @@ int touchpad_set_buttonlights(int led_mask, char brightness)
syn_enable_int(false);
#if defined(PBELL_VIBE500)
/* In Packard Bell Vibe 500 leds are controlled through the MEP parameters 0x62 - 0x63
- There is no 0x31 order - grup led control */
+ There is no 0x31 order - grup led control */
/* Make sure we have a led_block_mask = 0 - obtained experimentally */
- data[0] = 0x03; /* header - addr:0,global:0,control:0,len:3 */
- data[1] = 0x63; /* parameter nr: 0x23 (-0x40) - led_block_mask */
+ data[0] = 0x03; /* header - addr:0,global:0,control:0,len:3 */
+ data[1] = 0x63; /* parameter nr: 0x23 (-0x40) - led_block_mask */
data[2] = 0x00; /* par_hi = 0 */
- data[3] = 0x00; /* par_lo = 0 */
- syn_send(data,4);
+ data[3] = 0x00; /* par_lo = 0 */
+ syn_send(data,4);
val = syn_read(data, 1); /* get the simple ACK = 0x18 */
- /* Turn on/off the lights (there is no brightness control) - obtained experimentally */
- data[0] = 0x03; /* header - addr:0,global:0,control:0,len:3 */
- data[1] = 0x62; /* parameter nr: 0x22 (-0x40) - led_mask */
+ /* Turn on/off the lights (there is no brightness control) - obtained experimentally */
+ data[0] = 0x03; /* header - addr:0,global:0,control:0,len:3 */
+ data[1] = 0x62; /* parameter nr: 0x22 (-0x40) - led_mask */
data[2] = 0x00; /* par_hi = 0 */
- data[3] = (led_mask & 0x0f) | (brightness&0); /* par_lo = led_mask */
- syn_send(data,4);
+ data[3] = (led_mask & 0x0f) | (brightness&0); /* par_lo = led_mask */
+ syn_send(data,4);
val = syn_read(data, 1); /* get the simple ACK = 0x18 */
#else
/* turn on all touchpad leds */
diff --git a/firmware/export/synaptics-mep.h b/firmware/export/synaptics-mep.h
index df6ddaac11..225891383e 100644
--- a/firmware/export/synaptics-mep.h
+++ b/firmware/export/synaptics-mep.h
@@ -23,6 +23,6 @@
int touchpad_init(void);
int touchpad_read_device(char *data, int len);
-int touchpad_set_buttonlights(char led_mask, char brightness);
+int touchpad_set_buttonlights(unsigned int led_mask, char brightness);
#endif