code formatting

This commit is contained in:
Oliver Lehmann 2012-06-05 19:46:26 +00:00
parent b036627b27
commit 47fcd4b9cd
3 changed files with 82 additions and 77 deletions

View File

@ -1,7 +1,7 @@
/* /*
* P8000 WDC Emulator * P8000 WDC Emulator
* *
* $Id: wdc_drv_mmc.c,v 1.5 2012/06/05 18:24:16 olivleh1 Exp $ * $Id: wdc_drv_mmc.c,v 1.6 2012/06/05 19:46:26 olivleh1 Exp $
* *
*/ */

View File

@ -1,7 +1,7 @@
/* /*
* P8000 WDC Emulator * P8000 WDC Emulator
* *
* $Id: wdc_drv_mmc.h,v 1.3 2012/06/05 18:21:48 olivleh1 Exp $ * $Id: wdc_drv_mmc.h,v 1.4 2012/06/05 19:46:26 olivleh1 Exp $
* *
*/ */
@ -14,7 +14,6 @@ extern uint8_t mmc_read_sector ( uint32_t addr, uint8_t *Buffer );
extern uint8_t mmc_write_sector ( uint32_t addr, uint8_t *Buffer ); extern uint8_t mmc_write_sector ( uint32_t addr, uint8_t *Buffer );
extern uint8_t mmc_read_multiblock ( uint32_t addr, uint8_t *Buffer, uint8_t numblocks ); extern uint8_t mmc_read_multiblock ( uint32_t addr, uint8_t *Buffer, uint8_t numblocks );
extern uint8_t mmc_write_multiblock_predef ( uint32_t addr, uint8_t *Buffer, uint8_t numblocks );
extern uint8_t mmc_write_multiblock ( uint32_t addr, uint8_t *Buffer, uint8_t numblocks ); extern uint8_t mmc_write_multiblock ( uint32_t addr, uint8_t *Buffer, uint8_t numblocks );

View File

@ -1,7 +1,7 @@
/* /*
* P8000 WDC Emulator * P8000 WDC Emulator
* *
* $Id: wdc_main.c,v 1.10 2012/06/05 18:21:48 olivleh1 Exp $ * $Id: wdc_main.c,v 1.11 2012/06/05 19:46:26 olivleh1 Exp $
* *
* TODO: - Different Errorcodes in the MMC layer (use defines) * TODO: - Different Errorcodes in the MMC layer (use defines)
* - errorchecking in several places * - errorchecking in several places
@ -366,10 +366,13 @@ void measure_performance()
TCCR0B = ( 1 << CS01 ); // Prescaler 8 TCCR0B = ( 1 << CS01 ); // Prescaler 8
TCNT0 = 0x00; TCNT0 = 0x00;
uart_puts_p ( PSTR ( "Performance Measurement. Displayed are the Timer-Overflows." ) );uart_putc ( '\n' ); uart_puts_p ( PSTR ( "Performance Measurement. Displayed are the Timer-Overflows." ) );
uart_puts_p ( PSTR ( "Timer is initialized with a Prescaler 8" ) );uart_putc ( '\n' ); uart_putc ( '\n' );
uart_puts_p ( PSTR ( "Timer is initialized with a Prescaler 8" ) );
uart_putc ( '\n' );
uart_puts_p ( PSTR ( "Test Read 5000 512B-Blocks with Multiblock-Read (4KB Blocksize):" ) );uart_putc ( '\n' ); uart_puts_p ( PSTR ( "Test Read 5000 512B-Blocks with Multiblock-Read (4KB Blocksize):" ) );
uart_putc ( '\n' );
for ( i8 = 0; i8 < nr_of_tests; i8++ ) { for ( i8 = 0; i8 < nr_of_tests; i8++ ) {
blockno = BLOCKNO; blockno = BLOCKNO;
@ -385,7 +388,8 @@ void measure_performance()
uart_putc ( '\n' ); uart_putc ( '\n' );
} }
uart_puts_p ( PSTR ( "Test Write 5000 512B-Blocks with Multiblock-Write (4KB Blocksize):" ) );uart_putc ( '\n' ); uart_puts_p ( PSTR ( "Test Write 5000 512B-Blocks with Multiblock-Write (4KB Blocksize):" ) );
uart_putc ( '\n' );
memset ( &data_buffer[0], 0xCC, 512 * numblocks ); memset ( &data_buffer[0], 0xCC, 512 * numblocks );
for ( i8 = 0; i8 < nr_of_tests; i8++ ) { for ( i8 = 0; i8 < nr_of_tests; i8++ ) {
blockno = BLOCKNO; blockno = BLOCKNO;
@ -401,7 +405,8 @@ void measure_performance()
uart_putc ( '\n' ); uart_putc ( '\n' );
} }
uart_puts_p ( PSTR ( "Test Read 5000 512B-Blocks with Singleblock-Read (512B Blocksize):" ) );uart_putc ( '\n' ); uart_puts_p ( PSTR ( "Test Read 5000 512B-Blocks with Singleblock-Read (512B Blocksize):" ) );
uart_putc ( '\n' );
for ( i8 = 0; i8 < nr_of_tests; i8++ ) { for ( i8 = 0; i8 < nr_of_tests; i8++ ) {
blockno = BLOCKNO; blockno = BLOCKNO;
@ -417,7 +422,8 @@ void measure_performance()
uart_putc ( '\n' ); uart_putc ( '\n' );
} }
uart_puts_p ( PSTR ( "Test Write 5000 512B-Blocks with Singleblock-Write (512B Blocksize):" ) );uart_putc ( '\n' ); uart_puts_p ( PSTR ( "Test Write 5000 512B-Blocks with Singleblock-Write (512B Blocksize):" ) );
uart_putc ( '\n' );
memset ( &data_buffer[0], 0xCC, 512 * numblocks ); memset ( &data_buffer[0], 0xCC, 512 * numblocks );
for ( i8 = 0; i8 < nr_of_tests; i8++ ) { for ( i8 = 0; i8 < nr_of_tests; i8++ ) {
blockno = BLOCKNO; blockno = BLOCKNO;