summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c')
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
index 97b33bdffe..7d85464b70 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c
@@ -27,6 +27,7 @@
27#include "button-target.h" 27#include "button-target.h"
28#include "i2c-dm320.h" 28#include "i2c-dm320.h"
29#include "sprintf.h" 29#include "sprintf.h"
30#include "logf.h"
30 31
31#ifdef BUTTON_DEBUG 32#ifdef BUTTON_DEBUG
32#include "lcd-target.h" 33#include "lcd-target.h"
@@ -36,22 +37,22 @@
36 37
37#ifndef ZEN_VISION 38#ifndef ZEN_VISION
38/* Creative Zen Vision:M */ 39/* Creative Zen Vision:M */
39#define BTN_LEFT 0x5F00 40#define BTN_LEFT 0xAF00
40#define BTN_RIGHT 0x4F00 41#define BTN_RIGHT 0xA700
41#define BTN_BACK 0xBF00 42#define BTN_BACK 0xDF00
42#define BTN_CUSTOM 0x8F00 43#define BTN_CUSTOM 0xC700
43#define BTN_PLAY 0x2F00 44#define BTN_PLAY 0x9700
44#define BTN_POWER 0x0F00 45#define BTN_POWER 0x8700
45#define BTN_MENU 0x9F00 46#define BTN_MENU 0xCF00
46#define BTN_HOLD 0x9F06 47#define BTN_HOLD 0xCF07
47#define BTN_UNHOLD 0xAF06 48#define BTN_UNHOLD 0xD707
48 49
49#define BTN_REL 1 50#define BTN_REL 1
50 51
51#define BTN_TOUCHPAD_PRESS 0x1F00 52#define BTN_TOUCHPAD_PRESS 0x8F00
52#define BTN_TOUCHPAD_SCROLL_DOWN 0x0F03 53#define BTN_TOUCHPAD_SCROLL_DOWN 0x0F03
53#define BTN_TOUCHPAD_CORNER_DOWN 0xAF00 54#define BTN_TOUCHPAD_CORNER_DOWN 0xD700
54#define BTN_TOUCHPAD_CORNER_UP 0x3F00 55#define BTN_TOUCHPAD_CORNER_UP 0x9F00
55#define BTN_TOUCHPAD_SCROLL_UP 0x0F04 56#define BTN_TOUCHPAD_SCROLL_UP 0x0F04
56 57
57#define HEADPHONE_PLUGIN_A 0x5707 58#define HEADPHONE_PLUGIN_A 0x5707
@@ -63,8 +64,8 @@
63#define DOCK_UNPLUG 0xDF06 64#define DOCK_UNPLUG 0xDF06
64#define DOCK_USB_INSERT 0x2F06 65#define DOCK_USB_INSERT 0x2F06
65#define DOCK_USB_UNPLUG 0x3F06 66#define DOCK_USB_UNPLUG 0x3F06
66#define DOCK_POWER_INSERT 0x2707 67#define DOCK_POWER_INSERT 0x1707
67#define DOCK_POWER_UNPLUG 0x2F07 68#define DOCK_POWER_UNPLUG 0x1F07
68 69
69#else 70#else
70/* Creative Zen Vision */ 71/* Creative Zen Vision */
@@ -272,6 +273,8 @@ void GIO0(void)
272 lcd_update(); 273 lcd_update();
273 sw = !sw; 274 sw = !sw;
274#endif 275#endif
276 logf("PIC: 0x%x", (unsigned int)((msg[3] << 24) |
277 (msg[2] << 16) | (msg[1] << 8) | msg[0]));
275} 278}
276 279
277static void send_command_to_pic(const unsigned char in, unsigned char* out, 280static void send_command_to_pic(const unsigned char in, unsigned char* out,
@@ -335,7 +338,8 @@ bool button_usb_connected(void)
335{ 338{
336 return (bool)(nonbtn & NONBUTTON_USB); 339 return (bool)(nonbtn & NONBUTTON_USB);
337} 340}
338 341
342#ifndef BOOTLOADER
339int pic_dbg_num_items(void) 343int pic_dbg_num_items(void)
340{ 344{
341 return 13; 345 return 13;
@@ -376,3 +380,4 @@ char* pic_dbg_item(int selected_item, void *data, char *buffer, size_t buffer_le
376 } 380 }
377 return NULL; 381 return NULL;
378} 382}
383#endif