add Meizu M6SP and M3 ports

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18544 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcoen Hirschberg 2008-09-17 23:22:11 +00:00
parent 9407ae838e
commit 48e45f5751
17 changed files with 1200 additions and 4 deletions

View file

@ -31,6 +31,10 @@ mrobe500.c
telechips.c
#elif defined(MEIZU_M6SL)
meizu_m6sl.c
#elif defined(MEIZU_M6SP)
meizu_m6sp.c
#elif defined(MEIZU_M3)
meizu_m3.c
#elif defined(ONDA_VX747) || defined(ONDA_VX767)
ondavx747.c
#elif defined(CREATIVE_ZVx)

142
bootloader/meizu_m3.c Normal file
View file

@ -0,0 +1,142 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 by Greg White
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include "inttypes.h"
#include "string.h"
#include "cpu.h"
#include "system.h"
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
#include "ata.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
#include "adc.h"
#include "backlight.h"
#include "backlight-target.h"
#include "button.h"
#include "panic.h"
#include "power.h"
#include "file.h"
#include "common.h"
#include "rbunicode.h"
#include "usb.h"
#include "qt1106.h"
#include <stdarg.h>
char version[] = APPSVERSION;
#define LONG_DELAY 200000
#define SHORT_DELAY 50000
#define PAUSE_DELAY 50000
static inline void delay(int duration)
{
volatile int i;
for(i=0;i<duration;i++);
}
void bl_debug(bool bit)
{
if (bit)
{
PDAT0 ^= (1 << 2); //Toggle backlight
delay(LONG_DELAY);
PDAT0 ^= (1 << 2); //Toggle backlight
delay(LONG_DELAY);
}
else
{
PDAT0 ^= (1 << 2); //Toggle backlight
delay(SHORT_DELAY);
PDAT0 ^= (1 << 2); //Toggle backlight
delay(SHORT_DELAY);
}
}
void bl_debug_count(unsigned int input)
{
unsigned int i;
delay(SHORT_DELAY*3);
for (i = 0; i < input; i++)
{
PDAT0 ^= (1 << 2); //Toggle backlight
delay(SHORT_DELAY);
PDAT0 ^= (1 << 2); //Toggle backlight
delay(2*SHORT_DELAY);
}
}
void bl_debug_int(unsigned int input,unsigned int count)
{
unsigned int i;
for (i = 0; i < count; i++)
{
bl_debug(input>>i & 1);
}
delay(SHORT_DELAY*6);
}
void main(void)
{
//Set backlight pin to output and enable
int oldval = PCON0;
PCON0 = ((oldval & ~(3 << 4)) | (1 << 4));
PDAT0 |= (1 << 2);
//Set PLAY to input
oldval = PCON1;
PCON1 = ((oldval & ~(0xf << 16)) | (0 << 16));
init_qt1106();
// Wait for play to be pressed
while(!(PDAT1 & (1 << 4)));
// Wait for play to be released
while((PDAT1 & (1 << 4)));
PDAT0 ^= (1 << 2); //Toggle backlight
delay(LONG_DELAY);
/* Calibrate the lot */
qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF | QT1106_DI \
| QT1106_SLD_SLIDER | QT1106_CAL_WHEEL | QT1106_CAL_KEYS | QT1106_RES_4);
/* Set to maximum sensitivity */
qt1106_io(QT1106_CT | (0x00 << 8) );
while(true)
{
qt1106_wait();
int slider = qt1106_io(QT1106_MODE_FREE | QT1106_MOD_INF \
| QT1106_DI | QT1106_SLD_SLIDER | QT1106_RES_4);
if(slider & 0x008000)
bl_debug_count(((slider&0xff)) + 1);
}
//power off
PDAT1&=~(1<<3);
}

123
bootloader/meizu_m6sp.c Normal file
View file

@ -0,0 +1,123 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 by Greg White
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include "inttypes.h"
#include "string.h"
#include "cpu.h"
#include "system.h"
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
#include "ata.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
#include "adc.h"
#include "backlight.h"
#include "backlight-target.h"
#include "button.h"
#include "panic.h"
#include "power.h"
#include "file.h"
#include "common.h"
#include "rbunicode.h"
#include "usb.h"
#include "qt1106.h"
#include <stdarg.h>
char version[] = APPSVERSION;
#define LONG_DELAY 200000
#define SHORT_DELAY 50000
#define PAUSE_DELAY 50000
static inline void delay(int duration)
{
volatile int i;
for(i=0;i<duration;i++);
}
void bl_debug(bool bit)
{
if (bit)
{
PDAT0 ^= (1 << 2); //Toggle backlight
delay(LONG_DELAY);
PDAT0 ^= (1 << 2); //Toggle backlight
delay(LONG_DELAY);
}
else
{
PDAT0 ^= (1 << 2); //Toggle backlight
delay(SHORT_DELAY);
PDAT0 ^= (1 << 2); //Toggle backlight
delay(SHORT_DELAY);
}
}
void bl_debug_count(unsigned int input)
{
unsigned int i;
delay(SHORT_DELAY*3);
for (i = 0; i < input; i++)
{
PDAT0 ^= (1 << 2); //Toggle backlight
delay(SHORT_DELAY);
PDAT0 ^= (1 << 2); //Toggle backlight
delay(2*SHORT_DELAY);
}
}
void bl_debug_int(unsigned int input,unsigned int count)
{
unsigned int i;
for (i = 0; i < count; i++)
{
bl_debug(input>>i & 1);
}
delay(SHORT_DELAY*6);
}
void main(void)
{
//Set backlight pin to output and enable
int oldval = PCON0;
PCON0 = ((oldval & ~(3 << 4)) | (1 << 4));
PDAT0 |= (1 << 2);
//Set PLAY to input
oldval = PCON1;
PCON1 = ((oldval & ~(0xf << 16)) | (0 << 16));
// Wait for play to be pressed
while(!(PDAT1 & (1 << 4)));
// Wait for play to be released
while((PDAT1 & (1 << 4)));
PDAT0 ^= (1 << 2); //Toggle backlight
delay(LONG_DELAY);
//power off
PDAT1&=~(1<<3);
}

View file

@ -1082,9 +1082,12 @@ target/arm/tcc780x/cowond2/audio-cowond2.c
#endif /* SIMULATOR */
#endif /* COWON_D2 */
#ifdef MEIZU_M6SL
#if CONFIG_CPU==S5L8700
target/arm/s5l8700/system-s5l8700.c
target/arm/s5l8700/ata-nand-s5l8700.c
#endif
#ifdef MEIZU_M6SL
target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c
drivers/qt1106.c
#ifndef SIMULATOR
@ -1093,6 +1096,23 @@ drivers/qt1106.c
#endif /* SIMULATOR */
#endif /* MEIZU_M6SL */
#ifdef MEIZU_M6SP
target/arm/s5l8700/meizu-m6sp/lcd-m6sp.c
#ifndef SIMULATOR
#ifndef BOOTLOADER
#endif /* BOOTLOADER */
#endif /* SIMULATOR */
#endif /* MEIZU_M6SP */
#ifdef MEIZU_M3
target/arm/s5l8700/meizu-m3/lcd-m3.c
drivers/qt1106.c
#ifndef SIMULATOR
#ifndef BOOTLOADER
#endif /* BOOTLOADER */
#endif /* SIMULATOR */
#endif /* MEIZU_M3 */
#if CONFIG_CPU==JZ4732
target/mips/ingenic_jz47xx/ata-nand-jz4740.c
target/mips/ingenic_jz47xx/lcd-jz4740.c

View file

@ -0,0 +1,175 @@
/*
* This config file is for Meizu M3
*/
#define TARGET_TREE /* this target is using the target tree system */
/* For Rolo and boot loader */
#define MODEL_NUMBER 1
#define MODEL_NAME "Meizu M3"
/* define this if you have recording possibility */
//#define HAVE_RECORDING
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_FMRADIO)
/* define the bitmask of hardware sample rates */
#define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11)
/* define the bitmask of recording sample rates */
#define REC_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11)
/* define this if you have a bitmap LCD display */
#define HAVE_LCD_BITMAP
/* define this if you can flip your LCD */
//#define HAVE_LCD_FLIP
/* define this if you have a colour LCD */
#define HAVE_LCD_COLOR
/* define this if you want album art for this target */
#define HAVE_ALBUMART
/* define this if you can invert the colours on your LCD */
//#define HAVE_LCD_INVERT
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
#define HAVE_PITCHSCREEN
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 132
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
/* Define this if your LCD can be enabled/disabled */
//#define HAVE_LCD_ENABLE
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
should be defined as well. */
//#define HAVE_LCD_SLEEP
#define CONFIG_KEYPAD MEIZU_M3_PAD
//#define AB_REPEAT_ENABLE 1
//#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
/* Define this if you do software codec */
#define CONFIG_CODEC SWCODEC
/* define this if you have a real-time clock */
#define CONFIG_RTC RTC_S5L8700
//#define CONFIG_RTC RTC_S35390A
#define CONFIG_LCD LCD_MEIZUM6
/* Define this if you have the WM8975 audio codec */
#define HAVE_WM8751 //FIXME
/* Define this for LCD backlight available */
#define HAVE_BACKLIGHT
#define HAVE_BACKLIGHT_BRIGHTNESS
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF
/* The number of bytes reserved for loadable codecs */
#define CODEC_SIZE 0x80000
/* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x80000
/* FM Tuner */
#define CONFIG_TUNER TEA5760
#define CONFIG_TUNER_XTAL 32768
//#define HAVE_TLV320
/* TLV320 has no tone controls, so we use the software ones */
#define HAVE_SW_TONE_CONTROLS
#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
#ifndef SIMULATOR
/* Define this if your LCD can set contrast */
//#define HAVE_LCD_CONTRAST
/* Define this if you have a Motorola SCF5250 */
#define CONFIG_CPU S5L8700
/* Define this if you want to use coldfire's i2c interface */
#define CONFIG_I2C I2C_S5L8700
/* define this if the hardware can be powered off while charging */
#define HAVE_POWEROFF_WHILE_CHARGING
/* The size of the flash ROM */
#define FLASH_SIZE 0x400000
/* Define this to the CPU frequency */
#define CPU_FREQ 11289600
/* Define this if you have ATA power-off control */
//#define HAVE_ATA_POWER_OFF
/* Virtual LED (icon) */
#define CONFIG_LED LED_VIRTUAL
/* Offset ( in the firmware file's header ) to the file CRC */
#define FIRMWARE_OFFSET_FILE_CRC 0
/* Offset ( in the firmware file's header ) to the real data */
#define FIRMWARE_OFFSET_FILE_DATA 8
/* USB On-the-go */
//#define CONFIG_USBOTG USBOTG_M5636
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
#define BOOTFILE_EXT "meizu"
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
#define BOOTLOADER_ENTRYPOINT 0x001F0000
#define FLASH_ENTRYPOINT 0x00001000
#define FLASH_MAGIC 0xfbfbfbf1
#endif /* SIMULATOR */
/* Define this for FM radio input available */
#define HAVE_FMRADIO_IN
/** Port-specific settings **/
/* Main LCD contrast range and defaults */
#define MIN_CONTRAST_SETTING 1
#define MAX_CONTRAST_SETTING 30
#define DEFAULT_CONTRAST_SETTING 19 /* Match boot contrast */
/* Main LCD backlight brightness range and defaults */
/* PCF50506 can output 0%-100% duty cycle but D305A expects %15-100%. */
#define MIN_BRIGHTNESS_SETTING 1 /* 15/16 (93.75%) */
#define MAX_BRIGHTNESS_SETTING 13 /* 3/16 (18.75%) */
#define DEFAULT_BRIGHTNESS_SETTING 8 /* 8/16 (50.00%) = x5 boot default */

View file

@ -0,0 +1,175 @@
/*
* This config file is for Meizu M6SP
*/
#define TARGET_TREE /* this target is using the target tree system */
/* For Rolo and boot loader */
#define MODEL_NUMBER 1
#define MODEL_NAME "Meizu M6SP"
/* define this if you have recording possibility */
//#define HAVE_RECORDING
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_FMRADIO)
/* define the bitmask of hardware sample rates */
#define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11)
/* define the bitmask of recording sample rates */
#define REC_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11)
/* define this if you have a bitmap LCD display */
#define HAVE_LCD_BITMAP
/* define this if you can flip your LCD */
//#define HAVE_LCD_FLIP
/* define this if you have a colour LCD */
#define HAVE_LCD_COLOR
/* define this if you want album art for this target */
#define HAVE_ALBUMART
/* define this if you can invert the colours on your LCD */
//#define HAVE_LCD_INVERT
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
#define HAVE_PITCHSCREEN
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
/* Define this if your LCD can be enabled/disabled */
//#define HAVE_LCD_ENABLE
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
should be defined as well. */
//#define HAVE_LCD_SLEEP
#define CONFIG_KEYPAD MEIZU_M6SP_PAD
//#define AB_REPEAT_ENABLE 1
//#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
/* Define this if you do software codec */
#define CONFIG_CODEC SWCODEC
/* define this if you have a real-time clock */
#define CONFIG_RTC RTC_S5L8700
//#define CONFIG_RTC RTC_S35390A
#define CONFIG_LCD LCD_MEIZUM6
/* Define this if you have the WM8975 audio codec */
#define HAVE_WM8751 //FIXME
/* Define this for LCD backlight available */
#define HAVE_BACKLIGHT
#define HAVE_BACKLIGHT_BRIGHTNESS
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF
/* The number of bytes reserved for loadable codecs */
#define CODEC_SIZE 0x80000
/* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x80000
/* FM Tuner */
#define CONFIG_TUNER TEA5760
#define CONFIG_TUNER_XTAL 32768
//#define HAVE_TLV320
/* TLV320 has no tone controls, so we use the software ones */
#define HAVE_SW_TONE_CONTROLS
#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
#ifndef SIMULATOR
/* Define this if your LCD can set contrast */
//#define HAVE_LCD_CONTRAST
/* Define this if you have a Motorola SCF5250 */
#define CONFIG_CPU S5L8700
/* Define this if you want to use coldfire's i2c interface */
#define CONFIG_I2C I2C_S5L8700
/* define this if the hardware can be powered off while charging */
#define HAVE_POWEROFF_WHILE_CHARGING
/* The size of the flash ROM */
#define FLASH_SIZE 0x400000
/* Define this to the CPU frequency */
#define CPU_FREQ 11289600
/* Define this if you have ATA power-off control */
//#define HAVE_ATA_POWER_OFF
/* Virtual LED (icon) */
#define CONFIG_LED LED_VIRTUAL
/* Offset ( in the firmware file's header ) to the file CRC */
#define FIRMWARE_OFFSET_FILE_CRC 0
/* Offset ( in the firmware file's header ) to the real data */
#define FIRMWARE_OFFSET_FILE_DATA 8
/* USB On-the-go */
//#define CONFIG_USBOTG USBOTG_M5636
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
#define BOOTFILE_EXT "meizu"
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
#define BOOTLOADER_ENTRYPOINT 0x001F0000
#define FLASH_ENTRYPOINT 0x00001000
#define FLASH_MAGIC 0xfbfbfbf1
#endif /* SIMULATOR */
/* Define this for FM radio input available */
#define HAVE_FMRADIO_IN
/** Port-specific settings **/
/* Main LCD contrast range and defaults */
#define MIN_CONTRAST_SETTING 1
#define MAX_CONTRAST_SETTING 30
#define DEFAULT_CONTRAST_SETTING 19 /* Match boot contrast */
/* Main LCD backlight brightness range and defaults */
/* PCF50506 can output 0%-100% duty cycle but D305A expects %15-100%. */
#define MIN_BRIGHTNESS_SETTING 1 /* 15/16 (93.75%) */
#define MAX_BRIGHTNESS_SETTING 13 /* 3/16 (18.75%) */
#define DEFAULT_BRIGHTNESS_SETTING 8 /* 8/16 (50.00%) = x5 boot default */

View file

@ -95,6 +95,8 @@
#define MEIZU_M6SL_PAD 30
#define ONDAVX747_PAD 31
#define ONDAVX767_PAD 32
#define MEIZU_M6SP_PAD 33
#define MEIZU_M3_PAD 34
/* CONFIG_REMOTE_KEYPAD */
#define H100_REMOTE 1
@ -291,6 +293,10 @@
#include "config-c100.h"
#elif defined(MEIZU_M6SL)
#include "config-meizu-m6sl.h"
#elif defined(MEIZU_M6SP)
#include "config-meizu-m6sp.h"
#elif defined(MEIZU_M3)
#include "config-meizu-m3.h"
#elif defined(ONDA_VX747)
#include "config-ondavx747.h"
#elif defined(ONDA_VX767)

View file

@ -0,0 +1,35 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 by Barry Wardell
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef _ADC_TARGET_H_
#define _ADC_TARGET_H_
/* only two channels used by the Gigabeat */
#define NUM_ADC_CHANNELS 1
#define ADC_UNKNOWN_1 0
#define ADC_UNKNOWN_2 1
#define ADC_BATTERY 2
#define ADC_UNKNOWN_4 3
#define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
#define ADC_READ_ERROR 0xFFFF
#endif

View file

@ -0,0 +1,29 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2008 by Marcoen Hirschberg
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
bool _backlight_init(void);
void _backlight_on(void);
void _backlight_off(void);
void _backlight_set_brightness(int brightness);
#endif

View file

@ -0,0 +1,54 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 by Linus Nielsen Feltzing
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Toshiba Gigabeat specific button codes */
#define BUTTON_LEFT 0x00000001
#define BUTTON_RIGHT 0x00000002
#define BUTTON_UP 0x00000004
#define BUTTON_DOWN 0x00000008
#define BUTTON_SELECT 0x00000010
#define BUTTON_MENU 0x00000020
#define BUTTON_PLAY 0x00000040
#define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT|BUTTON_PLAY)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 10
#endif /* _BUTTON_TARGET_H_ */

View file

@ -0,0 +1,135 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2002 by Alan Korr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "config.h"
#include "hwcompat.h"
#include "kernel.h"
#include "lcd.h"
#include "system.h"
#include "cpu.h"
/*** definitions ***/
/** globals **/
static int xoffset; /* needed for flip */
/*** hardware configuration ***/
int lcd_default_contrast(void)
{
return 0x1f;
}
void lcd_set_contrast(int val)
{
}
void lcd_set_invert_display(bool yesno)
{
}
/* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno)
{
/* TODO: flip mode isn't working. The commands in the else part of
this function are how the original firmware inits the LCD */
if (yesno)
{
xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 128 we have */
}
else
{
xoffset = 0;
}
}
/* LCD init */
void lcd_init_device(void)
{
}
/*** Update functions ***/
/* Performance function that works with an external buffer
note that by and bheight are in 8-pixel units! */
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
int bheight, int stride)
{
/* Copy display bitmap to hardware */
while (bheight--)
{
}
}
/* Performance function that works with an external buffer
note that by and bheight are in 8-pixel units! */
void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
(void)values;
(void)phases;
(void)x;
(void)by;
(void)width;
(void)bheight;
(void)stride;
}
/* Update the display.
This must be called after all other LCD functions that change the display. */
void lcd_update(void) ICODE_ATTR;
void lcd_update(void)
{
int y;
/* Copy display bitmap to hardware */
for (y = 0; y < LCD_FBHEIGHT; y++)
{
}
}
/* Update a fraction of the display. */
void lcd_update_rect(int, int, int, int) ICODE_ATTR;
void lcd_update_rect(int x, int y, int width, int height)
{
int ymax;
/* The Y coordinates have to work on even 8 pixel rows */
ymax = (y + height-1) >> 3;
y >>= 3;
if(x + width > LCD_WIDTH)
width = LCD_WIDTH - x;
if (width <= 0)
return; /* nothing left to do, 0 is harmful to lcd_write_data() */
if(ymax >= LCD_FBHEIGHT)
ymax = LCD_FBHEIGHT-1;
/* Copy specified rectange bitmap to hardware */
for (; y <= ymax; y++)
{
}
}

View file

@ -0,0 +1,35 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 by Barry Wardell
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef _ADC_TARGET_H_
#define _ADC_TARGET_H_
/* only two channels used by the Gigabeat */
#define NUM_ADC_CHANNELS 1
#define ADC_UNKNOWN_1 0
#define ADC_UNKNOWN_2 1
#define ADC_BATTERY 2
#define ADC_UNKNOWN_4 3
#define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
#define ADC_READ_ERROR 0xFFFF
#endif

View file

@ -0,0 +1,29 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2008 by Marcoen Hirschberg
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
bool _backlight_init(void);
void _backlight_on(void);
void _backlight_off(void);
void _backlight_set_brightness(int brightness);
#endif

View file

@ -0,0 +1,54 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 by Linus Nielsen Feltzing
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Toshiba Gigabeat specific button codes */
#define BUTTON_LEFT 0x00000001
#define BUTTON_RIGHT 0x00000002
#define BUTTON_UP 0x00000004
#define BUTTON_DOWN 0x00000008
#define BUTTON_SELECT 0x00000010
#define BUTTON_MENU 0x00000020
#define BUTTON_PLAY 0x00000040
#define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT|BUTTON_PLAY)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 10
#endif /* _BUTTON_TARGET_H_ */

View file

@ -0,0 +1,135 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2002 by Alan Korr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "config.h"
#include "hwcompat.h"
#include "kernel.h"
#include "lcd.h"
#include "system.h"
#include "cpu.h"
/*** definitions ***/
/** globals **/
static int xoffset; /* needed for flip */
/*** hardware configuration ***/
int lcd_default_contrast(void)
{
return 0x1f;
}
void lcd_set_contrast(int val)
{
}
void lcd_set_invert_display(bool yesno)
{
}
/* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno)
{
/* TODO: flip mode isn't working. The commands in the else part of
this function are how the original firmware inits the LCD */
if (yesno)
{
xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 128 we have */
}
else
{
xoffset = 0;
}
}
/* LCD init */
void lcd_init_device(void)
{
}
/*** Update functions ***/
/* Performance function that works with an external buffer
note that by and bheight are in 8-pixel units! */
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
int bheight, int stride)
{
/* Copy display bitmap to hardware */
while (bheight--)
{
}
}
/* Performance function that works with an external buffer
note that by and bheight are in 8-pixel units! */
void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
(void)values;
(void)phases;
(void)x;
(void)by;
(void)width;
(void)bheight;
(void)stride;
}
/* Update the display.
This must be called after all other LCD functions that change the display. */
void lcd_update(void) ICODE_ATTR;
void lcd_update(void)
{
int y;
/* Copy display bitmap to hardware */
for (y = 0; y < LCD_FBHEIGHT; y++)
{
}
}
/* Update a fraction of the display. */
void lcd_update_rect(int, int, int, int) ICODE_ATTR;
void lcd_update_rect(int x, int y, int width, int height)
{
int ymax;
/* The Y coordinates have to work on even 8 pixel rows */
ymax = (y + height-1) >> 3;
y >>= 3;
if(x + width > LCD_WIDTH)
width = LCD_WIDTH - x;
if (width <= 0)
return; /* nothing left to do, 0 is harmful to lcd_write_data() */
if(ymax >= LCD_FBHEIGHT)
ymax = LCD_FBHEIGHT-1;
/* Copy specified rectange bitmap to hardware */
for (; y <= ymax; y++)
{
}
}

49
tools/configure vendored
View file

@ -693,10 +693,11 @@ cat <<EOF
==Tatung== ==Olympus== ==Logik==
60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
71) M:Robe 100
==Creative== ==Philips== ==Meizu==
90) Zen Vision:M 30GB 100) GoGear SA9200 110) M6SL
91) Zen Vision:M 60GB 101) GoGear HDD1630
92) Zen Vision
91) Zen Vision:M 60GB 101) GoGear HDD1630 111) M6SP
92) Zen Vision 112) M3
==Onda==
120) VX747
@ -1761,6 +1762,50 @@ fi
t_model="meizu-m6sl"
;;
111|meizum6sp)
target_id=46
modelname="meizum6sp"
target="-DMEIZU_M6SP"
memory=16 # always
arm940tbecc
tool="cp"
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
output="rockbox.meizu"
appextra="recorder:gui"
plugins="no" #FIXME
swcodec="yes"
toolset=$genericbitmaptools
boottool="cp"
bootoutput="rockboot.ebn"
# architecture, manufacturer and model for the target-tree build
t_cpu="arm"
t_manufacturer="s5l8700"
t_model="meizu-m6sp"
;;
112|meizum3)
target_id=47
modelname="meizum3"
target="-DMEIZU_M3"
memory=16 # always
arm940tbecc
tool="cp"
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
output="rockbox.meizu"
appextra="recorder:gui"
plugins="no" #FIXME
swcodec="yes"
toolset=$genericbitmaptools
boottool="cp"
bootoutput="rockboot.ebn"
# architecture, manufacturer and model for the target-tree build
t_cpu="arm"
t_manufacturer="s5l8700"
t_model="meizu-m3"
;;
120|ondavx747)
target_id=44
modelname="ondavx747"

View file

@ -2,7 +2,7 @@
all: meizu_dfu
meizu_dfu: meizu_dfu.c
gcc -o meizu_dfu meizu_dfu.c -lusb
gcc -I/usr/local/include -L/usr/local/lib -o meizu_dfu meizu_dfu.c -lusb
.PHONY: clean
clean: