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
This commit is contained in:
Bertrik Sikken 2010-01-18 21:20:36 +00:00
parent 99a7cdc46c
commit 552835ebe2
4 changed files with 15 additions and 13 deletions

View file

@ -145,7 +145,7 @@ static int parse_setting_and_lang(const char *wps_bufptr,
struct wps_token *token, struct wps_data *wps_data); 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) struct wps_token *token, struct wps_data *wps_data)
{ {
(void)wps_bufptr; (void)wps_bufptr;

View file

@ -25,6 +25,7 @@
#include "lang.h" #include "lang.h"
#include "misc.h" #include "misc.h"
#include "usbstack/usb_hid.h" #include "usbstack/usb_hid.h"
#include "usb_keymaps.h"
/*#define LOGF_ENABLE*/ /*#define LOGF_ENABLE*/
#include "logf.h" #include "logf.h"

View file

@ -25,6 +25,7 @@
#include "system.h" #include "system.h"
#include "kernel.h" #include "kernel.h"
#include "button-target.h" #include "button-target.h"
#include "synaptics-mep.h"
/*#define LOGF_ENABLE*/ /*#define LOGF_ENABLE*/
#include "logf.h" #include "logf.h"
@ -579,7 +580,7 @@ int touchpad_read_device(char *data, int len)
return val; return val;
} }
int touchpad_set_buttonlights(int led_mask, char brightness) int touchpad_set_buttonlights(unsigned int led_mask, char brightness)
{ {
char data[6]; char data[6];
int val = 0; int val = 0;
@ -589,22 +590,22 @@ int touchpad_set_buttonlights(int led_mask, char brightness)
syn_enable_int(false); syn_enable_int(false);
#if defined(PBELL_VIBE500) #if defined(PBELL_VIBE500)
/* In Packard Bell Vibe 500 leds are controlled through the MEP parameters 0x62 - 0x63 /* 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 */ /* Make sure we have a led_block_mask = 0 - obtained experimentally */
data[0] = 0x03; /* header - addr:0,global:0,control:0,len:3 */ data[0] = 0x03; /* header - addr:0,global:0,control:0,len:3 */
data[1] = 0x63; /* parameter nr: 0x23 (-0x40) - led_block_mask */ data[1] = 0x63; /* parameter nr: 0x23 (-0x40) - led_block_mask */
data[2] = 0x00; /* par_hi = 0 */ data[2] = 0x00; /* par_hi = 0 */
data[3] = 0x00; /* par_lo = 0 */ data[3] = 0x00; /* par_lo = 0 */
syn_send(data,4); syn_send(data,4);
val = syn_read(data, 1); /* get the simple ACK = 0x18 */ val = syn_read(data, 1); /* get the simple ACK = 0x18 */
/* Turn on/off the lights (there is no brightness control) - obtained experimentally */ /* 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[0] = 0x03; /* header - addr:0,global:0,control:0,len:3 */
data[1] = 0x62; /* parameter nr: 0x22 (-0x40) - led_mask */ data[1] = 0x62; /* parameter nr: 0x22 (-0x40) - led_mask */
data[2] = 0x00; /* par_hi = 0 */ data[2] = 0x00; /* par_hi = 0 */
data[3] = (led_mask & 0x0f) | (brightness&0); /* par_lo = led_mask */ data[3] = (led_mask & 0x0f) | (brightness&0); /* par_lo = led_mask */
syn_send(data,4); syn_send(data,4);
val = syn_read(data, 1); /* get the simple ACK = 0x18 */ val = syn_read(data, 1); /* get the simple ACK = 0x18 */
#else #else
/* turn on all touchpad leds */ /* turn on all touchpad leds */

View file

@ -23,6 +23,6 @@
int touchpad_init(void); int touchpad_init(void);
int touchpad_read_device(char *data, int len); 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 #endif