forked from len0rd/rockbox
A few minor cleanups for the Gigabeat S
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14812 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
729388f741
commit
26a05afe10
7 changed files with 82 additions and 9 deletions
|
@ -1,4 +1,3 @@
|
|||
#ifndef GIGABEAT_S
|
||||
/* plugins common to all models */
|
||||
battery_bench.c
|
||||
chessclock.c
|
||||
|
@ -145,4 +144,3 @@ iriver_flash.c
|
|||
/* Built for bitmap targets except H10 5/6gb, Archoses, iPod mini and ifp */
|
||||
superdom.c
|
||||
#endif
|
||||
#endif /* GIGABEAT_S */
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef IRIVER_IFP7XX_SERIES
|
||||
#ifndef GIGABEAT_S
|
||||
|
||||
/* For all targets */
|
||||
shortcuts
|
||||
|
@ -46,5 +45,4 @@ doom
|
|||
mpegplayer
|
||||
#endif
|
||||
|
||||
#endif /* GIGABEAT_S */
|
||||
#endif /* IRIVER_IFP7XX_SERIES */
|
||||
|
|
|
@ -208,7 +208,7 @@ drivers/mas.c
|
|||
drivers/audio/uda1380.c
|
||||
#elif defined(HAVE_WM8751)
|
||||
drivers/audio/wm8751.c
|
||||
#elif defined(HAVE_WM8975)
|
||||
#elif defined(HAVE_WM8975) || defined(HAVE_WM8978)
|
||||
drivers/audio/wm8975.c
|
||||
#elif defined(HAVE_WM8758)
|
||||
drivers/audio/wm8758.c
|
||||
|
@ -608,7 +608,7 @@ target/arm/imx31/gigabeat-s/mmu-imx31.c
|
|||
target/arm/imx31/gigabeat-s/avic-imx31.c
|
||||
target/arm/imx31/gigabeat-s/spi-imx31.c
|
||||
#ifndef BOOTLOADER
|
||||
target/arm/imx31/gigabeat-fx/pcm-imx31.c
|
||||
target/arm/imx31/gigabeat-s/pcm-imx31.c
|
||||
#endif
|
||||
#endif /* SIMULATOR */
|
||||
#endif /* GIGABEAT_S */
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
#include "lcd.h"
|
||||
#include "serial.h"
|
||||
|
||||
#if CONFIG_CPU == IMX31L
|
||||
#include "serial-imx31.h"
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU == SH7034
|
||||
|
||||
|
@ -166,6 +169,75 @@ void serial_setup (void)
|
|||
UCR0 = 0x04; /* Tx enable */
|
||||
}
|
||||
|
||||
#elif (CONFIG_CPU == IMX31L)
|
||||
|
||||
void serial_setup(void)
|
||||
{
|
||||
#ifdef UART_INT /*enable UART Interrupts */
|
||||
UCR1_1 |= (EUartUCR1_TRDYEN | EUartUCR1_RRDYEN | EUartUCR1_TXMPTYEN);
|
||||
UCR4_1 |= (EUartUCR4_TCEN);
|
||||
#else /*disable UART Interrupts*/
|
||||
UCR1_1 &= ~(EUartUCR1_TRDYEN | EUartUCR1_RRDYEN | EUartUCR1_TXMPTYEN);
|
||||
UCR4_1 &= ~(EUartUCR4_TCEN);
|
||||
#endif
|
||||
UCR1_1 |= EUartUCR1_UARTEN;
|
||||
UCR2_1 |= (EUartUCR2_TXEN | EUartUCR2_RXEN | EUartUCR2_IRTS);
|
||||
|
||||
/* Tx,Rx Interrupt Trigger levels, Disable for now*/
|
||||
/*UFCR1 |= (UFCR1_TXTL_32 | UFCR1_RXTL_32);*/
|
||||
}
|
||||
|
||||
int Tx_Rdy(void)
|
||||
{
|
||||
if((UTS1 & EUartUTS_TXEMPTY))
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
/*Not ready...After first Rx, UTS1 & UTS1_RXEMPTY
|
||||
keeps returning true*/
|
||||
int Rx_Rdy(void)
|
||||
{
|
||||
if(!(UTS1 & EUartUTS_RXEMPTY))
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
void Tx_Writec(char c)
|
||||
{
|
||||
UTXD1=(int) c;
|
||||
}
|
||||
|
||||
void dprintf(const char * str, ... )
|
||||
{
|
||||
char dprintfbuff[256];
|
||||
unsigned char * ptr;
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
|
||||
ptr = dprintfbuff;
|
||||
vsnprintf(ptr,sizeof(dprintfbuff),str,ap);
|
||||
va_end(ap);
|
||||
|
||||
serial_tx(ptr);
|
||||
}
|
||||
|
||||
void serial_tx(const unsigned char * buf)
|
||||
{
|
||||
/*Tx*/
|
||||
for(;;) {
|
||||
if(Tx_Rdy()) {
|
||||
if(*buf == '\0')
|
||||
return;
|
||||
if(*buf == '\n')
|
||||
Tx_Writec('\r');
|
||||
Tx_Writec(*buf);
|
||||
buf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else /* Other targets */
|
||||
void serial_setup (void)
|
||||
{
|
||||
|
|
|
@ -70,7 +70,8 @@ void pcm_mute(bool mute)
|
|||
}
|
||||
#endif /* defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) */
|
||||
|
||||
#if defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) || defined(CPU_PP)
|
||||
#if defined(CPU_COLDFIRE) || (CONFIG_CPU == S3C2440) || defined(CPU_PP) \
|
||||
|| (CONFIG_CPU == IMX31L)
|
||||
/* Implemented in target/... */
|
||||
#else
|
||||
static int pcm_freq = HW_SAMPR_DEFAULT; /* 44.1 is default */
|
||||
|
|
|
@ -208,6 +208,8 @@ static bool timer_set(long cycles, bool start)
|
|||
cycles_new = cycles;
|
||||
|
||||
return true;
|
||||
#elif (CONFIG_CPU == IMX31L)
|
||||
/* TODO */
|
||||
#else
|
||||
return __TIMER_SET(cycles, start);
|
||||
#endif /* CONFIG_CPU */
|
||||
|
@ -268,6 +270,8 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void),
|
|||
irq_set_int_handler(IRQ_TIMER1, TIMER1_ISR);
|
||||
irq_enable_int(IRQ_TIMER1);
|
||||
return true;
|
||||
#elif CONFIG_CPU == IMX31L
|
||||
/* TODO */
|
||||
#else
|
||||
return __TIMER_REGISTER(reg_prio, unregister_callback, cycles,
|
||||
int_prio, timer_callback);
|
||||
|
|
4
tools/configure
vendored
4
tools/configure
vendored
|
@ -1270,8 +1270,8 @@ EOF
|
|||
appextra="recorder:gui"
|
||||
archosrom=""
|
||||
flash=""
|
||||
plugins="yes"
|
||||
codecs="libmad liba52 libffmpegFLAC libwma libTremor libwavpack libmusepack libalac libfaad libm4a libspeex libdemac"
|
||||
plugins=""
|
||||
swcodec="yes"
|
||||
toolset=$gigabeatbitmaptools
|
||||
boottool="$rootdir/tools/scramble -gigabeats"
|
||||
bootoutput="nk.bin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue