1
0
Fork 0
forked from len0rd/rockbox

Fix even more tabs

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24155 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2010-01-03 10:35:31 +00:00
parent 64fb3e8df3
commit bfc129a592
5 changed files with 61 additions and 61 deletions

View file

@ -26,8 +26,8 @@
#define SMLAL(lo, hi, x, y) \ #define SMLAL(lo, hi, x, y) \
asm volatile ("smlal %0, %1, %2, %3" \ asm volatile ("smlal %0, %1, %2, %3" \
: "+r" (lo), "+r" (hi) \ : "+r" (lo), "+r" (hi) \
: "%r" (x), "r" (y)) : "%r" (x), "r" (y))
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
{ {

View file

@ -37,7 +37,7 @@ static size_t size;
void pcm_postinit(void) void pcm_postinit(void)
{ {
audiohw_postinit(); audiohw_postinit();
} }
/* Return the current location in the SDRAM to SARAM transfer along with the /* Return the current location in the SDRAM to SARAM transfer along with the
@ -48,7 +48,7 @@ void pcm_postinit(void)
*/ */
const void * pcm_play_dma_get_peak_buffer(int *count) const void * pcm_play_dma_get_peak_buffer(int *count)
{ {
int cnt = DSP_(_sdem_level); int cnt = DSP_(_sdem_level);
unsigned long addr = (unsigned long) start +cnt; unsigned long addr = (unsigned long) start +cnt;
@ -73,7 +73,7 @@ void pcm_play_dma_init(void)
void pcm_dma_apply_settings(void) void pcm_dma_apply_settings(void)
{ {
audiohw_set_frequency(pcm_fsel); audiohw_set_frequency(pcm_fsel);
} }
/* Note that size is actually limited to the size of a short right now due to /* Note that size is actually limited to the size of a short right now due to
@ -81,7 +81,7 @@ void pcm_dma_apply_settings(void)
*/ */
void pcm_play_dma_start(const void *addr, size_t size) void pcm_play_dma_start(const void *addr, size_t size)
{ {
unsigned long sdem_addr=(unsigned long)addr - CONFIG_SDRAM_START; unsigned long sdem_addr=(unsigned long)addr - CONFIG_SDRAM_START;
/* Initialize codec. */ /* Initialize codec. */
DSP_(_sdem_addrl) = sdem_addr & 0xffff; DSP_(_sdem_addrl) = sdem_addr & 0xffff;
DSP_(_sdem_addrh) = sdem_addr >> 16; DSP_(_sdem_addrh) = sdem_addr >> 16;
@ -116,7 +116,7 @@ void pcm_play_dma_pause(bool pause)
} }
else else
{ {
DSP_(_dma0_stopped)=0; DSP_(_dma0_stopped)=0;
dsp_wake(); dsp_wake();
} }
} }
@ -132,7 +132,7 @@ char buffer[80];
void DSPHINT(void) __attribute__ ((section(".icode"))); void DSPHINT(void) __attribute__ ((section(".icode")));
void DSPHINT(void) void DSPHINT(void)
{ {
register pcm_more_callback_type get_more; /* No stack for this */ register pcm_more_callback_type get_more; /* No stack for this */
unsigned int i; unsigned int i;
@ -151,35 +151,35 @@ void DSPHINT(void)
break; break;
case MSG_REFILL: case MSG_REFILL:
/* Buffer empty. Try to get more. */ /* Buffer empty. Try to get more. */
get_more = pcm_callback_for_more; get_more = pcm_callback_for_more;
size = 0; size = 0;
if (get_more == NULL || (get_more(&start, &size), size == 0)) if (get_more == NULL || (get_more(&start, &size), size == 0))
{ {
/* Callback missing or no more DMA to do */ /* Callback missing or no more DMA to do */
pcm_play_dma_stop(); pcm_play_dma_stop();
pcm_play_dma_stopped_callback(); pcm_play_dma_stopped_callback();
} }
{ {
unsigned long sdem_addr=(unsigned long)start - CONFIG_SDRAM_START; unsigned long sdem_addr=(unsigned long)start - CONFIG_SDRAM_START;
/* Flush any pending cache writes */ /* Flush any pending cache writes */
clean_dcache_range(start, size); clean_dcache_range(start, size);
/* set the new DMA values */ /* set the new DMA values */
DSP_(_sdem_addrl) = sdem_addr & 0xffff; DSP_(_sdem_addrl) = sdem_addr & 0xffff;
DSP_(_sdem_addrh) = sdem_addr >> 16; DSP_(_sdem_addrh) = sdem_addr >> 16;
DSP_(_sdem_dsp_size) = size; DSP_(_sdem_dsp_size) = size;
DEBUGF("pcm_sdram at 0x%08lx, sdem_addr 0x%08lx", DEBUGF("pcm_sdram at 0x%08lx, sdem_addr 0x%08lx",
(unsigned long)start, (unsigned long)sdem_addr); (unsigned long)start, (unsigned long)sdem_addr);
} }
break; break;
default: default:
DEBUGF("DSP: unknown msg 0x%04x", dsp_message.msg); DEBUGF("DSP: unknown msg 0x%04x", dsp_message.msg);
break; break;
} }
/* Re-Activate the channel */ /* Re-Activate the channel */

View file

@ -10,22 +10,22 @@ int main(int argc, char *argv[])
if(f) if(f)
{ {
if(fread(buf, 1, 128000, f) < 128000) if(fread(buf, 1, 128000, f) < 128000)
{ {
fprintf(stderr, "FAN!\n"); fprintf(stderr, "FAN!\n");
exit(1); exit(1);
} }
printf("int mp3datalen = 128000;\n"); printf("int mp3datalen = 128000;\n");
printf("unsigned char mp3data[128000] =\n{"); printf("unsigned char mp3data[128000] =\n{");
for(i = 0;i < 128000;i++) for(i = 0;i < 128000;i++)
{ {
if(i % 8 == 0) if(i % 8 == 0)
{ {
printf("\n"); printf("\n");
} }
printf("0x%02x, ", buf[i]); printf("0x%02x, ", buf[i]);
} }
printf("};\n"); printf("};\n");
} }
} }

View file

@ -41,46 +41,46 @@ struct usb_class_driver {
/* Tells the driver what its first interface number will be. The driver /* Tells the driver what its first interface number will be. The driver
returns the number of the first available interface for the next driver returns the number of the first available interface for the next driver
(i.e. a driver with one interface will return interface+1) (i.e. a driver with one interface will return interface+1)
A driver must have at least one interface A driver must have at least one interface
Mandatory function */ Mandatory function */
int (*set_first_interface)(int interface); int (*set_first_interface)(int interface);
/* Asks the driver to put the interface descriptor and all other /* Asks the driver to put the interface descriptor and all other
needed descriptor for this driver at dest. needed descriptor for this driver at dest.
Returns the number of bytes taken by these descriptors. Returns the number of bytes taken by these descriptors.
Mandatory function */ Mandatory function */
int (*get_config_descriptor)(unsigned char *dest, int max_packet_size); int (*get_config_descriptor)(unsigned char *dest, int max_packet_size);
/* Tells the driver that a usb connection has been set up and is now /* Tells the driver that a usb connection has been set up and is now
ready to use. ready to use.
Optional function */ Optional function */
void (*init_connection)(void); void (*init_connection)(void);
/* Initialises the driver. This can be called multiple times, /* Initialises the driver. This can be called multiple times,
and should not perform any action that can disturb other threads and should not perform any action that can disturb other threads
(like getting the audio buffer) (like getting the audio buffer)
Optional function */ Optional function */
void (*init)(void); void (*init)(void);
/* Tells the driver that the usb connection is no longer active /* Tells the driver that the usb connection is no longer active
Optional function */ Optional function */
void (*disconnect)(void); void (*disconnect)(void);
/* Tells the driver that a usb transfer has been completed. Note that "dir" /* Tells the driver that a usb transfer has been completed. Note that "dir"
is relative to the host is relative to the host
Optional function */ Optional function */
void (*transfer_complete)(int ep,int dir, int status, int length); void (*transfer_complete)(int ep,int dir, int status, int length);
/* Tells the driver that a control request has come in. If the driver is /* Tells the driver that a control request has come in. If the driver is
able to handle it, it should ack the request, and return true. Otherwise able to handle it, it should ack the request, and return true. Otherwise
it should return false. it should return false.
Optional function */ Optional function */
bool (*control_request)(struct usb_ctrlrequest* req, unsigned char *dest); bool (*control_request)(struct usb_ctrlrequest* req, unsigned char *dest);
#ifdef HAVE_HOTSWAP #ifdef HAVE_HOTSWAP
/* Tells the driver that a hotswappable disk/card was inserted or /* Tells the driver that a hotswappable disk/card was inserted or
extracted extracted
Optional function */ Optional function */
void (*notify_hotswap)(int volume, bool inserted); void (*notify_hotswap)(int volume, bool inserted);
#endif #endif
}; };

View file

@ -71,7 +71,7 @@
#define USB_BULK_RESET_REQUEST 0xff #define USB_BULK_RESET_REQUEST 0xff
#define USB_BULK_GET_MAX_LUN 0xfe #define USB_BULK_GET_MAX_LUN 0xfe
#define DIRECT_ACCESS_DEVICE 0x00 /* disks */ #define DIRECT_ACCESS_DEVICE 0x00 /* disks */
#define DEVICE_REMOVABLE 0x80 #define DEVICE_REMOVABLE 0x80
#define CBW_SIGNATURE 0x43425355 #define CBW_SIGNATURE 0x43425355