mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-12 00:47:49 -04:00
Remove Sansa View port
It doesn't seem to have been functional ever and currently doesn't build; eg. the last commit to the LCD driver added a syntax error, and there's some duplicate functions between mmu-armv6.S and system-pp502x.c. Doesn't seem worth the effort to fix. Change-Id: I82b5bec3ed9686f28aedbe283818af792b96daf4
This commit is contained in:
parent
1a33d7990a
commit
53862c7eed
20 changed files with 43 additions and 1077 deletions
|
|
@ -19,14 +19,12 @@ show_logo.c
|
||||||
defined(MROBE_100) || defined(PHILIPS_SA9200) || \
|
defined(MROBE_100) || defined(PHILIPS_SA9200) || \
|
||||||
defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330) || \
|
defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330) || \
|
||||||
defined(SAMSUNG_YH820) || defined(SAMSUNG_YH920) || \
|
defined(SAMSUNG_YH820) || defined(SAMSUNG_YH920) || \
|
||||||
defined(SAMSUNG_YH925) || defined(SANSA_VIEW)
|
defined(SAMSUNG_YH925)
|
||||||
#ifdef E200R_INSTALLER
|
#ifdef E200R_INSTALLER
|
||||||
main-e200r-installer.c
|
main-e200r-installer.c
|
||||||
#elif defined(SANSA_PP_ERASE)
|
#elif defined(SANSA_PP_ERASE)
|
||||||
main-ppsansawipe.c
|
main-ppsansawipe.c
|
||||||
fat32format.c
|
fat32format.c
|
||||||
#elif defined(SANSA_VIEW)
|
|
||||||
sansaview.c
|
|
||||||
#else
|
#else
|
||||||
show_logo.c
|
show_logo.c
|
||||||
main-pp.c
|
main-pp.c
|
||||||
|
|
|
||||||
|
|
@ -265,8 +265,8 @@ static int handle_usb(int connect_timeout)
|
||||||
|
|
||||||
return usb;
|
return usb;
|
||||||
}
|
}
|
||||||
#elif (defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) \
|
#elif (defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200)) && \
|
||||||
|| defined (SANSA_VIEW)) && !defined(USE_ROCKBOX_USB)
|
!defined(USE_ROCKBOX_USB)
|
||||||
/* Return USB_INSERTED if cable present */
|
/* Return USB_INSERTED if cable present */
|
||||||
static int handle_usb(int connect_timeout)
|
static int handle_usb(int connect_timeout)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2014 by Szymon Dziok
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
SANSA VIEW: TESTING CODE
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "config.h"
|
|
||||||
#include "inttypes.h"
|
|
||||||
#include "cpu.h"
|
|
||||||
#include "system.h"
|
|
||||||
#include "lcd.h"
|
|
||||||
#include "../kernel-internal.h"
|
|
||||||
#include "storage.h"
|
|
||||||
#include "disk.h"
|
|
||||||
#include "font.h"
|
|
||||||
#include "backlight.h"
|
|
||||||
#include "backlight-target.h"
|
|
||||||
#include "button.h"
|
|
||||||
#include "panic.h"
|
|
||||||
#include "power.h"
|
|
||||||
#include "file.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
system_init();
|
|
||||||
kernel_init();
|
|
||||||
disable_irq();
|
|
||||||
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
backlight_hw_on();
|
|
||||||
buttonlight_hw_off();
|
|
||||||
sleep(HZ/4);
|
|
||||||
backlight_hw_off();
|
|
||||||
buttonlight_hw_on();
|
|
||||||
sleep(HZ/4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1074,18 +1074,6 @@ target/arm/sandisk/sansa-c200/button-c200.c
|
||||||
target/arm/sandisk/sansa-c200/powermgmt-c200.c
|
target/arm/sandisk/sansa-c200/powermgmt-c200.c
|
||||||
#endif /* SANSA_C200 */
|
#endif /* SANSA_C200 */
|
||||||
|
|
||||||
#ifdef SANSA_VIEW
|
|
||||||
target/arm/sandisk/sansa-view/backlight-view.c
|
|
||||||
target/arm/sandisk/sansa-view/adc-view.c
|
|
||||||
target/arm/sandisk/sansa-view/power-view.c
|
|
||||||
target/arm/sandisk/sansa-view/lcd-view.c
|
|
||||||
target/arm/sandisk/sansa-view/button-view.c
|
|
||||||
target/arm/sandisk/sansa-view/powermgmt-view.c
|
|
||||||
#ifndef BOOTLOADER
|
|
||||||
/* target/arm/sandisk/audio-view.c */
|
|
||||||
#endif /* BOOTLOADER */
|
|
||||||
#endif /* SANSA_VIEW */
|
|
||||||
|
|
||||||
#ifdef PHILIPS_SA9200
|
#ifdef PHILIPS_SA9200
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
drivers/synaptics-mep.c
|
drivers/synaptics-mep.c
|
||||||
|
|
|
||||||
|
|
@ -485,8 +485,6 @@ Lyre prototype 1 */
|
||||||
#include "config/sansaclipzip.h"
|
#include "config/sansaclipzip.h"
|
||||||
#elif defined(SANSA_C200V2)
|
#elif defined(SANSA_C200V2)
|
||||||
#include "config/sansac200v2.h"
|
#include "config/sansac200v2.h"
|
||||||
#elif defined(SANSA_VIEW)
|
|
||||||
#include "config/sansaview.h"
|
|
||||||
#elif defined(LYRE_PROTO1)
|
#elif defined(LYRE_PROTO1)
|
||||||
#include "config/lyreproto1.h"
|
#include "config/lyreproto1.h"
|
||||||
#elif defined(MINI2440)
|
#elif defined(MINI2440)
|
||||||
|
|
|
||||||
|
|
@ -1,196 +0,0 @@
|
||||||
/*
|
|
||||||
* This config file is for the Sandisk Sansa View
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
|
||||||
#define MODEL_NUMBER 63
|
|
||||||
#define MODEL_NAME "Sandisk View"
|
|
||||||
|
|
||||||
#define HW_SAMPR_CAPS (SAMPR_CAP_44)
|
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
|
||||||
/* #define HAVE_RECORDING */
|
|
||||||
|
|
||||||
#define REC_SAMPR_CAPS (SAMPR_CAP_22)
|
|
||||||
#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
|
|
||||||
#define REC_SAMPR_DEFAULT SAMPR_22
|
|
||||||
|
|
||||||
/* Define bitmask of input sources - recordable bitmask can be defined
|
|
||||||
explicitly if different */
|
|
||||||
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* 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 to enable bitmap scaling */
|
|
||||||
#define HAVE_BMP_SCALING
|
|
||||||
|
|
||||||
/* define this to enable JPEG decoding */
|
|
||||||
#define HAVE_JPEG
|
|
||||||
|
|
||||||
/* define this if you have a light associated with the buttons */
|
|
||||||
#define HAVE_BUTTON_LIGHT
|
|
||||||
|
|
||||||
/* define this if you have access to the quickscreen */
|
|
||||||
#define HAVE_QUICKSCREEN
|
|
||||||
|
|
||||||
/* define this if you would like tagcache to build on this target */
|
|
||||||
#define HAVE_TAGCACHE
|
|
||||||
|
|
||||||
/* LCD dimensions */
|
|
||||||
#define LCD_WIDTH 240
|
|
||||||
#define LCD_HEIGHT 320
|
|
||||||
/* sqrt(240^2 + 320^2) / 2.4 = 166.7 */
|
|
||||||
#define LCD_DPI 167
|
|
||||||
#define LCD_DEPTH 16 /* 65536 colours */
|
|
||||||
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
|
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
|
||||||
/* define this if you have LCD enable function */
|
|
||||||
#define HAVE_LCD_ENABLE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* define this if you can flip your LCD */
|
|
||||||
#define HAVE_LCD_FLIP
|
|
||||||
|
|
||||||
/* define this if you can invert the colours on your LCD */
|
|
||||||
#define HAVE_LCD_INVERT
|
|
||||||
|
|
||||||
/* The only difference is that the power/hold is on the left instead of right on Fuze */
|
|
||||||
#define CONFIG_KEYPAD SANSA_FUZE_PAD
|
|
||||||
|
|
||||||
/* Define this to have CPU boosted while scrolling in the UI */
|
|
||||||
#define HAVE_GUI_BOOST
|
|
||||||
|
|
||||||
/* Define this to enable morse code input */
|
|
||||||
#define HAVE_MORSE_INPUT
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* There is no hardware tone control */
|
|
||||||
/* #define HAVE_SW_TONE_CONTROLS*/
|
|
||||||
#define HAVE_WM8731
|
|
||||||
|
|
||||||
/* define this if you have a real-time clock */
|
|
||||||
#ifndef BOOTLOADER
|
|
||||||
/* #define CONFIG_RTC RTC_ */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define this if you have a software controlled poweroff */
|
|
||||||
#define HAVE_SW_POWEROFF
|
|
||||||
|
|
||||||
/* Required for MicroSD cards */
|
|
||||||
#define HAVE_FAT16SUPPORT
|
|
||||||
|
|
||||||
/* The number of bytes reserved for loadable codecs */
|
|
||||||
#define CODEC_SIZE 0x100000
|
|
||||||
|
|
||||||
/* The number of bytes reserved for loadable plugins */
|
|
||||||
#define PLUGIN_BUFFER_SIZE 0x80000
|
|
||||||
|
|
||||||
#define AB_REPEAT_ENABLE
|
|
||||||
|
|
||||||
/* Define this for LCD backlight available */
|
|
||||||
#define HAVE_BACKLIGHT
|
|
||||||
/* #define HAVE_BACKLIGHT_BRIGHTNESS */
|
|
||||||
|
|
||||||
/* define this if the unit uses a scrollwheel for navigation */
|
|
||||||
#define HAVE_SCROLLWHEEL
|
|
||||||
/* define to activate advanced wheel acceleration code */
|
|
||||||
#define HAVE_WHEEL_ACCELERATION
|
|
||||||
/* define from which rotation speed [degree/sec] on the acceleration starts */
|
|
||||||
#define WHEEL_ACCEL_START 540
|
|
||||||
/* define type of acceleration (1 = ^2, 2 = ^3, 3 = ^4) */
|
|
||||||
#define WHEEL_ACCELERATION 1
|
|
||||||
|
|
||||||
/* define this if you have a flash memory storage */
|
|
||||||
#define HAVE_FLASH_STORAGE
|
|
||||||
|
|
||||||
/* define this if the flash memory uses the SecureDigital Memory Card protocol */
|
|
||||||
#define CONFIG_STORAGE STORAGE_SD
|
|
||||||
|
|
||||||
#define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */
|
|
||||||
#define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */
|
|
||||||
#define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */
|
|
||||||
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
|
|
||||||
|
|
||||||
|
|
||||||
#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
|
|
||||||
|
|
||||||
/* Charging implemented in a target-specific algorithm */
|
|
||||||
#define CONFIG_CHARGING CHARGING_SIMPLE
|
|
||||||
#define HAVE_POWEROFF_WHILE_CHARGING
|
|
||||||
|
|
||||||
/* define current usage levels */
|
|
||||||
#define CURRENT_NORMAL 30 /* Toni's measurements in Nov 2008 */
|
|
||||||
#define CURRENT_BACKLIGHT 40 /* Screen is about 20, blue LEDs are another 20, so 40 if both */
|
|
||||||
#define CURRENT_RECORD 30 /* flash player, so this is just unboosted current*/
|
|
||||||
|
|
||||||
/* define this if the unit can be powered or charged via USB */
|
|
||||||
#define HAVE_USB_POWER
|
|
||||||
|
|
||||||
/* Define this if you have a PortalPlayer PP5024 */
|
|
||||||
#define CONFIG_CPU PP6100
|
|
||||||
|
|
||||||
/* Define this if you want to use the PP5024 i2c interface */
|
|
||||||
#define CONFIG_I2C I2C_PP5024
|
|
||||||
|
|
||||||
/* define this if the hardware can be powered off while charging */
|
|
||||||
/* Sansa can't be powered off while charging */
|
|
||||||
/* #define HAVE_POWEROFF_WHILE_CHARGING */
|
|
||||||
|
|
||||||
/* The start address index for ROM builds */
|
|
||||||
#define ROM_START 0x00000000
|
|
||||||
|
|
||||||
/* Define this to the CPU frequency */
|
|
||||||
#define CPU_FREQ 250000000
|
|
||||||
|
|
||||||
/* Type of LCD */
|
|
||||||
#define CONFIG_LCD LCD_VIEW
|
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
|
||||||
#define HAVE_MULTIDRIVE
|
|
||||||
#define NUM_DRIVES 2
|
|
||||||
#define HAVE_HOTSWAP
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* USB On-the-go */
|
|
||||||
#define CONFIG_USBOTG USBOTG_ARC
|
|
||||||
|
|
||||||
/* enable these for the experimental usb stack */
|
|
||||||
#define HAVE_USBSTACK
|
|
||||||
#define USB_VENDOR_ID 0x0781
|
|
||||||
#define USB_PRODUCT_ID 0x74b1
|
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
|
||||||
/* #define HAVE_ADJUSTABLE_CPU_FREQ */
|
|
||||||
|
|
||||||
#define MI4_FORMAT
|
|
||||||
#define BOOTFILE_EXT "mi4"
|
|
||||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
|
||||||
#define BOOTDIR "/.rockbox"
|
|
||||||
|
|
||||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
|
||||||
|
|
||||||
#define INCLUDE_TIMEOUT_API
|
|
||||||
|
|
||||||
/** Port-specific settings **/
|
|
||||||
|
|
||||||
/* Main LCD backlight brightness range and defaults */
|
|
||||||
#define MIN_BRIGHTNESS_SETTING 1
|
|
||||||
#define MAX_BRIGHTNESS_SETTING 12
|
|
||||||
#define DEFAULT_BRIGHTNESS_SETTING 6
|
|
||||||
|
|
||||||
/* Default recording levels */
|
|
||||||
#define DEFAULT_REC_MIC_GAIN 23
|
|
||||||
#define DEFAULT_REC_LEFT_GAIN 23
|
|
||||||
#define DEFAULT_REC_RIGHT_GAIN 23
|
|
||||||
|
|
||||||
/* Define this if a programmable hotkey is mapped */
|
|
||||||
#define HAVE_HOTKEY
|
|
||||||
|
|
@ -87,12 +87,6 @@
|
||||||
#define USB_GPIO_MASK 0x04
|
#define USB_GPIO_MASK 0x04
|
||||||
#define USB_GPIO_VAL 0x04
|
#define USB_GPIO_VAL 0x04
|
||||||
|
|
||||||
#elif defined(SANSA_VIEW)
|
|
||||||
/* GPIO A bit 7 is usb detect */
|
|
||||||
#define USB_GPIO GPIOA
|
|
||||||
#define USB_GPIO_MASK 0x80
|
|
||||||
#define USB_GPIO_VAL 0x80
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error No USB GPIO config specified
|
#error No USB GPIO config specified
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
*
|
|
||||||
* 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 "adc-target.h"
|
|
||||||
|
|
||||||
void adc_init(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Called to get the recent ADC reading */
|
|
||||||
inline unsigned short adc_read(int channel)
|
|
||||||
{
|
|
||||||
(void)channel;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
void backlight_hw_on(void);
|
|
||||||
void backlight_hw_off(void);
|
|
||||||
|
|
||||||
void buttonlight_hw_on(void);
|
|
||||||
void buttonlight_hw_off(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
* Copyright (C) 2014 by Szymon Dziok
|
|
||||||
*
|
|
||||||
* 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 "backlight-target.h"
|
|
||||||
#include "system.h"
|
|
||||||
#include "lcd.h"
|
|
||||||
#include "backlight.h"
|
|
||||||
|
|
||||||
bool backlight_hw_init(void)
|
|
||||||
{
|
|
||||||
GPIO_SET_BITWISE(GPIOD_ENABLE, 0x01);
|
|
||||||
GPIO_SET_BITWISE(GPIOD_OUTPUT_EN, 0x01);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_ENABLE, 0x01);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x01);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_ENABLE, 0x02);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x02);
|
|
||||||
GPIO_SET_BITWISE(GPIOR_ENABLE, 0x10);
|
|
||||||
GPIO_SET_BITWISE(GPIOR_ENABLE, 0x20);
|
|
||||||
GPIO_SET_BITWISE(GPIOR_ENABLE, 0x40);
|
|
||||||
GPIO_SET_BITWISE(GPIOR_ENABLE, 0x80);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x10);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x20);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x40);
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x80);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_hw_brightness(int brightness)
|
|
||||||
{
|
|
||||||
(void)brightness;
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_hw_off(void)
|
|
||||||
{
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x01);
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_hw_on(void)
|
|
||||||
{
|
|
||||||
GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x01);
|
|
||||||
}
|
|
||||||
|
|
||||||
void buttonlight_hw_off(void)
|
|
||||||
{
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x02); /* vertical buttonlight */
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x01); /* horizontal buttonlight */
|
|
||||||
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOR_OUTPUT_VAL, 0x80); /* scrollwheel bottom led */
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOR_OUTPUT_VAL, 0x40); /* scrollwheel right led */
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOR_OUTPUT_VAL, 0x20); /* scrollwheel top led */
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOR_OUTPUT_VAL, 0x10); /* scrollwheel left led */
|
|
||||||
}
|
|
||||||
|
|
||||||
void buttonlight_hw_on(void)
|
|
||||||
{
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_VAL, 0x02); /* vertical buttonlight */
|
|
||||||
GPIO_SET_BITWISE(GPIOA_OUTPUT_VAL, 0x01); /* horizontal buttonlight */
|
|
||||||
|
|
||||||
GPIO_SET_BITWISE(GPIOR_OUTPUT_VAL, 0x80); /* scrollwheel bottom led */
|
|
||||||
GPIO_SET_BITWISE(GPIOR_OUTPUT_VAL, 0x40); /* scrollwheel right led */
|
|
||||||
GPIO_SET_BITWISE(GPIOR_OUTPUT_VAL, 0x20); /* scrollwheel top led */
|
|
||||||
GPIO_SET_BITWISE(GPIOR_OUTPUT_VAL, 0x10); /* scrollwheel left led */
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* 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 _BUTTON_TARGET_H_
|
|
||||||
#define _BUTTON_TARGET_H_
|
|
||||||
|
|
||||||
#define HAS_BUTTON_HOLD
|
|
||||||
|
|
||||||
/* Sandisk Sansa View button codes */
|
|
||||||
|
|
||||||
/* Main unit's buttons */
|
|
||||||
#define BUTTON_HOME 0x00000001
|
|
||||||
|
|
||||||
#define BUTTON_DOWN 0x00000002
|
|
||||||
#define BUTTON_RIGHT 0x00000004
|
|
||||||
|
|
||||||
#define BUTTON_LEFT 0x00000008
|
|
||||||
#define BUTTON_SELECT 0x00000010
|
|
||||||
#define BUTTON_UP 0x00000020
|
|
||||||
#define BUTTON_POWER 0x00000040
|
|
||||||
|
|
||||||
#define BUTTON_SCROLL_BACK 0x00000080
|
|
||||||
#define BUTTON_SCROLL_FWD 0x00000100
|
|
||||||
|
|
||||||
#define BUTTON_HOLD 0x00000400
|
|
||||||
|
|
||||||
#define BUTTON_MAIN (BUTTON_HOME|BUTTON_DOWN|BUTTON_RIGHT|BUTTON_LEFT \
|
|
||||||
|BUTTON_SELECT|BUTTON_UP|BUTTON_POWER \
|
|
||||||
|BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \
|
|
||||||
|BUTTON_HOLD)
|
|
||||||
|
|
||||||
#define POWEROFF_BUTTON BUTTON_POWER
|
|
||||||
#define POWEROFF_COUNT 10
|
|
||||||
|
|
||||||
#endif /* _BUTTON_TARGET_H_ */
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
*
|
|
||||||
* 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 "button.h"
|
|
||||||
|
|
||||||
void button_init_device(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool button_hold(void)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int button_read_device(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
*
|
|
||||||
* 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 "i2c.h"
|
|
||||||
|
|
||||||
void i2c_init(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -1,340 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Rockbox driver for Sansa View LCDs
|
|
||||||
*
|
|
||||||
* Copyright (c) 2009 Robert Keevil
|
|
||||||
*
|
|
||||||
* 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 <string.h>
|
|
||||||
#include "cpu.h"
|
|
||||||
#include "kernel.h"
|
|
||||||
#include "system.h"
|
|
||||||
#include "backlight-target.h"
|
|
||||||
#include "lcd.h"
|
|
||||||
|
|
||||||
static bool display_on SHAREDBSS_ATTR = true;
|
|
||||||
static int lcd_type;
|
|
||||||
|
|
||||||
#define LCD_DATA_OUT_GPIO GPIOH_OUTPUT_VAL
|
|
||||||
#define LCD_DATA_OUT_PIN 4
|
|
||||||
|
|
||||||
#define LCD_CLOCK_GPIO GPIOH_OUTPUT_VAL
|
|
||||||
#define LCD_CLOCK_PIN 6
|
|
||||||
|
|
||||||
#define LCD_CS_GPIO GPIOH_OUTPUT_VAL
|
|
||||||
#define LCD_CS_PIN 7
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void lcd_init_gpio(void)
|
|
||||||
{
|
|
||||||
DEV_INIT1 |= 0xfc000000;
|
|
||||||
DEV_INIT3 |= 0xc300000;
|
|
||||||
|
|
||||||
GPIOE_ENABLE = 0;
|
|
||||||
GPIOM_ENABLE &= ~0x3;
|
|
||||||
GPIOF_ENABLE = 0;
|
|
||||||
GPIOJ_ENABLE &= ~0x1a;
|
|
||||||
// reset low
|
|
||||||
GPIOB_ENABLE &= ~0x8;
|
|
||||||
// SPI chip select
|
|
||||||
GPIOH_OUTPUT_VAL |= 0x80;
|
|
||||||
GPIOH_OUTPUT_EN |= 0x80;
|
|
||||||
GPIOH_ENABLE |= 0x80;
|
|
||||||
// SPI clock
|
|
||||||
GPIOH_OUTPUT_VAL |= 0x40;
|
|
||||||
GPIOH_OUTPUT_EN |= 0x40;
|
|
||||||
GPIOH_ENABLE |= 0x40;
|
|
||||||
// unk
|
|
||||||
GPIOH_OUTPUT_VAL |= 0x20;
|
|
||||||
GPIOH_OUTPUT_EN |= 0x20;
|
|
||||||
GPIOH_ENABLE |= 0x20;
|
|
||||||
// SPI data
|
|
||||||
GPIOH_OUTPUT_VAL |= 0x10;
|
|
||||||
GPIOH_OUTPUT_EN |= 0x10;
|
|
||||||
GPIOH_ENABLE |= 0x10;
|
|
||||||
// LCD reset
|
|
||||||
GPIOB_OUTPUT_VAL |= 0x4;
|
|
||||||
GPIOB_ENABLE |= 0x4;
|
|
||||||
GPIOB_OUTPUT_EN |= 0x4;
|
|
||||||
DEV_INIT2 = 0x40000000;
|
|
||||||
// LCD type
|
|
||||||
GPIOG_ENABLE |= 0x8;
|
|
||||||
GPIOG_OUTPUT_EN &= ~0x8;
|
|
||||||
|
|
||||||
if(GPIOG_INPUT_VAL & 0x8)
|
|
||||||
lcd_type = 0;
|
|
||||||
else
|
|
||||||
lcd_type = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lcd_send_msg(unsigned char count, unsigned int data)
|
|
||||||
{
|
|
||||||
GPIO_SET_BITWISE(LCD_CLOCK_GPIO, 1 << LCD_CLOCK_PIN);
|
|
||||||
GPIO_CLEAR_BITWISE(LCD_CS_GPIO, 1 << LCD_CS_PIN);
|
|
||||||
|
|
||||||
for(int i = count - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
if(data & (1 << i))
|
|
||||||
GPIO_SET_BITWISE(LCD_DATA_OUT_GPIO, 1 << LCD_DATA_OUT_PIN);
|
|
||||||
else
|
|
||||||
GPIO_CLEAR_BITWISE(LCD_DATA_OUT_GPIO, 1 << LCD_DATA_OUT_PIN);
|
|
||||||
GPIO_CLEAR_BITWISE(LCD_CLOCK_GPIO, 1 << LCD_CLOCK_PIN);
|
|
||||||
udelay(1);
|
|
||||||
GPIO_SET_BITWISE(LCD_CLOCK_GPIO, 1 << LCD_CLOCK_PIN);
|
|
||||||
udelay(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
GPIO_SET_BITWISE(LCD_CS_GPIO, 1 << LCD_CS_PIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lcd_send_cmd(unsigned int cmd)
|
|
||||||
{
|
|
||||||
lcd_send_msg(24, (0x700000 | cmd));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lcd_send_data(unsigned int data)
|
|
||||||
{
|
|
||||||
lcd_send_msg(24, (0x720000 | data));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lcd_write_reg(unsigned int cmd, unsigned int data)
|
|
||||||
{
|
|
||||||
lcd_send_cmd(cmd);
|
|
||||||
lcd_send_data(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_reset(void)
|
|
||||||
{
|
|
||||||
GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x4);
|
|
||||||
udelay(1000);
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x4);
|
|
||||||
udelay(10000);
|
|
||||||
GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x4);
|
|
||||||
udelay(50000);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Run the powerup sequence for the driver IC */
|
|
||||||
static void lcd_power_on(void)
|
|
||||||
{
|
|
||||||
lcd_init_gpio();
|
|
||||||
lcd_reset();
|
|
||||||
|
|
||||||
lcd_write_reg(0xE5, 0x8000);
|
|
||||||
lcd_write_reg(0x0, 0x1);
|
|
||||||
lcd_write_reg(0x1, 0x100);
|
|
||||||
lcd_write_reg(0x2, 0x700);
|
|
||||||
lcd_write_reg(0x3, 0x5230);
|
|
||||||
lcd_write_reg(0x4, 0x0);
|
|
||||||
lcd_write_reg(0x8, 0x408); /* back porch = 8, front porch = 4 */
|
|
||||||
lcd_write_reg(0x9, 0x0);
|
|
||||||
lcd_write_reg(0xa, 0x0);
|
|
||||||
lcd_write_reg(0xd, 0x0);
|
|
||||||
lcd_write_reg(0xf, 0x2);
|
|
||||||
lcd_write_reg(0x10, 0x0);
|
|
||||||
lcd_write_reg(0x11, 0x0);
|
|
||||||
lcd_write_reg(0x12, 0x0);
|
|
||||||
lcd_write_reg(0x13, 0x0);
|
|
||||||
sleep(HZ/5);
|
|
||||||
lcd_write_reg(0x10, 0x17B0);
|
|
||||||
lcd_write_reg(0x11, 0x7);
|
|
||||||
sleep(HZ/20);
|
|
||||||
lcd_write_reg(0x12, 0x13c);
|
|
||||||
sleep(HZ/20);
|
|
||||||
|
|
||||||
if (lcd_type == 0)
|
|
||||||
{
|
|
||||||
lcd_write_reg(0x13, 0x1700);
|
|
||||||
lcd_write_reg(0x29, 0x10);
|
|
||||||
sleep(HZ/10);
|
|
||||||
lcd_write_reg(0x20, 0x0);
|
|
||||||
lcd_write_reg(0x21, 0x0);
|
|
||||||
|
|
||||||
lcd_write_reg(0x30, 0x7);
|
|
||||||
lcd_write_reg(0x31, 0x403);
|
|
||||||
lcd_write_reg(0x32, 0x400);
|
|
||||||
lcd_write_reg(0x35, 0x3);
|
|
||||||
lcd_write_reg(0x36, 0xF07);
|
|
||||||
lcd_write_reg(0x37, 0x606);
|
|
||||||
lcd_write_reg(0x38, 0x106);
|
|
||||||
lcd_write_reg(0x39, 0x7);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lcd_write_reg(0x13, 0x1800);
|
|
||||||
lcd_write_reg(0x29, 0x13);
|
|
||||||
sleep(HZ/10);
|
|
||||||
lcd_write_reg(0x20, 0x0);
|
|
||||||
lcd_write_reg(0x21, 0x0);
|
|
||||||
|
|
||||||
lcd_write_reg(0x30, 0x2);
|
|
||||||
lcd_write_reg(0x31, 0x606);
|
|
||||||
lcd_write_reg(0x32, 0x501);
|
|
||||||
lcd_write_reg(0x35, 0x206);
|
|
||||||
lcd_write_reg(0x36, 0x504);
|
|
||||||
lcd_write_reg(0x37, 0x707);
|
|
||||||
lcd_write_reg(0x38, 0x306);
|
|
||||||
lcd_write_reg(0x39, 0x7);
|
|
||||||
}
|
|
||||||
|
|
||||||
lcd_write_reg(0x3c, 0x700);
|
|
||||||
lcd_write_reg(0x3d, 0x700);
|
|
||||||
|
|
||||||
lcd_write_reg(0x50, 0x0);
|
|
||||||
lcd_write_reg(0x51, 0xef);
|
|
||||||
lcd_write_reg(0x52, 0x0);
|
|
||||||
lcd_write_reg(0x53, 0x13f);
|
|
||||||
|
|
||||||
lcd_write_reg(0x60, 0x2700);
|
|
||||||
lcd_write_reg(0x61, 0x1);
|
|
||||||
lcd_write_reg(0x6a, 0x0);
|
|
||||||
|
|
||||||
lcd_write_reg(0x80, 0x0);
|
|
||||||
lcd_write_reg(0x81, 0x0);
|
|
||||||
lcd_write_reg(0x82, 0x0);
|
|
||||||
lcd_write_reg(0x83, 0x0);
|
|
||||||
lcd_write_reg(0x84, 0x0);
|
|
||||||
lcd_write_reg(0x85, 0x0);
|
|
||||||
|
|
||||||
lcd_write_reg(0x90, 0x10);
|
|
||||||
lcd_write_reg(0x92, 0x0);
|
|
||||||
lcd_write_reg(0x93, 0x3);
|
|
||||||
lcd_write_reg(0x95, 0x110);
|
|
||||||
lcd_write_reg(0x97, 0x0);
|
|
||||||
lcd_write_reg(0x98, 0x0);
|
|
||||||
|
|
||||||
lcd_write_reg(0xc, 0x000); // SYSTEM mode
|
|
||||||
lcd_write_reg(0x7, 0x173);
|
|
||||||
sleep(HZ/10);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
lcd_power_on();
|
|
||||||
|
|
||||||
lcd_write_reg(0x7, 0x160);
|
|
||||||
lcd_write_reg(0x10, 0x17B1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void unknown03(bool r0)
|
|
||||||
{
|
|
||||||
if (r0)
|
|
||||||
GPIOJ_ENABLE &= ~0x2;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GPIOJ_ENABLE |= 0x2;
|
|
||||||
GPIOJ_OUTPUT_EN |= 0x2;
|
|
||||||
GPIOJ_OUTPUT_VAL &= ~0x02;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_init_device(void)
|
|
||||||
{
|
|
||||||
lcd_power_on();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(HAVE_LCD_ENABLE)
|
|
||||||
bool lcd_active(void)
|
|
||||||
{
|
|
||||||
return display_on;
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_enable(bool on)
|
|
||||||
{
|
|
||||||
display_on = on;
|
|
||||||
if(on)
|
|
||||||
{
|
|
||||||
lcd_write_reg(0x10, 0x17B0);
|
|
||||||
udelay(100);
|
|
||||||
lcd_write_reg(0x7, 0x173);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lcd_write_reg(0x7, 0x160);
|
|
||||||
lcd_write_reg(0x10, 0x17B1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline void lcd_send_frame_byte(unsigned char data)
|
|
||||||
{
|
|
||||||
for(int bit = 0; bit < 8; bit++)
|
|
||||||
{
|
|
||||||
if(data & 0x80)
|
|
||||||
GPIO_SET_BITWISE(LCD_DATA_OUT_GPIO, 1 << LCD_DATA_OUT_PIN);
|
|
||||||
else
|
|
||||||
GPIO_CLEAR_BITWISE(LCD_DATA_OUT_GPIO, 1 << LCD_DATA_OUT_PIN);
|
|
||||||
data <<= 1;
|
|
||||||
GPIO_CLEAR_BITWISE(LCD_CLOCK_GPIO, 1 << LCD_CLOCK_PIN);
|
|
||||||
GPIO_SET_BITWISE(LCD_CLOCK_GPIO, 1 << LCD_CLOCK_PIN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lcd_send_frame(const fb_data *addr, int count)
|
|
||||||
{
|
|
||||||
GPIO_SET_BITWISE(LCD_CLOCK_GPIO, 1 << LCD_CLOCK_PIN);
|
|
||||||
GPIO_CLEAR_BITWISE(LCD_CS_GPIO, 1 << LCD_CS_PIN);
|
|
||||||
|
|
||||||
lcd_send_frame_byte(0x72);
|
|
||||||
while(count-- > 0)
|
|
||||||
{
|
|
||||||
lcd_send_frame_byte(*addr >> 8);
|
|
||||||
lcd_send_frame_byte(*addr++ & 0xff);
|
|
||||||
}
|
|
||||||
|
|
||||||
GPIO_SET_BITWISE(LCD_CS_GPIO, 1 << LCD_CS_PIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_update(void)
|
|
||||||
{
|
|
||||||
if(!display_on)
|
|
||||||
return;
|
|
||||||
lcd_write_reg(0x20, 0x0);
|
|
||||||
lcd_write_reg(0x21, 0x0);
|
|
||||||
lcd_send_cmd(0x22);
|
|
||||||
lcd_send_frame(FBADDR(0, 0), LCD_WIDTH * LCD_HEIGHT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update a fraction of the display. */
|
|
||||||
void lcd_update_rect(int x, int y, int width, int height)
|
|
||||||
{
|
|
||||||
(void)x;
|
|
||||||
(void)y;
|
|
||||||
(void)width;
|
|
||||||
(void)height;
|
|
||||||
lcd_update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*** hardware configuration ***/
|
|
||||||
|
|
||||||
void lcd_set_contrast(int val)
|
|
||||||
{
|
|
||||||
(void)val;
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_set_invert_display(bool yesno)
|
|
||||||
{
|
|
||||||
(void)yesno;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* turn the display upside down (call lcd_update() afterwards) */
|
|
||||||
void lcd_set_flip(bool yesno)
|
|
||||||
{
|
|
||||||
(void)yesno;
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void power_init(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void power_off(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
*
|
|
||||||
* 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 "adc.h"
|
|
||||||
#include "powermgmt.h"
|
|
||||||
|
|
||||||
int _battery_voltage(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME - next 4 functions taken from e200 - last 2 will need
|
|
||||||
to be updated */
|
|
||||||
unsigned short battery_level_disksafe = 3400;
|
|
||||||
|
|
||||||
unsigned short battery_level_shutoff = 3300;
|
|
||||||
|
|
||||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
|
||||||
unsigned short percent_to_volt_discharge[11] =
|
|
||||||
{
|
|
||||||
/* Sansa Li Ion 750mAH FIXME */
|
|
||||||
3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160
|
|
||||||
};
|
|
||||||
|
|
||||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
|
||||||
unsigned short percent_to_volt_charge[11] =
|
|
||||||
{
|
|
||||||
/* Sansa Li Ion 750mAH FIXME */
|
|
||||||
3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160
|
|
||||||
};
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 by Robert Keevil
|
|
||||||
*
|
|
||||||
* 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 "usb.h"
|
|
||||||
|
|
||||||
int usb_detect(void)
|
|
||||||
{
|
|
||||||
return.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void usb_enable(bool on)
|
|
||||||
{
|
|
||||||
(void)on;
|
|
||||||
}
|
|
||||||
|
|
||||||
void usb_init_device(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -322,10 +322,6 @@ $releasenotes="/wiki/ReleaseNotes400";
|
||||||
status => 1,
|
status => 1,
|
||||||
sim => 1,
|
sim => 1,
|
||||||
},
|
},
|
||||||
'sansaview' => {
|
|
||||||
name => 'SanDisk Sansa View',
|
|
||||||
status => 1,
|
|
||||||
},
|
|
||||||
'vibe500' => {
|
'vibe500' => {
|
||||||
name => 'Packard Bell Vibe 500',
|
name => 'Packard Bell Vibe 500',
|
||||||
status => 3,
|
status => 3,
|
||||||
|
|
|
||||||
103
tools/configure
vendored
103
tools/configure
vendored
|
|
@ -1691,48 +1691,47 @@ cat <<EOF
|
||||||
71) M:Robe 100 58) Sansa Fuze
|
71) M:Robe 100 58) Sansa Fuze
|
||||||
==Creative== 59) Sansa c200v2
|
==Creative== 59) Sansa c200v2
|
||||||
==Philips== 89) Zen X-Fi Style 60) Sansa Clipv2
|
==Philips== 89) Zen X-Fi Style 60) Sansa Clipv2
|
||||||
100) GoGear SA9200 90) Zen Vision:M 30GB 61) Sansa View
|
100) GoGear SA9200 90) Zen Vision:M 30GB 62) Sansa Clip+
|
||||||
101) GoGear HDD1630/ 91) Zen Vision:M 60GB 62) Sansa Clip+
|
101) GoGear HDD1630/ 91) Zen Vision:M 60GB 63) Sansa Fuze v2
|
||||||
HDD1830 92) Zen Vision 63) Sansa Fuze v2
|
HDD1830 92) Zen Vision 64) Sansa Fuze+
|
||||||
102) GoGear HDD6330 93) Zen X-Fi2 64) Sansa Fuze+
|
102) GoGear HDD6330 93) Zen X-Fi2 65) Sansa Clip Zip
|
||||||
94) Zen X-Fi3 65) Sansa Clip Zip
|
94) Zen X-Fi3 66) Sansa Connect
|
||||||
==Samsung== 95) Zen V 66) Sansa Connect
|
==Samsung== 95) Zen V
|
||||||
140) YH-820 96) Zen X-Fi
|
140) YH-820 96) Zen X-Fi ==Lyre project==
|
||||||
141) YH-920 97) Zen Mozaic ==Lyre project==
|
141) YH-920 97) Zen Mozaic 130) Lyre proto 1
|
||||||
142) YH-925 98) Zen 130) Lyre proto 1
|
142) YH-925 98) Zen 131) Mini2440
|
||||||
144) YP-R0 131) Mini2440
|
144) YP-R0
|
||||||
145) YP-R1 (WIP) ==Onda==
|
145) YP-R1 (WIP) ==Onda== ==Packard Bell==
|
||||||
120) VX747 ==Packard Bell==
|
120) VX747 160) Vibe 500
|
||||||
==HiFiMAN== 122) VX747+ 160) Vibe 500
|
==HiFiMAN== 122) VX747+
|
||||||
190) HM-60x 121) VX767
|
190) HM-60x 121) VX767 ==ROCKCHIP==
|
||||||
191) HM-801 123) VX777 ==ROCKCHIP==
|
191) HM-801 123) VX777 180) rk27xx generic
|
||||||
180) rk27xx generic
|
|
||||||
==Sony== ==MPIO==
|
|
||||||
219) NWZ-E350 series 170) HD200 ==HiFi E.T.==
|
|
||||||
220) NWZ-E370/E380 series 171) HD300 210) MA9
|
|
||||||
221) NWZ-E360 series 211) MA9C
|
|
||||||
222) NWZ-E450 series ==Application== 212) MA8
|
|
||||||
223) NWZ-E460 series 200) SDL (Generic) 213) MA8C
|
|
||||||
224) NWZ-E470 series 201) Android (ARM)
|
|
||||||
225) NWZ-E580 series 202) Android (MIPS) ==IHIFI==
|
|
||||||
226) NWZ-A10 series 203) Android (x86) 230) 760
|
|
||||||
227) NW-A20 series 209) Anbernic RG Nano 231) 770
|
|
||||||
228) NWZ-A860 series 232) 770C
|
|
||||||
229) NWZ-S750 series ==AgpTek== 233) 800
|
|
||||||
240) Rocker 234) 960
|
|
||||||
==FiiO==
|
|
||||||
244) M3K Linux ==iBasso== ==AIGO==
|
|
||||||
246) M3K baremetal 250) DX50 245) Eros Q / K (hosted)
|
|
||||||
251) DX90 247) Eros Q / K native
|
|
||||||
==Shanling== (hw1/hw2 bl, all hw rb)
|
|
||||||
260) Q1 ==xDuoo== 248) Eros Q / K native
|
|
||||||
241) X3 (hw3 bl only)
|
|
||||||
==Echo project== 242) X3II 249) Eros Q / K native
|
|
||||||
270) Echo R1 (WIP) 243) X20 (hw4 bl only)
|
|
||||||
|
|
||||||
==Nintendo== ==Surfans== ==HiBy==
|
==Sony== ==MPIO== ==HiFi E.T.==
|
||||||
290) Nintendo 3DS (WIP) 280) F28 (WIP) 300) R3 Pro II
|
219) NWZ-E350 series 170) HD200 210) MA9
|
||||||
301) R1
|
220) NWZ-E370/E380 series 171) HD300 211) MA9C
|
||||||
|
221) NWZ-E360 series 212) MA8
|
||||||
|
222) NWZ-E450 series ==Application== 213) MA8C
|
||||||
|
223) NWZ-E460 series 200) SDL (Generic)
|
||||||
|
224) NWZ-E470 series 201) Android (ARM) ==IHIFI==
|
||||||
|
225) NWZ-E580 series 202) Android (MIPS) 230) 760
|
||||||
|
226) NWZ-A10 series 203) Android (x86) 231) 770
|
||||||
|
227) NW-A20 series 209) Anbernic RG Nano 232) 770C
|
||||||
|
228) NWZ-A860 series 233) 800
|
||||||
|
229) NWZ-S750 series ==AgpTek== 234) 960
|
||||||
|
240) Rocker
|
||||||
|
==FiiO== ==AIGO==
|
||||||
|
244) M3K Linux ==iBasso== 245) Eros Q / K (hosted)
|
||||||
|
246) M3K baremetal 250) DX50 247) Eros Q / K native
|
||||||
|
251) DX90 (hw1/hw2 bl, all hw rb)
|
||||||
|
==Shanling== 248) Eros Q / K native
|
||||||
|
260) Q1 ==xDuoo== (hw3 bl only)
|
||||||
|
241) X3 249) Eros Q / K native
|
||||||
|
==Echo project== 242) X3II (hw4 bl only)
|
||||||
|
270) Echo R1 (WIP) 243) X20
|
||||||
|
==HiBy==
|
||||||
|
==Nintendo== ==Surfans== 300) R3 Pro II
|
||||||
|
290) Nintendo 3DS (WIP) 280) F28 (WIP) 301) R1
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
@ -2478,28 +2477,6 @@ fi
|
||||||
arm926ejscc
|
arm926ejscc
|
||||||
;;
|
;;
|
||||||
|
|
||||||
61|sansaview)
|
|
||||||
target_id=63
|
|
||||||
modelname="sansaview"
|
|
||||||
target="SANSA_VIEW"
|
|
||||||
memory=32
|
|
||||||
arm1176jzscc
|
|
||||||
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
||||||
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
|
||||||
output="rockbox.mi4"
|
|
||||||
appextra="gui"
|
|
||||||
plugins=""
|
|
||||||
boottool="$rootdir/tools/scramble -mi4v3 -model=view -type=RBBL"
|
|
||||||
bootoutput="firmware.mi4"
|
|
||||||
# toolset is the tools within the tools directory that we build for
|
|
||||||
# this particular target.
|
|
||||||
toolset=$scramblebitmaptools
|
|
||||||
t_cpu="arm"
|
|
||||||
t_soc="pp"
|
|
||||||
t_manufacturer="sandisk"
|
|
||||||
t_model="sansa-view"
|
|
||||||
;;
|
|
||||||
|
|
||||||
62|sansaclipplus)
|
62|sansaclipplus)
|
||||||
target_id=66
|
target_id=66
|
||||||
modelname="sansaclipplus"
|
modelname="sansaclipplus"
|
||||||
|
|
|
||||||
|
|
@ -688,15 +688,6 @@ sansam200v4
|
||||||
record : yes
|
record : yes
|
||||||
}
|
}
|
||||||
|
|
||||||
sansaview
|
|
||||||
{
|
|
||||||
name : SanDisk Sansa View
|
|
||||||
screen : 240 x 320 @ rgb
|
|
||||||
remote : no
|
|
||||||
fm : no
|
|
||||||
record : no
|
|
||||||
}
|
|
||||||
|
|
||||||
sonynwa20
|
sonynwa20
|
||||||
{
|
{
|
||||||
name : Sony NW-A20
|
name : Sony NW-A20
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue