Update Samsung YP-S3 bootloader demo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26417 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
211bc74b88
commit
a5248a2995
4 changed files with 23 additions and 11 deletions
|
@ -74,10 +74,9 @@ void main(void)
|
||||||
{
|
{
|
||||||
char mystring[64];
|
char mystring[64];
|
||||||
int line, col;
|
int line, col;
|
||||||
unsigned char read_data[16];
|
struct tm dt;
|
||||||
int i;
|
int i;
|
||||||
struct si4700_dbg_info si4700_info;
|
struct si4700_dbg_info si4700_info;
|
||||||
// unsigned int data;
|
|
||||||
int brightness = DEFAULT_BRIGHTNESS_SETTING;
|
int brightness = DEFAULT_BRIGHTNESS_SETTING;
|
||||||
unsigned int button;
|
unsigned int button;
|
||||||
unsigned int fm_frequency = 100700000;
|
unsigned int fm_frequency = 100700000;
|
||||||
|
@ -124,6 +123,7 @@ void main(void)
|
||||||
tuner_power(true);
|
tuner_power(true);
|
||||||
si4700_set(RADIO_SLEEP, 0);
|
si4700_set(RADIO_SLEEP, 0);
|
||||||
si4700_set(RADIO_MUTE, 0);
|
si4700_set(RADIO_MUTE, 0);
|
||||||
|
si4700_set(RADIO_REGION, 0);
|
||||||
si4700_set(RADIO_FREQUENCY, fm_frequency);
|
si4700_set(RADIO_FREQUENCY, fm_frequency);
|
||||||
|
|
||||||
lcd_puts_scroll(0,0,"+++ this is a very very long line to test scrolling. ---");
|
lcd_puts_scroll(0,0,"+++ this is a very very long line to test scrolling. ---");
|
||||||
|
@ -152,16 +152,16 @@ void main(void)
|
||||||
line = 1;
|
line = 1;
|
||||||
|
|
||||||
#if 1 /* enable to see GPIOs */
|
#if 1 /* enable to see GPIOs */
|
||||||
snprintf(mystring, 64, "%02X %02X %02X %02X %02X %02X %02X %02X", PDAT0, PDAT1, PDAT2, PDAT3, PDAT4, PDAT5, PDAT6, PDAT7);
|
snprintf(mystring, 64, "%02X %02X %02X %02X %02X %02X %02X %02X",
|
||||||
|
PDAT0, PDAT1, PDAT2, PDAT3, PDAT4, PDAT5, PDAT6, PDAT7);
|
||||||
lcd_puts(0, line++, mystring);
|
lcd_puts(0, line++, mystring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1 /* enable this to see info about the RTC */
|
#if 1 /* enable this to see info about the RTC */
|
||||||
rtc_read_datetime(read_data);
|
rtc_read_datetime(&dt);
|
||||||
snprintf(mystring, 64, "RTC:");
|
snprintf(mystring, 64, "RTC: %04d-%02d-%02d %02d:%02d:%02d",
|
||||||
for (i = 0; i < 7; i++) {
|
dt.tm_year + 1900, dt.tm_mon+1, dt.tm_mday,
|
||||||
snprintf(mystring + 2 * i + 4, 64, "%02X", read_data[i]);
|
dt.tm_hour, dt.tm_min, dt.tm_sec);
|
||||||
}
|
|
||||||
lcd_puts(0, line++, mystring);
|
lcd_puts(0, line++, mystring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -211,7 +211,8 @@ void main(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1 /* enable this to see ADC info */
|
#if 1 /* enable this to see ADC info */
|
||||||
snprintf(mystring, 64, "%04X %04X %04X %04X", adc_read(0), adc_read(1), adc_read(2), adc_read(3));
|
snprintf(mystring, 64, "ADC: %04X %04X %04X %04X",
|
||||||
|
adc_read(0), adc_read(1), adc_read(2), adc_read(3));
|
||||||
lcd_puts(0, line++, mystring);
|
lcd_puts(0, line++, mystring);
|
||||||
snprintf(mystring, 64, "ADC:USB %4d mV BAT %4d mV",
|
snprintf(mystring, 64, "ADC:USB %4d mV BAT %4d mV",
|
||||||
(adc_read(0) * 6000) >> 10, (adc_read(2) * 4650) >> 10);
|
(adc_read(0) * 6000) >> 10, (adc_read(2) * 4650) >> 10);
|
||||||
|
@ -268,7 +269,7 @@ void main(void)
|
||||||
_backlight_set_brightness(brightness);
|
_backlight_set_brightness(brightness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
snprintf(mystring, 64, "bright %3d", brightness);
|
snprintf(mystring, 64, "brightness %3d", brightness);
|
||||||
lcd_puts(0, line++, mystring);
|
lcd_puts(0, line++, mystring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -292,6 +293,13 @@ void main(void)
|
||||||
lcd_puts(0, line++, mystring);
|
lcd_puts(0, line++, mystring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
snprintf(mystring, 64, "TIMER A:%08X B:%08X", TACNT, TBCNT);
|
||||||
|
lcd_puts(0, line++, mystring);
|
||||||
|
snprintf(mystring, 64, "TIMER C:%08X D:%08X", TCCNT, TDCNT);
|
||||||
|
lcd_puts(0, line++, mystring);
|
||||||
|
#endif
|
||||||
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1611,6 +1611,8 @@ target/arm/samsung/yh925/powermgmt-yh925.c
|
||||||
|
|
||||||
#ifdef SAMSUNG_YPS3
|
#ifdef SAMSUNG_YPS3
|
||||||
/* TODO: currently including all files for the bootloader DFU test program */
|
/* TODO: currently including all files for the bootloader DFU test program */
|
||||||
|
tuner.c
|
||||||
|
drivers/tuner/si4700.c
|
||||||
target/arm/s5l8700/adc-s5l8700.c
|
target/arm/s5l8700/adc-s5l8700.c
|
||||||
target/arm/s5l8700/i2c-s5l8700.c
|
target/arm/s5l8700/i2c-s5l8700.c
|
||||||
target/arm/s5l8700/kernel-s5l8700.c
|
target/arm/s5l8700/kernel-s5l8700.c
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#define USE_MMU
|
#define USE_MMU
|
||||||
#define CACHE_SIZE 16
|
#define CACHE_SIZE 16
|
||||||
|
|
||||||
#elif CONFIG_CPU == S5L8701
|
#elif CONFIG_CPU == S5L8700 || CONFIG_CPU == S5L8701
|
||||||
/* MMU not present */
|
/* MMU not present */
|
||||||
#define CACHE_SIZE 4
|
#define CACHE_SIZE 4
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,9 @@ void fiq_dummy(void)
|
||||||
|
|
||||||
void system_init(void)
|
void system_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef IPOD_NANO2G
|
||||||
pmu_init();
|
pmu_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void system_reboot(void)
|
void system_reboot(void)
|
||||||
|
|
Loading…
Reference in a new issue