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:
Bertrik Sikken 2010-05-30 21:43:14 +00:00
parent 211bc74b88
commit a5248a2995
4 changed files with 23 additions and 11 deletions

View file

@ -74,10 +74,9 @@ void main(void)
{
char mystring[64];
int line, col;
unsigned char read_data[16];
struct tm dt;
int i;
struct si4700_dbg_info si4700_info;
// unsigned int data;
int brightness = DEFAULT_BRIGHTNESS_SETTING;
unsigned int button;
unsigned int fm_frequency = 100700000;
@ -124,6 +123,7 @@ void main(void)
tuner_power(true);
si4700_set(RADIO_SLEEP, 0);
si4700_set(RADIO_MUTE, 0);
si4700_set(RADIO_REGION, 0);
si4700_set(RADIO_FREQUENCY, fm_frequency);
lcd_puts_scroll(0,0,"+++ this is a very very long line to test scrolling. ---");
@ -152,16 +152,16 @@ void main(void)
line = 1;
#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);
#endif
#if 1 /* enable this to see info about the RTC */
rtc_read_datetime(read_data);
snprintf(mystring, 64, "RTC:");
for (i = 0; i < 7; i++) {
snprintf(mystring + 2 * i + 4, 64, "%02X", read_data[i]);
}
rtc_read_datetime(&dt);
snprintf(mystring, 64, "RTC: %04d-%02d-%02d %02d:%02d:%02d",
dt.tm_year + 1900, dt.tm_mon+1, dt.tm_mday,
dt.tm_hour, dt.tm_min, dt.tm_sec);
lcd_puts(0, line++, mystring);
#endif
@ -211,7 +211,8 @@ void main(void)
#endif
#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);
snprintf(mystring, 64, "ADC:USB %4d mV BAT %4d mV",
(adc_read(0) * 6000) >> 10, (adc_read(2) * 4650) >> 10);
@ -268,7 +269,7 @@ void main(void)
_backlight_set_brightness(brightness);
}
}
snprintf(mystring, 64, "bright %3d", brightness);
snprintf(mystring, 64, "brightness %3d", brightness);
lcd_puts(0, line++, mystring);
#endif
@ -292,6 +293,13 @@ void main(void)
lcd_puts(0, line++, mystring);
#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();
}
}

View file

@ -1611,6 +1611,8 @@ target/arm/samsung/yh925/powermgmt-yh925.c
#ifdef SAMSUNG_YPS3
/* 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/i2c-s5l8700.c
target/arm/s5l8700/kernel-s5l8700.c

View file

@ -39,7 +39,7 @@
#define USE_MMU
#define CACHE_SIZE 16
#elif CONFIG_CPU == S5L8701
#elif CONFIG_CPU == S5L8700 || CONFIG_CPU == S5L8701
/* MMU not present */
#define CACHE_SIZE 4

View file

@ -154,7 +154,9 @@ void fiq_dummy(void)
void system_init(void)
{
#ifdef IPOD_NANO2G
pmu_init();
#endif
}
void system_reboot(void)