From 3495c57d11b6e39e2c8f8c9deb53a0b7b3a7b596 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 30 Nov 2009 03:49:08 +0000 Subject: Whitespace removal. --- c/src/ada-tests/samples/base_mp/config.h | 6 +- c/src/ada-tests/support/init.c | 2 +- c/src/lib/libbsp/bfin/bf537Stamp/console/console.c | 4 +- c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h | 6 +- c/src/lib/libbsp/bfin/bf537Stamp/start/start.S | 12 +- .../lib/libbsp/bfin/bf537Stamp/startup/bspstart.c | 22 +- .../lib/libbsp/bfin/eZKit533/console/console-io.c | 4 +- c/src/lib/libbsp/bfin/eZKit533/include/bsp.h | 8 +- c/src/lib/libbsp/bfin/eZKit533/include/cplb.h | 4 +- c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c | 34 +-- c/src/lib/libbsp/bfin/shared/start/start.S | 28 +-- c/src/lib/libbsp/i386/shared/irq/irq_asm.S | 4 +- c/src/lib/libbsp/i386/shared/pci/pcibios.c | 12 +- c/src/lib/libbsp/powerpc/mbx8xx/console/console.c | 2 +- c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c | 8 +- c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S | 16 +- c/src/libchip/display/disp_fonts.h | 4 +- c/src/libchip/display/disp_hcms29xx.c | 116 +++++----- c/src/libchip/display/disp_hcms29xx.h | 14 +- c/src/libchip/display/font_hcms29xx.c | 256 ++++++++++----------- c/src/libchip/flash/am29lv160.c | 42 ++-- c/src/libchip/i2c/i2c-2b-eeprom.c | 18 +- c/src/libchip/i2c/i2c-2b-eeprom.h | 18 +- c/src/libchip/i2c/i2c-ds1621.c | 18 +- c/src/libchip/i2c/i2c-ds1621.h | 18 +- c/src/libchip/i2c/spi-flash-m25p40.c | 4 +- c/src/libchip/i2c/spi-flash-m25p40.h | 6 +- c/src/libchip/i2c/spi-fram-fm25l256.c | 4 +- c/src/libchip/i2c/spi-fram-fm25l256.h | 6 +- c/src/libchip/i2c/spi-memdrv.c | 12 +- c/src/libchip/i2c/spi-memdrv.h | 4 +- c/src/libchip/i2c/spi-sd-card.c | 18 +- c/src/libchip/i2c/spi-sd-card.h | 2 +- c/src/libchip/ide/ata.c | 52 ++--- c/src/libchip/ide/ide_controller.c | 2 +- c/src/libchip/ide/ide_ctrl_cfg.h | 2 +- c/src/libchip/network/elnk.c | 8 +- c/src/libchip/network/greth.c | 94 ++++---- c/src/libchip/network/greth.h | 14 +- c/src/libchip/network/if_dc.c | 112 ++++----- c/src/libchip/network/if_dcreg.h | 8 +- c/src/libchip/network/open_eth.c | 2 +- c/src/libchip/network/smc91111.c | 14 +- c/src/libchip/network/smc91111.h | 80 +++---- c/src/libchip/rtc/ds1375-rtc.h | 18 +- c/src/libchip/rtc/ds1375.c | 34 +-- c/src/libchip/rtc/mc146818a.c | 8 +- c/src/libchip/rtc/mc146818a.h | 2 +- c/src/libchip/serial/ns16550.c | 2 +- c/src/libchip/shmdr/poll.c | 2 +- 50 files changed, 593 insertions(+), 593 deletions(-) (limited to 'c/src') diff --git a/c/src/ada-tests/samples/base_mp/config.h b/c/src/ada-tests/samples/base_mp/config.h index 602adf376e..ac5d4dfe42 100644 --- a/c/src/ada-tests/samples/base_mp/config.h +++ b/c/src/ada-tests/samples/base_mp/config.h @@ -14,12 +14,12 @@ */ /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_POSIX_INIT_THREAD_TABLE diff --git a/c/src/ada-tests/support/init.c b/c/src/ada-tests/support/init.c index 6247766160..729079bd83 100644 --- a/c/src/ada-tests/support/init.c +++ b/c/src/ada-tests/support/init.c @@ -1,4 +1,4 @@ -/* +/* * COPYRIGHT (c) 1989-2007 * On-Line Applications Research Corporation (OAR). * diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/console/console.c b/c/src/lib/libbsp/bfin/bf537Stamp/console/console.c index 1dd5787a31..d3d73da67f 100644 --- a/c/src/lib/libbsp/bfin/bf537Stamp/console/console.c +++ b/c/src/lib/libbsp/bfin/bf537Stamp/console/console.c @@ -1,5 +1,5 @@ /* Console driver for bf537Stamp - * + * * Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA * written by Allan Hessenflow * @@ -9,7 +9,7 @@ * * $Id$ */ - + #include #include diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h b/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h index 99f6785422..2fe7c6f96f 100644 --- a/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h +++ b/c/src/lib/libbsp/bfin/bf537Stamp/include/bsp.h @@ -1,5 +1,5 @@ /* bsp.h - * + * * This include file contains all board IO definitions for bf537Stamp. * * Copyright (c) 2006 by Atos Automacao Industrial Ltda. @@ -12,7 +12,7 @@ * * $Id$ */ - + #ifndef _BSP_H #define _BSP_H @@ -34,7 +34,7 @@ extern "C" { #define BSP_DATA_CACHE_CONFIG (3 << DMEM_CONTROL_DMC_SHIFT) -/* +/* * PLL and clock setup values: */ diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S b/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S index 43c3398dbb..2a05e02f34 100644 --- a/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S +++ b/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S @@ -59,30 +59,30 @@ __start: p0.l = start; p1.h = HI(CEC_EVT15); p1.l = LO(CEC_EVT15); - + [p1] = p0; r0 = 0x8000 (z); sti r0; raise 15; - + p0.h = wait; p0.l = wait; reti = p0; rti; - + /* wait for event 15 */ wait: jump wait; - + start: [--sp] = reti; /* allow us to process interrupts later */ /* mask interrupts for now */ cli r0; - + p0.h = _bss_start; p0.l = _bss_start; p1.h = _end; @@ -90,7 +90,7 @@ start: r0 = p0; r1 = p1; r1 = r1 - r0; - p1 = r1; + p1 = r1; r0 = 0; /* Set _bss_start until _end to zero */ diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c index 7a54306d75..dc25bbf3bb 100644 --- a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c +++ b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c @@ -4,7 +4,7 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + * * Copyright (c) 2006 by Atos Automacao Industrial Ltda. * written by Alain Schaefer * and Antonio Giovanini @@ -105,16 +105,16 @@ void bsp_start(void) /* * initPLL - * + * * Routine to initialize the PLL. The BF537 Stamp uses a 27 Mhz XTAL. BISON * See "../bf537Stamp/include/bsp.h" for more information. */ static void initPLL(void) { - + #ifdef BISON unsigned int n; - + /* Configure PLL registers */ *((uint16_t*)PLL_LOCKCNT) = 0x1000; *((uint16_t*)PLL_DIV) = PLL_CSEL|PLL_SSEL; @@ -124,16 +124,16 @@ static void initPLL(void) { asm("cli r0;"); asm("idle;"); asm("sti r0;"); - + /* Delay for PLL stabilization */ - for (n=0; n<200; n++) {} + for (n=0; n<200; n++) {} #endif - + } /* * initEBIU - * + * * Configure extern memory */ @@ -153,8 +153,8 @@ static void initEBIU(void) { *((uint32_t*)EBIU_AMBCTL0) = 0x7bb07bb0L; *((uint32_t*)EBIU_AMBCTL1) = 0x7bb07bb0L; *((uint16_t*)EBIU_AMGCTL) = 0x000f; - - /* Configure SDRAM + + /* Configure SDRAM *((uint32_t*)EBIU_SDGCTL) = 0x0091998d; *((uint16_t*)EBIU_SDBCTL) = 0x0013; *((uint16_t*)EBIU_SDRRC) = 0x0817; @@ -164,7 +164,7 @@ static void initEBIU(void) { /* * initGPIO - * + * * Enable LEDs port */ static void initGPIO(void) { diff --git a/c/src/lib/libbsp/bfin/eZKit533/console/console-io.c b/c/src/lib/libbsp/bfin/eZKit533/console/console-io.c index dd68468bac..2541ac53b4 100644 --- a/c/src/lib/libbsp/bfin/eZKit533/console/console-io.c +++ b/c/src/lib/libbsp/bfin/eZKit533/console/console-io.c @@ -1,5 +1,5 @@ /* console-io.c - * + * * This file contains the hardware specific portions of the TTY driver * for the serial ports for ezkit533. * @@ -13,7 +13,7 @@ * * $Id$ */ - + #include #include diff --git a/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h b/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h index 00b13c84ae..29427afb00 100644 --- a/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h +++ b/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h @@ -1,5 +1,5 @@ /* bsp.h - * + * * This include file contains all board IO definitions for eZKit533. * * Copyright (c) 2006 by Atos Automacao Industrial Ltda. @@ -12,7 +12,7 @@ * * $Id$ */ - + #ifndef _BSP_H #define _BSP_H @@ -29,9 +29,9 @@ extern "C" { #include #include #include -#include +#include -/* +/* * PLL and clock setup values: */ diff --git a/c/src/lib/libbsp/bfin/eZKit533/include/cplb.h b/c/src/lib/libbsp/bfin/eZKit533/include/cplb.h index 2cac1a48e6..485c535bc7 100644 --- a/c/src/lib/libbsp/bfin/eZKit533/include/cplb.h +++ b/c/src/lib/libbsp/bfin/eZKit533/include/cplb.h @@ -1,5 +1,5 @@ /* cplb.h - * + * * Copyright (c) 2006 by Atos Automacao Industrial Ltda. * written by Alain Schaefer * @@ -14,7 +14,7 @@ /* CPLB configurations */ #define CPLB_DEF_CACHE_WT CPLB_L1_CHBL | CPLB_WT -#define CPLB_DEF_CACHE_WB CPLB_L1_CHBL +#define CPLB_DEF_CACHE_WB CPLB_L1_CHBL #define CPLB_CACHE_ENABLED CPLB_L1_CHBL | CPLB_DIRTY #define CPLB_DEF_CACHE CPLB_L1_CHBL | CPLB_WT diff --git a/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c b/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c index 5572c3bad8..a4f76b9ed2 100644 --- a/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c +++ b/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c @@ -4,7 +4,7 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + * * Copyright (c) 2006 by Atos Automacao Industrial Ltda. * written by Alain Schaefer * and Antonio Giovanini @@ -21,7 +21,7 @@ #include #include -const unsigned int dcplbs_table[16][2] = { +const unsigned int dcplbs_table[16][2] = { { 0xFFA00000, (PAGE_SIZE_1MB | CPLB_D_PAGE_MGMT | CPLB_WT) }, { 0xFF900000, (PAGE_SIZE_1MB | CPLB_D_PAGE_MGMT | CPLB_WT) }, /* L1 Data B */ { 0xFF800000, (PAGE_SIZE_1MB | CPLB_D_PAGE_MGMT | CPLB_WT) }, /* L1 Data A */ @@ -42,10 +42,10 @@ const unsigned int dcplbs_table[16][2] = { }; -const unsigned int _icplbs_table[16][2] = { +const unsigned int _icplbs_table[16][2] = { { 0xFFA00000, (PAGE_SIZE_1MB | CPLB_I_PAGE_MGMT | CPLB_I_PAGE_MGMT | 0x4) }, /* L1 Code */ { 0xEF000000, (PAGE_SIZE_1MB | CPLB_INOCACHE) }, /* AREA DE BOOT */ - { 0xFFB00000, (PAGE_SIZE_1MB | CPLB_INOCACHE) }, + { 0xFFB00000, (PAGE_SIZE_1MB | CPLB_INOCACHE) }, { 0x20300000, (PAGE_SIZE_1MB | CPLB_INOCACHE) }, /* Async Memory Bank 3 */ { 0x20200000, (PAGE_SIZE_1MB | CPLB_INOCACHE) }, /* Async Memory Bank 2 (Secnd) */ { 0x20100000, (PAGE_SIZE_1MB | CPLB_INOCACHE) }, /* Async Memory Bank 1 (Prim B) */ @@ -91,7 +91,7 @@ void bsp_pretasking_hook(void) void bsp_start( void ) { /* BSP Hardware Initialization*/ - Init_RTC(); /* Blackfin Real Time Clock initialization */ + Init_RTC(); /* Blackfin Real Time Clock initialization */ Init_PLL(); /* PLL initialization */ Init_EBIU(); /* EBIU initialization */ Init_Flags(); /* GPIO initialization */ @@ -104,14 +104,14 @@ void bsp_start( void ) /* * Init_PLL - * + * * Routine to initialize the PLL. The Ezkit uses a 27 Mhz XTAL. * See "../eZKit533/include/bsp.h" for more information. */ void Init_PLL (void) { unsigned int n; - + /* Configure PLL registers */ *((uint16_t*)PLL_LOCKCNT) = 0x1000; *((uint16_t*)PLL_DIV) = PLL_CSEL|PLL_SSEL; @@ -121,14 +121,14 @@ void Init_PLL (void) asm("cli r0;"); asm("idle;"); asm("sti r0;"); - + /* Delay for PLL stabilization */ - for (n=0; n<200; n++) {} + for (n=0; n<200; n++) {} } /* * Init_EBIU - * + * * Configure extern memory */ @@ -138,8 +138,8 @@ void Init_EBIU (void) *((uint32_t*)EBIU_AMBCTL0) = 0x7bb07bb0L; *((uint32_t*)EBIU_AMBCTL1) = 0x7bb07bb0L; *((uint16_t*)EBIU_AMGCTL) = 0x000f; - - /* Configure SDRAM + + /* Configure SDRAM *((uint32_t*)EBIU_SDGCTL) = 0x0091998d; *((uint16_t*)EBIU_SDBCTL) = 0x0013; *((uint16_t*)EBIU_SDRRC) = 0x0817; @@ -148,7 +148,7 @@ void Init_EBIU (void) /* * Init_Flags - * + * * Enable LEDs port */ void Init_Flags(void) @@ -157,9 +157,9 @@ void Init_Flags(void) *((uint16_t*)FIO_DIR) = 0x0000; *((uint16_t*)FIO_EDGE) = 0x0100; *((uint16_t*)FIO_MASKA_D) = 0x0100; - + *((uint8_t*)FlashA_PortB_Dir) = 0x3f; - *((uint8_t*)FlashA_PortB_Data) = 0x00; + *((uint8_t*)FlashA_PortB_Data) = 0x00; } /* @@ -168,7 +168,7 @@ void Init_Flags(void) */ void setLED (uint8_t value) { - *((uint8_t*)FlashA_PortB_Data) = value; + *((uint8_t*)FlashA_PortB_Data) = value; } /* @@ -193,5 +193,5 @@ void initCPLB(void) *data = dcplbs_table[i][1]; addr++; data++; - } + } } diff --git a/c/src/lib/libbsp/bfin/shared/start/start.S b/c/src/lib/libbsp/bfin/shared/start/start.S index dc2af88db2..b9fe272935 100644 --- a/c/src/lib/libbsp/bfin/shared/start/start.S +++ b/c/src/lib/libbsp/bfin/shared/start/start.S @@ -1,6 +1,6 @@ -#include +#include #include @@ -39,7 +39,7 @@ __start: /* Start by setting up a stack */ sp.h = 0xFFB0; sp.l = 0x0F00; - + /* Maybe we should zero the memory in the .bss section. */ /* This changes to the supervisor mode */ @@ -47,34 +47,34 @@ __start: p0.h = START; p1.l = LO(EVT15); p1.h = HI(EVT15); - + [P1] = P0; - + P0.h = HI(IMASK); P0.l = LO(IMASK); R0 = [P0]; /* R1.l = EVT_IVG15 & 0xFFFF; */ R1.l = 0x8000; - + R0 = R0 | R1; - + [P0] = R0; RAISE 15; - + P0.l = WAIT; P0.h = WAIT; RETI = P0; RTI; - + /* endless loop to wait */ - WAIT: + WAIT: jump WAIT; - + START: [--SP] = RETI; - + p0.h = _bss_start; p0.l = _bss_start; p1.h = _end; @@ -82,7 +82,7 @@ __start: r0 = p0; r1 = p1; r1 = r1 - r0; - p1 = r1; + p1 = r1; r0 = 0; /* Set _bss_start until _end to zero */ @@ -96,8 +96,8 @@ __start: call (p0); p0.l = _exit; - p0.h = _exit; - P3 = P4; + p0.h = _exit; + P3 = P4; jump (p0) /* Should not return. */ .global _null_isr diff --git a/c/src/lib/libbsp/i386/shared/irq/irq_asm.S b/c/src/lib/libbsp/i386/shared/irq/irq_asm.S index be0bcbb859..8d4535ddc5 100644 --- a/c/src/lib/libbsp/i386/shared/irq/irq_asm.S +++ b/c/src/lib/libbsp/i386/shared/irq/irq_asm.S @@ -28,7 +28,7 @@ #define FRM_SIZ (16+512) #define SSE_OFF 16 #else -#define FRM_SIZ 16 +#define FRM_SIZ 16 #endif BEGIN_CODE @@ -137,7 +137,7 @@ SYM (_ISR_Handler): /* * We want to insure that the old stack pointer is in ebp - * By saving it on every interrupt, all we have to do is + * By saving it on every interrupt, all we have to do is * movl ebp->esp near the end of every interrupt. */ diff --git a/c/src/lib/libbsp/i386/shared/pci/pcibios.c b/c/src/lib/libbsp/i386/shared/pci/pcibios.c index b2aa10daa1..04b2dfe379 100644 --- a/c/src/lib/libbsp/i386/shared/pci/pcibios.c +++ b/c/src/lib/libbsp/i386/shared/pci/pcibios.c @@ -544,7 +544,7 @@ BSP_pci_read_config_byte( unsigned char fun, unsigned char offset, unsigned char *val -) +) { int sig; @@ -560,7 +560,7 @@ BSP_pci_read_config_word( unsigned char fun, unsigned char offset, unsigned short *val -) +) { int sig; @@ -576,7 +576,7 @@ BSP_pci_read_config_dword( unsigned char fun, unsigned char offset, uint32_t *val -) +) { int sig; @@ -592,7 +592,7 @@ BSP_pci_write_config_byte( unsigned char fun, unsigned char offset, unsigned char val -) +) { int sig; @@ -608,7 +608,7 @@ BSP_pci_write_config_word( unsigned char fun, unsigned char offset, unsigned short val -) +) { int sig; @@ -624,7 +624,7 @@ BSP_pci_write_config_dword( unsigned char fun, unsigned char offset, uint32_t val -) +) { int sig; diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c b/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c index 6081349ed0..09b1d3943b 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c +++ b/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c @@ -538,7 +538,7 @@ serial_init(void) bd_t *bd; #if NVRAM_CONFIGURE == 1 - if ( ((nvram->console_mode & 0x06) != 0x04 ) || + if ( ((nvram->console_mode & 0x06) != 0x04 ) || ((nvram->console_mode & 0x30) != 0x20 )) { /* * FIXME: refine this condition... diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c b/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c index 0e440984b6..1ac160302d 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c +++ b/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c @@ -218,8 +218,8 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum) ppc_cached_irq_mask |= (1 << (31 - BSP_CPM_INTERRUPT)); ((volatile immap_t *)IMAP_ADDR)->im_siu_conf.sc_simask = ppc_cached_irq_mask; } - /* - * make sure, that the masking operations in + /* + * make sure, that the masking operations in * ICTL and MSR are executed in order */ asm volatile("sync":::"memory"); @@ -232,8 +232,8 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum) _CPU_MSR_SET(msr); - /* - * make sure, that the masking operations in + /* + * make sure, that the masking operations in * ICTL and MSR are executed in order */ asm volatile("sync":::"memory"); diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S b/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S index 5c99168819..03185d04f1 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S +++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S @@ -51,7 +51,7 @@ #warning The call is "void boot_card(const char* cmdline);" #warning You need to pass a NULL. #warning Please check and remove these warnings. - + #include /* @@ -246,16 +246,16 @@ spin: /* * test function: blink orange led once */ -#define LEDBLINK_DELAY (5*1000*1000) +#define LEDBLINK_DELAY (5*1000*1000) #define LEDPORT 0xFA100001 #define LEDMASK 0xf0 #define LEDON 0x00 #define LEDOFF 0x08 - + PUBLIC_VAR(ledblink) SYM(ledblink): lis r3,LEDBLINK_DELAY>>16 -ledblink1: +ledblink1: subi r3,r3,1 cmpi 0,1,r3,0 bne ledblink1 @@ -267,9 +267,9 @@ ledblink1: andi. r0,r0,LEDMASK ori r0,r0,LEDOFF stb r0,LEDPORT@l(r3) - + lis r3,LEDBLINK_DELAY>>16 -ledblink2: +ledblink2: subi r3,r3,1 cmpi 0,1,r3,0 bne ledblink2 @@ -281,8 +281,8 @@ ledblink2: andi. r0,r0,LEDMASK ori r0,r0,LEDON stb r0,LEDPORT@l(r3) - - blr + + blr /* * #define LOADED_BY_EPPCBUG */ diff --git a/c/src/libchip/display/disp_fonts.h b/c/src/libchip/display/disp_fonts.h index 2c7b7ce294..3cb55ac3fa 100644 --- a/c/src/libchip/display/disp_fonts.h +++ b/c/src/libchip/display/disp_fonts.h @@ -30,8 +30,8 @@ typedef int8_t disp_font_dimen; struct disp_font_bounding_box { - disp_font_dimen w, h, x, y; -}; + disp_font_dimen w, h, x, y; +}; struct disp_font_glyph { diff --git a/c/src/libchip/display/disp_hcms29xx.c b/c/src/libchip/display/disp_hcms29xx.c index d95c6864ca..3cb850fb90 100644 --- a/c/src/libchip/display/disp_hcms29xx.c +++ b/c/src/libchip/display/disp_hcms29xx.c @@ -82,7 +82,7 @@ static rtems_status_code disp_hcms29xx_font_struct_size | rtems_status_code | \*=========================================================================*/ { - + rtems_status_code rc = RTEMS_SUCCESSFUL; size_t font_size = 0; size_t glyph_idx; @@ -94,7 +94,7 @@ static rtems_status_code disp_hcms29xx_font_struct_size rc = RTEMS_INVALID_ADDRESS; } if (rc == RTEMS_SUCCESSFUL) { - font_size = + font_size = sizeof(*src); /* font_base structure */ } glyph_idx = 0; @@ -105,9 +105,9 @@ static rtems_status_code disp_hcms29xx_font_struct_size + (size_t) src->latin1[glyph_idx]->bb.w; } glyph_idx++; - } - *dst_size = font_size; - + } + *dst_size = font_size; + return rc; } @@ -122,7 +122,7 @@ static inline unsigned char disp_hcms29xx_bitswap +---------------------------------------------------------------------------+ | Input Parameters: | \*-------------------------------------------------------------------------*/ - unsigned char byte + unsigned char byte ) /*-------------------------------------------------------------------------*\ | Return Value: | @@ -132,7 +132,7 @@ static inline unsigned char disp_hcms29xx_bitswap unsigned char result = 0; int smsk,dmsk; for (smsk = 0x01,dmsk=0x80; - smsk < 0x100; + smsk < 0x100; smsk<<=1 ,dmsk>>=1) { if ((byte & smsk) != 0) { result |= (unsigned char) dmsk; @@ -162,7 +162,7 @@ static rtems_status_code disp_hcms29xx_copy_font | rtems_status_code | \*=========================================================================*/ { - + rtems_status_code rc = RTEMS_SUCCESSFUL; char *alloc_next = (char *)dst; size_t glyph_idx = 0; @@ -173,7 +173,7 @@ static rtems_status_code disp_hcms29xx_copy_font /* * check parameters */ - if ((rc == RTEMS_SUCCESSFUL) && + if ((rc == RTEMS_SUCCESSFUL) && ((src == NULL) || (dst == NULL))) { rc = RTEMS_INVALID_ADDRESS; @@ -198,18 +198,18 @@ static rtems_status_code disp_hcms29xx_copy_font dst->latin1[glyph_idx] = (struct disp_font_glyph *)alloc_next; alloc_next += sizeof(*(dst->latin1[glyph_idx])); /* - * copy source values. + * copy source values. * Note: bitmap will be reassigned later */ - *(struct disp_font_glyph *)(dst->latin1[glyph_idx]) = + *(struct disp_font_glyph *)(dst->latin1[glyph_idx]) = *(src->latin1[glyph_idx]); } else { dst->latin1[glyph_idx] = NULL; } glyph_idx++; - } - + } + /* * for all glyphs: reassign bitmap */ @@ -240,11 +240,11 @@ static rtems_status_code disp_hcms29xx_copy_font else if (shift_cnt > 0) { byte = byte >> shift_cnt; } - ((unsigned char *)(dst->latin1[glyph_idx]->bitmap))[bcnt] = byte; + ((unsigned char *)(dst->latin1[glyph_idx]->bitmap))[bcnt] = byte; } } glyph_idx++; - } + } return rc; } @@ -269,13 +269,13 @@ static rtems_status_code disp_hcms29xx_alloc_copy_font | rtems_status_code | \*=========================================================================*/ { - + rtems_status_code rc = RTEMS_SUCCESSFUL; size_t src_size = 0; /* * check parameters */ - if ((rc == RTEMS_SUCCESSFUL) && + if ((rc == RTEMS_SUCCESSFUL) && ((src == NULL) || (dst == NULL))) { rc = RTEMS_INVALID_ADDRESS; @@ -361,15 +361,15 @@ static rtems_status_code disp_hcms29xx_send_to_display * send data */ if (rc == RTEMS_SUCCESSFUL) { - curr_font = - softc_ptr->disp_param.rotate - ? disp_hcms29xx_font_rotate + curr_font = + softc_ptr->disp_param.rotate + ? disp_hcms29xx_font_rotate : disp_hcms29xx_font_normal; char_avail = true; /* * FIXME: for rotated display, write last character first... - * maybe we should copy everything to a common buffer and use + * maybe we should copy everything to a common buffer and use * ONE SPI transfer? */ for (i = 0; @@ -381,15 +381,15 @@ static rtems_status_code disp_hcms29xx_send_to_display if (char_avail && (c == '\0')) { char_avail = false; } - glyph_ptr = (char_avail + glyph_ptr = (char_avail ? curr_font->latin1[c] : NULL); if (glyph_ptr == NULL) { glyph_ptr = curr_font->latin1[' ']; - } + } - digit = (softc_ptr->disp_param.rotate - ? DISP_HCMS29XX_DIGIT_CNT-1-i + digit = (softc_ptr->disp_param.rotate + ? DISP_HCMS29XX_DIGIT_CNT-1-i : i); /* * send 5 bytes from (char *)glyph_ptr->bitmap to SPI @@ -447,15 +447,15 @@ static rtems_status_code disp_hcms29xx_send_to_control run++) { if (rc == RTEMS_SUCCESSFUL) { if (run == 0) { - ctrl_buffer = - (0 << 7) | + ctrl_buffer = + (0 << 7) | ((sleep & 0x01) << 6) | ((peak & 0x03) << 4) | ((pwm & 0x0f) << 0); } else { - ctrl_buffer = - (1 << 7) | + ctrl_buffer = + (1 << 7) | ((div & 0x01) << 1) | ((chain & 0x01) << 0); } @@ -525,7 +525,7 @@ static rtems_timer_service_routine disp_hcms29xx_timer_sr { rtems_status_code rc = RTEMS_SUCCESSFUL; disp_hcms29xx_drv_t *softc_ptr = arg; - + if (rc == RTEMS_SUCCESSFUL) { rc = rtems_event_send(softc_ptr->disp_param.task_id, @@ -568,7 +568,7 @@ static rtems_task disp_hcms29xx_update_task rc = disp_hcms29xx_send_to_control(softc_ptr, 14,3,1,0,0);/* pwm/peak/nosleep/div/chain */ } - + /* * set display to blank */ @@ -596,7 +596,7 @@ static rtems_task disp_hcms29xx_update_task &my_events); if (my_events & DISP_HCMS29XX_EVENT_NEWSTR) { /* - * fetch new string consistently into local buffer + * fetch new string consistently into local buffer */ if (rc == RTEMS_SUCCESSFUL) { rc = rtems_semaphore_obtain(softc_ptr->disp_param.trns_sema_id, @@ -608,12 +608,12 @@ static rtems_task disp_hcms29xx_update_task sizeof(softc_ptr->disp_param.disp_buffer)); softc_ptr->disp_param.disp_buffer[sizeof(softc_ptr->disp_param.disp_buffer)-1] = '\0'; softc_ptr->disp_param.disp_buf_cnt = - (int) strlen(softc_ptr->disp_param.disp_buffer); + (int) strlen(softc_ptr->disp_param.disp_buffer); } if (rc == RTEMS_SUCCESSFUL) { rc = rtems_semaphore_release(softc_ptr->disp_param.trns_sema_id); } - /* + /* * set initial offset to negative value * to make string static for some ticks */ @@ -639,7 +639,7 @@ static rtems_task disp_hcms29xx_update_task rc = disp_hcms29xx_send_to_display(softc_ptr, softc_ptr->disp_param.disp_buffer); } - else if (disp_offset + else if (disp_offset < (softc_ptr->disp_param.disp_buf_cnt - DISP_HCMS29XX_DIGIT_CNT)) { rc = disp_hcms29xx_send_to_display(softc_ptr, softc_ptr->disp_param.disp_buffer+disp_offset); @@ -650,7 +650,7 @@ static rtems_task disp_hcms29xx_update_task + softc_ptr->disp_param.disp_buf_cnt - DISP_HCMS29XX_DIGIT_CNT); } - /* + /* * activate timer, if needed */ if (rc == RTEMS_SUCCESSFUL) { @@ -664,9 +664,9 @@ static rtems_task disp_hcms29xx_update_task rc = rtems_timer_cancel(disp_hcms29xx_timer_id); } } - } + } /* - * FIXME: display task is dead... + * FIXME: display task is dead... */ } @@ -690,7 +690,7 @@ static rtems_status_code disp_hcms29xx_update \*=========================================================================*/ { rtems_status_code rc = RTEMS_SUCCESSFUL; - + /* * obtain trns semaphore */ @@ -719,7 +719,7 @@ static rtems_status_code disp_hcms29xx_update rc = rtems_event_send(softc_ptr->disp_param.task_id, DISP_HCMS29XX_EVENT_NEWSTR); } - + return rc; } @@ -758,10 +758,10 @@ rtems_device_driver disp_hcms29xx_dev_initialize * initialize font management * FIXME: check, that default glyph exists * FIXME: check font size to be 5x7 - */ + */ /* * translate font according to direction/baseline - */ + */ if (rc == RTEMS_SUCCESSFUL) { rc = disp_hcms29xx_alloc_copy_font( &FONT_BASE, @@ -789,7 +789,7 @@ rtems_device_driver disp_hcms29xx_dev_initialize 0, &softc_ptr->disp_param.trns_sema_id); } - + /* * create and start display task */ @@ -802,7 +802,7 @@ rtems_device_driver disp_hcms29xx_dev_initialize &softc_ptr->disp_param.task_id); } if (rc == RTEMS_SUCCESSFUL) { - rc = rtems_task_start(softc_ptr->disp_param.task_id, + rc = rtems_task_start(softc_ptr->disp_param.task_id, disp_hcms29xx_update_task, 0 ); } /* @@ -812,7 +812,7 @@ rtems_device_driver disp_hcms29xx_dev_initialize rc = rtems_io_register_name (devname, major, 0); } return rc; -} +} /*=========================================================================*\ | Function: | @@ -838,14 +838,14 @@ rtems_device_driver disp_hcms29xx_dev_open /* * FIXME: get softc_ptr */ - /* + /* * ensure, that disp_hcms29xx device is assumed to be empty */ softc_ptr->disp_param.dev_buf_cnt = 0; return RTEMS_SUCCESSFUL; } - + /*=========================================================================*\ | Function: | \*-------------------------------------------------------------------------*/ @@ -875,27 +875,27 @@ rtems_device_driver disp_hcms29xx_dev_write for (cnt = 0;cnt < args->count;cnt++) { /* - * accumulate characters written into display dev buffer + * accumulate characters written into display dev buffer */ - if (((softc_ptr->disp_param.dev_buf_cnt > 0) + if (((softc_ptr->disp_param.dev_buf_cnt > 0) &&((args->buffer[cnt] == '\n') || (args->buffer[cnt] == '\0')) ) - ||( softc_ptr->disp_param.dev_buf_cnt >= + ||( softc_ptr->disp_param.dev_buf_cnt >= (int) sizeof(softc_ptr->disp_param.dev_buffer) - 1)) { softc_ptr->disp_param.dev_buffer[softc_ptr->disp_param.dev_buf_cnt] = '\0'; /* - * transfer string to display string, redisplay it... + * transfer string to display string, redisplay it... */ disp_hcms29xx_update(softc_ptr,softc_ptr->disp_param.dev_buffer); - softc_ptr->disp_param.dev_buf_cnt = 0; + softc_ptr->disp_param.dev_buf_cnt = 0; } - /* + /* * write to dev_buf, if '\n' occured or display device buffer is full */ if ((args->buffer[cnt] != '\n') && (args->buffer[cnt] != '\0')) { - softc_ptr->disp_param.dev_buffer[softc_ptr->disp_param.dev_buf_cnt++] = + softc_ptr->disp_param.dev_buffer[softc_ptr->disp_param.dev_buf_cnt++] = args->buffer[cnt]; } } @@ -933,13 +933,13 @@ rtems_device_driver disp_hcms29xx_dev_close /* flush buffer, if not empty */ if (softc_ptr->disp_param.dev_buf_cnt > 0) { - softc_ptr->disp_param.dev_buffer[softc_ptr->disp_param.dev_buf_cnt] = + softc_ptr->disp_param.dev_buffer[softc_ptr->disp_param.dev_buf_cnt] = '\0'; /* - * transfer string to display string, redisplay it... + * transfer string to display string, redisplay it... */ disp_hcms29xx_update(softc_ptr,softc_ptr->disp_param.dev_buffer); - softc_ptr->disp_param.dev_buf_cnt = 0; - } + softc_ptr->disp_param.dev_buf_cnt = 0; + } return RTEMS_SUCCESSFUL; } diff --git a/c/src/libchip/display/disp_hcms29xx.h b/c/src/libchip/display/disp_hcms29xx.h index ce7107884c..332d46562d 100644 --- a/c/src/libchip/display/disp_hcms29xx.h +++ b/c/src/libchip/display/disp_hcms29xx.h @@ -33,21 +33,21 @@ extern "C" { typedef struct { rtems_device_major_number minor; /* minor device number */ - /* + /* * in the disp_buffer, the string to be displayed is placed */ char disp_buffer[DISP_HCMS29XX_TEXT_CNT]; int disp_buf_cnt; /* number of valid chars in disp_buffer */ /* - * in the trns buffer the string is transfered to display task + * in the trns buffer the string is transfered to display task */ char trns_buffer[DISP_HCMS29XX_TEXT_CNT]; - /* - * in the dev_buffer, characters will be accumulated before display... + /* + * in the dev_buffer, characters will be accumulated before display... */ char dev_buffer[DISP_HCMS29XX_TEXT_CNT]; int dev_buf_cnt; /* number of valid chars in dev_buffer */ - + rtems_id trns_sema_id; /* ID of disp trns buffer sema */ rtems_id task_id; /* ID of disp task */ bool rotate; /* FLAG: display is upside down */ @@ -58,10 +58,10 @@ extern "C" { spi_disp_hcms29xx_param_t disp_param; } disp_hcms29xx_drv_t; /* - * pass this descriptor pointer to rtems_libi2c_register_drv + * pass this descriptor pointer to rtems_libi2c_register_drv */ extern rtems_libi2c_drv_t *disp_hcms29xx__driver_descriptor; - + #ifdef __cplusplus } #endif diff --git a/c/src/libchip/display/font_hcms29xx.c b/c/src/libchip/display/font_hcms29xx.c index 8df63367ff..3838e1f3e2 100644 --- a/c/src/libchip/display/font_hcms29xx.c +++ b/c/src/libchip/display/font_hcms29xx.c @@ -29,7 +29,7 @@ const unsigned char bitmap_hp_fixed_5_7_0 [5] = { 0x1c, 0x3e, 0x7f, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_0 = { {5,7,0,0}, @@ -41,7 +41,7 @@ const unsigned char bitmap_hp_fixed_5_7_1 [5] = { 0x45, 0x48, 0x40, - 0x30 + 0x30 }; struct disp_font_glyph glyph_hp_fixed_5_7_1 = { {5,7,0,0}, @@ -53,7 +53,7 @@ const unsigned char bitmap_hp_fixed_5_7_2 [5] = { 0x29, 0x11, 0x29, - 0x45 + 0x45 }; struct disp_font_glyph glyph_hp_fixed_5_7_2 = { {5,7,0,0}, @@ -65,7 +65,7 @@ const unsigned char bitmap_hp_fixed_5_7_3 [5] = { 0x09, 0x11, 0x21, - 0x7d + 0x7d }; struct disp_font_glyph glyph_hp_fixed_5_7_3 = { {5,7,0,0}, @@ -77,7 +77,7 @@ const unsigned char bitmap_hp_fixed_5_7_4 [5] = { 0x09, 0x05, 0x05, - 0x79 + 0x79 }; struct disp_font_glyph glyph_hp_fixed_5_7_4 = { {5,7,0,0}, @@ -89,7 +89,7 @@ const unsigned char bitmap_hp_fixed_5_7_5 [5] = { 0x44, 0x44, 0x38, - 0x44 + 0x44 }; struct disp_font_glyph glyph_hp_fixed_5_7_5 = { {5,7,0,0}, @@ -101,7 +101,7 @@ const unsigned char bitmap_hp_fixed_5_7_6 [5] = { 0x01, 0x29, 0x2e, - 0x10 + 0x10 }; struct disp_font_glyph glyph_hp_fixed_5_7_6 = { {5,7,0,0}, @@ -113,7 +113,7 @@ const unsigned char bitmap_hp_fixed_5_7_7 [5] = { 0x4a, 0x4d, 0x49, - 0x30 + 0x30 }; struct disp_font_glyph glyph_hp_fixed_5_7_7 = { {5,7,0,0}, @@ -125,7 +125,7 @@ const unsigned char bitmap_hp_fixed_5_7_8 [5] = { 0x50, 0x48, 0x50, - 0x60 + 0x60 }; struct disp_font_glyph glyph_hp_fixed_5_7_8 = { {5,7,0,0}, @@ -137,7 +137,7 @@ const unsigned char bitmap_hp_fixed_5_7_9 [5] = { 0x04, 0x04, 0x38, - 0x40 + 0x40 }; struct disp_font_glyph glyph_hp_fixed_5_7_9 = { {5,7,0,0}, @@ -149,7 +149,7 @@ const unsigned char bitmap_hp_fixed_5_7_10 [5] = { 0x49, 0x49, 0x49, - 0x3e + 0x3e }; struct disp_font_glyph glyph_hp_fixed_5_7_10 = { {5,7,0,0}, @@ -161,7 +161,7 @@ const unsigned char bitmap_hp_fixed_5_7_11 [5] = { 0x14, 0x08, 0x10, - 0x60 + 0x60 }; struct disp_font_glyph glyph_hp_fixed_5_7_11 = { {5,7,0,0}, @@ -173,7 +173,7 @@ const unsigned char bitmap_hp_fixed_5_7_12 [5] = { 0x3c, 0x20, 0x20, - 0x1c + 0x1c }; struct disp_font_glyph glyph_hp_fixed_5_7_12 = { {5,7,0,0}, @@ -185,7 +185,7 @@ const unsigned char bitmap_hp_fixed_5_7_13 [5] = { 0x7c, 0x04, 0x7c, - 0x02 + 0x02 }; struct disp_font_glyph glyph_hp_fixed_5_7_13 = { {5,7,0,0}, @@ -197,7 +197,7 @@ const unsigned char bitmap_hp_fixed_5_7_14 [5] = { 0x44, 0x44, 0x3c, - 0x04 + 0x04 }; struct disp_font_glyph glyph_hp_fixed_5_7_14 = { {5,7,0,0}, @@ -209,7 +209,7 @@ const unsigned char bitmap_hp_fixed_5_7_15 [5] = { 0x63, 0x55, 0x49, - 0x41 + 0x41 }; struct disp_font_glyph glyph_hp_fixed_5_7_15 = { {5,7,0,0}, @@ -221,7 +221,7 @@ const unsigned char bitmap_hp_fixed_5_7_16 [5] = { 0x08, 0x78, 0x08, - 0x04 + 0x04 }; struct disp_font_glyph glyph_hp_fixed_5_7_16 = { {5,7,0,0}, @@ -233,7 +233,7 @@ const unsigned char bitmap_hp_fixed_5_7_17 [5] = { 0x24, 0x7e, 0x24, - 0x18 + 0x18 }; struct disp_font_glyph glyph_hp_fixed_5_7_17 = { {5,7,0,0}, @@ -245,7 +245,7 @@ const unsigned char bitmap_hp_fixed_5_7_18 [5] = { 0x61, 0x01, 0x61, - 0x5e + 0x5e }; struct disp_font_glyph glyph_hp_fixed_5_7_18 = { {5,7,0,0}, @@ -257,7 +257,7 @@ const unsigned char bitmap_hp_fixed_5_7_19 [5] = { 0x14, 0x15, 0x14, - 0x78 + 0x78 }; struct disp_font_glyph glyph_hp_fixed_5_7_19 = { {5,7,0,0}, @@ -269,7 +269,7 @@ const unsigned char bitmap_hp_fixed_5_7_20 [5] = { 0x44, 0x45, 0x3c, - 0x40 + 0x40 }; struct disp_font_glyph glyph_hp_fixed_5_7_20 = { {5,7,0,0}, @@ -281,7 +281,7 @@ const unsigned char bitmap_hp_fixed_5_7_21 [5] = { 0x15, 0x14, 0x15, - 0x78 + 0x78 }; struct disp_font_glyph glyph_hp_fixed_5_7_21 = { {5,7,0,0}, @@ -293,7 +293,7 @@ const unsigned char bitmap_hp_fixed_5_7_22 [5] = { 0x45, 0x44, 0x3d, - 0x40 + 0x40 }; struct disp_font_glyph glyph_hp_fixed_5_7_22 = { {5,7,0,0}, @@ -305,7 +305,7 @@ const unsigned char bitmap_hp_fixed_5_7_23 [5] = { 0x43, 0x42, 0x43, - 0x3c + 0x3c }; struct disp_font_glyph glyph_hp_fixed_5_7_23 = { {5,7,0,0}, @@ -317,7 +317,7 @@ const unsigned char bitmap_hp_fixed_5_7_24 [5] = { 0x45, 0x44, 0x45, - 0x38 + 0x38 }; struct disp_font_glyph glyph_hp_fixed_5_7_24 = { {5,7,0,0}, @@ -329,7 +329,7 @@ const unsigned char bitmap_hp_fixed_5_7_25 [5] = { 0x41, 0x40, 0x41, - 0x3c + 0x3c }; struct disp_font_glyph glyph_hp_fixed_5_7_25 = { {5,7,0,0}, @@ -341,7 +341,7 @@ const unsigned char bitmap_hp_fixed_5_7_26 [5] = { 0x42, 0x40, 0x42, - 0x38 + 0x38 }; struct disp_font_glyph glyph_hp_fixed_5_7_26 = { {5,7,0,0}, @@ -353,7 +353,7 @@ const unsigned char bitmap_hp_fixed_5_7_27 [5] = { 0x08, 0x2a, 0x1c, - 0x08 + 0x08 }; struct disp_font_glyph glyph_hp_fixed_5_7_27 = { {5,7,0,0}, @@ -365,7 +365,7 @@ const unsigned char bitmap_hp_fixed_5_7_28 [5] = { 0x7e, 0x02, 0x02, - 0x02 + 0x02 }; struct disp_font_glyph glyph_hp_fixed_5_7_28 = { {5,7,0,0}, @@ -377,7 +377,7 @@ const unsigned char bitmap_hp_fixed_5_7_29 [5] = { 0x19, 0x15, 0x12, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_29 = { {5,7,0,0}, @@ -389,7 +389,7 @@ const unsigned char bitmap_hp_fixed_5_7_30 [5] = { 0x7e, 0x49, 0x41, - 0x42 + 0x42 }; struct disp_font_glyph glyph_hp_fixed_5_7_30 = { {5,7,0,0}, @@ -401,7 +401,7 @@ const unsigned char bitmap_hp_fixed_5_7_31 [5] = { 0x12, 0x7c, 0x12, - 0x01 + 0x01 }; struct disp_font_glyph glyph_hp_fixed_5_7_31 = { {5,7,0,0}, @@ -413,7 +413,7 @@ const unsigned char bitmap_hp_fixed_5_7_32 [5] = { 0x00, 0x00, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_32 = { {5,7,0,0}, @@ -425,7 +425,7 @@ const unsigned char bitmap_hp_fixed_5_7_33 [5] = { 0x5f, 0x00, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_33 = { {5,7,0,0}, @@ -437,7 +437,7 @@ const unsigned char bitmap_hp_fixed_5_7_34 [5] = { 0x03, 0x00, 0x03, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_34 = { {5,7,0,0}, @@ -449,7 +449,7 @@ const unsigned char bitmap_hp_fixed_5_7_35 [5] = { 0x7f, 0x14, 0x7f, - 0x14 + 0x14 }; struct disp_font_glyph glyph_hp_fixed_5_7_35 = { {5,7,0,0}, @@ -461,7 +461,7 @@ const unsigned char bitmap_hp_fixed_5_7_36 [5] = { 0x2a, 0x7f, 0x2a, - 0x12 + 0x12 }; struct disp_font_glyph glyph_hp_fixed_5_7_36 = { {5,7,0,0}, @@ -473,7 +473,7 @@ const unsigned char bitmap_hp_fixed_5_7_37 [5] = { 0x13, 0x08, 0x64, - 0x62 + 0x62 }; struct disp_font_glyph glyph_hp_fixed_5_7_37 = { {5,7,0,0}, @@ -485,7 +485,7 @@ const unsigned char bitmap_hp_fixed_5_7_38 [5] = { 0x49, 0x56, 0x20, - 0x50 + 0x50 }; struct disp_font_glyph glyph_hp_fixed_5_7_38 = { {5,7,0,0}, @@ -497,7 +497,7 @@ const unsigned char bitmap_hp_fixed_5_7_39 [5] = { 0x0b, 0x07, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_39 = { {5,7,0,0}, @@ -509,7 +509,7 @@ const unsigned char bitmap_hp_fixed_5_7_40 [5] = { 0x00, 0x3e, 0x41, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_40 = { {5,7,0,0}, @@ -521,7 +521,7 @@ const unsigned char bitmap_hp_fixed_5_7_41 [5] = { 0x41, 0x3e, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_41 = { {5,7,0,0}, @@ -533,7 +533,7 @@ const unsigned char bitmap_hp_fixed_5_7_42 [5] = { 0x2a, 0x1c, 0x2a, - 0x08 + 0x08 }; struct disp_font_glyph glyph_hp_fixed_5_7_42 = { {5,7,0,0}, @@ -545,7 +545,7 @@ const unsigned char bitmap_hp_fixed_5_7_43 [5] = { 0x08, 0x3e, 0x08, - 0x08 + 0x08 }; struct disp_font_glyph glyph_hp_fixed_5_7_43 = { {5,7,0,0}, @@ -557,7 +557,7 @@ const unsigned char bitmap_hp_fixed_5_7_44 [5] = { 0x58, 0x38, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_44 = { {5,7,0,0}, @@ -569,7 +569,7 @@ const unsigned char bitmap_hp_fixed_5_7_45 [5] = { 0x08, 0x08, 0x08, - 0x08 + 0x08 }; struct disp_font_glyph glyph_hp_fixed_5_7_45 = { {5,7,0,0}, @@ -581,7 +581,7 @@ const unsigned char bitmap_hp_fixed_5_7_46 [5] = { 0x30, 0x30, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_46 = { {5,7,0,0}, @@ -593,7 +593,7 @@ const unsigned char bitmap_hp_fixed_5_7_47 [5] = { 0x10, 0x08, 0x04, - 0x02 + 0x02 }; struct disp_font_glyph glyph_hp_fixed_5_7_47 = { {5,7,0,0}, @@ -605,7 +605,7 @@ const unsigned char bitmap_hp_fixed_5_7_48 [5] = { 0x51, 0x49, 0x45, - 0x3e + 0x3e }; struct disp_font_glyph glyph_hp_fixed_5_7_48 = { {5,7,0,0}, @@ -617,7 +617,7 @@ const unsigned char bitmap_hp_fixed_5_7_49 [5] = { 0x42, 0x7f, 0x40, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_49 = { {5,7,0,0}, @@ -629,7 +629,7 @@ const unsigned char bitmap_hp_fixed_5_7_50 [5] = { 0x51, 0x49, 0x49, - 0x46 + 0x46 }; struct disp_font_glyph glyph_hp_fixed_5_7_50 = { {5,7,0,0}, @@ -641,7 +641,7 @@ const unsigned char bitmap_hp_fixed_5_7_51 [5] = { 0x41, 0x49, 0x49, - 0x36 + 0x36 }; struct disp_font_glyph glyph_hp_fixed_5_7_51 = { {5,7,0,0}, @@ -653,7 +653,7 @@ const unsigned char bitmap_hp_fixed_5_7_52 [5] = { 0x14, 0x12, 0x7f, - 0x10 + 0x10 }; struct disp_font_glyph glyph_hp_fixed_5_7_52 = { {5,7,0,0}, @@ -665,7 +665,7 @@ const unsigned char bitmap_hp_fixed_5_7_53 [5] = { 0x45, 0x45, 0x45, - 0x39 + 0x39 }; struct disp_font_glyph glyph_hp_fixed_5_7_53 = { {5,7,0,0}, @@ -677,7 +677,7 @@ const unsigned char bitmap_hp_fixed_5_7_54 [5] = { 0x4a, 0x49, 0x49, - 0x30 + 0x30 }; struct disp_font_glyph glyph_hp_fixed_5_7_54 = { {5,7,0,0}, @@ -689,7 +689,7 @@ const unsigned char bitmap_hp_fixed_5_7_55 [5] = { 0x71, 0x09, 0x05, - 0x03 + 0x03 }; struct disp_font_glyph glyph_hp_fixed_5_7_55 = { {5,7,0,0}, @@ -701,7 +701,7 @@ const unsigned char bitmap_hp_fixed_5_7_56 [5] = { 0x49, 0x49, 0x49, - 0x36 + 0x36 }; struct disp_font_glyph glyph_hp_fixed_5_7_56 = { {5,7,0,0}, @@ -713,7 +713,7 @@ const unsigned char bitmap_hp_fixed_5_7_57 [5] = { 0x49, 0x49, 0x29, - 0x1e + 0x1e }; struct disp_font_glyph glyph_hp_fixed_5_7_57 = { {5,7,0,0}, @@ -725,7 +725,7 @@ const unsigned char bitmap_hp_fixed_5_7_58 [5] = { 0x36, 0x36, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_58 = { {5,7,0,0}, @@ -737,7 +737,7 @@ const unsigned char bitmap_hp_fixed_5_7_59 [5] = { 0x5b, 0x3b, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_59 = { {5,7,0,0}, @@ -749,7 +749,7 @@ const unsigned char bitmap_hp_fixed_5_7_60 [5] = { 0x08, 0x14, 0x22, - 0x41 + 0x41 }; struct disp_font_glyph glyph_hp_fixed_5_7_60 = { {5,7,0,0}, @@ -761,7 +761,7 @@ const unsigned char bitmap_hp_fixed_5_7_61 [5] = { 0x14, 0x14, 0x14, - 0x14 + 0x14 }; struct disp_font_glyph glyph_hp_fixed_5_7_61 = { {5,7,0,0}, @@ -773,7 +773,7 @@ const unsigned char bitmap_hp_fixed_5_7_62 [5] = { 0x22, 0x14, 0x08, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_62 = { {5,7,0,0}, @@ -785,7 +785,7 @@ const unsigned char bitmap_hp_fixed_5_7_63 [5] = { 0x01, 0x51, 0x09, - 0x06 + 0x06 }; struct disp_font_glyph glyph_hp_fixed_5_7_63 = { {5,7,0,0}, @@ -797,7 +797,7 @@ const unsigned char bitmap_hp_fixed_5_7_64 [5] = { 0x41, 0x5d, 0x55, - 0x1e + 0x1e }; struct disp_font_glyph glyph_hp_fixed_5_7_64 = { {5,7,0,0}, @@ -809,7 +809,7 @@ const unsigned char bitmap_hp_fixed_5_7_65 [5] = { 0x09, 0x09, 0x09, - 0x7e + 0x7e }; struct disp_font_glyph glyph_hp_fixed_5_7_65 = { {5,7,0,0}, @@ -821,7 +821,7 @@ const unsigned char bitmap_hp_fixed_5_7_66 [5] = { 0x49, 0x49, 0x49, - 0x36 + 0x36 }; struct disp_font_glyph glyph_hp_fixed_5_7_66 = { {5,7,0,0}, @@ -833,7 +833,7 @@ const unsigned char bitmap_hp_fixed_5_7_67 [5] = { 0x41, 0x41, 0x41, - 0x22 + 0x22 }; struct disp_font_glyph glyph_hp_fixed_5_7_67 = { {5,7,0,0}, @@ -845,7 +845,7 @@ const unsigned char bitmap_hp_fixed_5_7_68 [5] = { 0x41, 0x41, 0x41, - 0x3e + 0x3e }; struct disp_font_glyph glyph_hp_fixed_5_7_68 = { {5,7,0,0}, @@ -857,7 +857,7 @@ const unsigned char bitmap_hp_fixed_5_7_69 [5] = { 0x49, 0x49, 0x49, - 0x41 + 0x41 }; struct disp_font_glyph glyph_hp_fixed_5_7_69 = { {5,7,0,0}, @@ -869,7 +869,7 @@ const unsigned char bitmap_hp_fixed_5_7_70 [5] = { 0x09, 0x09, 0x09, - 0x01 + 0x01 }; struct disp_font_glyph glyph_hp_fixed_5_7_70 = { {5,7,0,0}, @@ -881,7 +881,7 @@ const unsigned char bitmap_hp_fixed_5_7_71 [5] = { 0x41, 0x41, 0x51, - 0x32 + 0x32 }; struct disp_font_glyph glyph_hp_fixed_5_7_71 = { {5,7,0,0}, @@ -893,7 +893,7 @@ const unsigned char bitmap_hp_fixed_5_7_72 [5] = { 0x08, 0x08, 0x08, - 0x7f + 0x7f }; struct disp_font_glyph glyph_hp_fixed_5_7_72 = { {5,7,0,0}, @@ -905,7 +905,7 @@ const unsigned char bitmap_hp_fixed_5_7_73 [5] = { 0x41, 0x7f, 0x41, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_73 = { {5,7,0,0}, @@ -917,7 +917,7 @@ const unsigned char bitmap_hp_fixed_5_7_74 [5] = { 0x40, 0x40, 0x40, - 0x3f + 0x3f }; struct disp_font_glyph glyph_hp_fixed_5_7_74 = { {5,7,0,0}, @@ -929,7 +929,7 @@ const unsigned char bitmap_hp_fixed_5_7_75 [5] = { 0x08, 0x14, 0x22, - 0x41 + 0x41 }; struct disp_font_glyph glyph_hp_fixed_5_7_75 = { {5,7,0,0}, @@ -941,7 +941,7 @@ const unsigned char bitmap_hp_fixed_5_7_76 [5] = { 0x40, 0x40, 0x40, - 0x40 + 0x40 }; struct disp_font_glyph glyph_hp_fixed_5_7_76 = { {5,7,0,0}, @@ -953,7 +953,7 @@ const unsigned char bitmap_hp_fixed_5_7_77 [5] = { 0x02, 0x0c, 0x02, - 0x7f + 0x7f }; struct disp_font_glyph glyph_hp_fixed_5_7_77 = { {5,7,0,0}, @@ -965,7 +965,7 @@ const unsigned char bitmap_hp_fixed_5_7_78 [5] = { 0x04, 0x08, 0x10, - 0x7f + 0x7f }; struct disp_font_glyph glyph_hp_fixed_5_7_78 = { {5,7,0,0}, @@ -977,7 +977,7 @@ const unsigned char bitmap_hp_fixed_5_7_79 [5] = { 0x41, 0x41, 0x41, - 0x3e + 0x3e }; struct disp_font_glyph glyph_hp_fixed_5_7_79 = { {5,7,0,0}, @@ -989,7 +989,7 @@ const unsigned char bitmap_hp_fixed_5_7_80 [5] = { 0x09, 0x09, 0x09, - 0x06 + 0x06 }; struct disp_font_glyph glyph_hp_fixed_5_7_80 = { {5,7,0,0}, @@ -1001,7 +1001,7 @@ const unsigned char bitmap_hp_fixed_5_7_81 [5] = { 0x41, 0x51, 0x21, - 0x5e + 0x5e }; struct disp_font_glyph glyph_hp_fixed_5_7_81 = { {5,7,0,0}, @@ -1013,7 +1013,7 @@ const unsigned char bitmap_hp_fixed_5_7_82 [5] = { 0x09, 0x19, 0x29, - 0x46 + 0x46 }; struct disp_font_glyph glyph_hp_fixed_5_7_82 = { {5,7,0,0}, @@ -1025,7 +1025,7 @@ const unsigned char bitmap_hp_fixed_5_7_83 [5] = { 0x49, 0x49, 0x49, - 0x32 + 0x32 }; struct disp_font_glyph glyph_hp_fixed_5_7_83 = { {5,7,0,0}, @@ -1037,7 +1037,7 @@ const unsigned char bitmap_hp_fixed_5_7_84 [5] = { 0x01, 0x7f, 0x01, - 0x01 + 0x01 }; struct disp_font_glyph glyph_hp_fixed_5_7_84 = { {5,7,0,0}, @@ -1049,7 +1049,7 @@ const unsigned char bitmap_hp_fixed_5_7_85 [5] = { 0x40, 0x40, 0x40, - 0x3f + 0x3f }; struct disp_font_glyph glyph_hp_fixed_5_7_85 = { {5,7,0,0}, @@ -1061,7 +1061,7 @@ const unsigned char bitmap_hp_fixed_5_7_86 [5] = { 0x18, 0x60, 0x18, - 0x07 + 0x07 }; struct disp_font_glyph glyph_hp_fixed_5_7_86 = { {5,7,0,0}, @@ -1073,7 +1073,7 @@ const unsigned char bitmap_hp_fixed_5_7_87 [5] = { 0x20, 0x18, 0x20, - 0x7f + 0x7f }; struct disp_font_glyph glyph_hp_fixed_5_7_87 = { {5,7,0,0}, @@ -1085,7 +1085,7 @@ const unsigned char bitmap_hp_fixed_5_7_88 [5] = { 0x14, 0x08, 0x14, - 0x63 + 0x63 }; struct disp_font_glyph glyph_hp_fixed_5_7_88 = { {5,7,0,0}, @@ -1097,7 +1097,7 @@ const unsigned char bitmap_hp_fixed_5_7_89 [5] = { 0x04, 0x78, 0x04, - 0x03 + 0x03 }; struct disp_font_glyph glyph_hp_fixed_5_7_89 = { {5,7,0,0}, @@ -1109,7 +1109,7 @@ const unsigned char bitmap_hp_fixed_5_7_90 [5] = { 0x51, 0x49, 0x45, - 0x43 + 0x43 }; struct disp_font_glyph glyph_hp_fixed_5_7_90 = { {5,7,0,0}, @@ -1121,7 +1121,7 @@ const unsigned char bitmap_hp_fixed_5_7_91 [5] = { 0x00, 0x7f, 0x41, - 0x41 + 0x41 }; struct disp_font_glyph glyph_hp_fixed_5_7_91 = { {5,7,0,0}, @@ -1133,7 +1133,7 @@ const unsigned char bitmap_hp_fixed_5_7_92 [5] = { 0x04, 0x08, 0x10, - 0x20 + 0x20 }; struct disp_font_glyph glyph_hp_fixed_5_7_92 = { {5,7,0,0}, @@ -1145,7 +1145,7 @@ const unsigned char bitmap_hp_fixed_5_7_93 [5] = { 0x41, 0x7f, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_93 = { {5,7,0,0}, @@ -1157,7 +1157,7 @@ const unsigned char bitmap_hp_fixed_5_7_94 [5] = { 0x02, 0x7f, 0x02, - 0x04 + 0x04 }; struct disp_font_glyph glyph_hp_fixed_5_7_94 = { {5,7,0,0}, @@ -1169,7 +1169,7 @@ const unsigned char bitmap_hp_fixed_5_7_95 [5] = { 0x40, 0x40, 0x40, - 0x40 + 0x40 }; struct disp_font_glyph glyph_hp_fixed_5_7_95 = { {5,7,0,0}, @@ -1181,7 +1181,7 @@ const unsigned char bitmap_hp_fixed_5_7_96 [5] = { 0x07, 0x0b, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_96 = { {5,7,0,0}, @@ -1193,7 +1193,7 @@ const unsigned char bitmap_hp_fixed_5_7_97 [5] = { 0x44, 0x44, 0x3c, - 0x40 + 0x40 }; struct disp_font_glyph glyph_hp_fixed_5_7_97 = { {5,7,0,0}, @@ -1205,7 +1205,7 @@ const unsigned char bitmap_hp_fixed_5_7_98 [5] = { 0x48, 0x44, 0x44, - 0x38 + 0x38 }; struct disp_font_glyph glyph_hp_fixed_5_7_98 = { {5,7,0,0}, @@ -1217,7 +1217,7 @@ const unsigned char bitmap_hp_fixed_5_7_99 [5] = { 0x44, 0x44, 0x44, - 0x44 + 0x44 }; struct disp_font_glyph glyph_hp_fixed_5_7_99 = { {5,7,0,0}, @@ -1229,7 +1229,7 @@ const unsigned char bitmap_hp_fixed_5_7_100 [5] = { 0x44, 0x44, 0x48, - 0x7f + 0x7f }; struct disp_font_glyph glyph_hp_fixed_5_7_100 = { {5,7,0,0}, @@ -1241,7 +1241,7 @@ const unsigned char bitmap_hp_fixed_5_7_101 [5] = { 0x54, 0x54, 0x54, - 0x08 + 0x08 }; struct disp_font_glyph glyph_hp_fixed_5_7_101 = { {5,7,0,0}, @@ -1253,7 +1253,7 @@ const unsigned char bitmap_hp_fixed_5_7_102 [5] = { 0x7e, 0x09, 0x02, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_102 = { {5,7,0,0}, @@ -1265,7 +1265,7 @@ const unsigned char bitmap_hp_fixed_5_7_103 [5] = { 0x14, 0x54, 0x54, - 0x3c + 0x3c }; struct disp_font_glyph glyph_hp_fixed_5_7_103 = { {5,7,0,0}, @@ -1277,7 +1277,7 @@ const unsigned char bitmap_hp_fixed_5_7_104 [5] = { 0x08, 0x04, 0x04, - 0x78 + 0x78 }; struct disp_font_glyph glyph_hp_fixed_5_7_104 = { {5,7,0,0}, @@ -1289,7 +1289,7 @@ const unsigned char bitmap_hp_fixed_5_7_105 [5] = { 0x44, 0x7d, 0x40, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_105 = { {5,7,0,0}, @@ -1301,7 +1301,7 @@ const unsigned char bitmap_hp_fixed_5_7_106 [5] = { 0x40, 0x44, 0x3d, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_106 = { {5,7,0,0}, @@ -1313,7 +1313,7 @@ const unsigned char bitmap_hp_fixed_5_7_107 [5] = { 0x7f, 0x10, 0x28, - 0x44 + 0x44 }; struct disp_font_glyph glyph_hp_fixed_5_7_107 = { {5,7,0,0}, @@ -1325,7 +1325,7 @@ const unsigned char bitmap_hp_fixed_5_7_108 [5] = { 0x41, 0x7f, 0x40, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_108 = { {5,7,0,0}, @@ -1337,7 +1337,7 @@ const unsigned char bitmap_hp_fixed_5_7_109 [5] = { 0x04, 0x18, 0x04, - 0x78 + 0x78 }; struct disp_font_glyph glyph_hp_fixed_5_7_109 = { {5,7,0,0}, @@ -1349,7 +1349,7 @@ const unsigned char bitmap_hp_fixed_5_7_110 [5] = { 0x08, 0x04, 0x04, - 0x78 + 0x78 }; struct disp_font_glyph glyph_hp_fixed_5_7_110 = { {5,7,0,0}, @@ -1361,7 +1361,7 @@ const unsigned char bitmap_hp_fixed_5_7_111 [5] = { 0x44, 0x44, 0x44, - 0x38 + 0x38 }; struct disp_font_glyph glyph_hp_fixed_5_7_111 = { {5,7,0,0}, @@ -1373,7 +1373,7 @@ const unsigned char bitmap_hp_fixed_5_7_112 [5] = { 0x14, 0x24, 0x24, - 0x18 + 0x18 }; struct disp_font_glyph glyph_hp_fixed_5_7_112 = { {5,7,0,0}, @@ -1385,7 +1385,7 @@ const unsigned char bitmap_hp_fixed_5_7_113 [5] = { 0x24, 0x14, 0x7c, - 0x40 + 0x40 }; struct disp_font_glyph glyph_hp_fixed_5_7_113 = { {5,7,0,0}, @@ -1397,7 +1397,7 @@ const unsigned char bitmap_hp_fixed_5_7_114 [5] = { 0x7c, 0x08, 0x04, - 0x04 + 0x04 }; struct disp_font_glyph glyph_hp_fixed_5_7_114 = { {5,7,0,0}, @@ -1409,7 +1409,7 @@ const unsigned char bitmap_hp_fixed_5_7_115 [5] = { 0x54, 0x54, 0x54, - 0x20 + 0x20 }; struct disp_font_glyph glyph_hp_fixed_5_7_115 = { {5,7,0,0}, @@ -1421,7 +1421,7 @@ const unsigned char bitmap_hp_fixed_5_7_116 [5] = { 0x3e, 0x44, 0x20, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_116 = { {5,7,0,0}, @@ -1433,7 +1433,7 @@ const unsigned char bitmap_hp_fixed_5_7_117 [5] = { 0x40, 0x40, 0x20, - 0x7c + 0x7c }; struct disp_font_glyph glyph_hp_fixed_5_7_117 = { {5,7,0,0}, @@ -1445,7 +1445,7 @@ const unsigned char bitmap_hp_fixed_5_7_118 [5] = { 0x20, 0x40, 0x20, - 0x1c + 0x1c }; struct disp_font_glyph glyph_hp_fixed_5_7_118 = { {5,7,0,0}, @@ -1457,7 +1457,7 @@ const unsigned char bitmap_hp_fixed_5_7_119 [5] = { 0x40, 0x30, 0x40, - 0x3c + 0x3c }; struct disp_font_glyph glyph_hp_fixed_5_7_119 = { {5,7,0,0}, @@ -1469,7 +1469,7 @@ const unsigned char bitmap_hp_fixed_5_7_120 [5] = { 0x28, 0x10, 0x28, - 0x44 + 0x44 }; struct disp_font_glyph glyph_hp_fixed_5_7_120 = { {5,7,0,0}, @@ -1481,7 +1481,7 @@ const unsigned char bitmap_hp_fixed_5_7_121 [5] = { 0x48, 0x30, 0x08, - 0x04 + 0x04 }; struct disp_font_glyph glyph_hp_fixed_5_7_121 = { {5,7,0,0}, @@ -1493,7 +1493,7 @@ const unsigned char bitmap_hp_fixed_5_7_122 [5] = { 0x64, 0x54, 0x4c, - 0x44 + 0x44 }; struct disp_font_glyph glyph_hp_fixed_5_7_122 = { {5,7,0,0}, @@ -1505,7 +1505,7 @@ const unsigned char bitmap_hp_fixed_5_7_123 [5] = { 0x08, 0x36, 0x41, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_123 = { {5,7,0,0}, @@ -1517,7 +1517,7 @@ const unsigned char bitmap_hp_fixed_5_7_124 [5] = { 0x00, 0x77, 0x00, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_124 = { {5,7,0,0}, @@ -1529,7 +1529,7 @@ const unsigned char bitmap_hp_fixed_5_7_125 [5] = { 0x41, 0x36, 0x08, - 0x00 + 0x00 }; struct disp_font_glyph glyph_hp_fixed_5_7_125 = { {5,7,0,0}, @@ -1541,7 +1541,7 @@ const unsigned char bitmap_hp_fixed_5_7_126 [5] = { 0x04, 0x08, 0x10, - 0x08 + 0x08 }; struct disp_font_glyph glyph_hp_fixed_5_7_126 = { {5,7,0,0}, @@ -1553,7 +1553,7 @@ const unsigned char bitmap_hp_fixed_5_7_127 [5] = { 0x55, 0x2a, 0x55, - 0x2a + 0x2a }; struct disp_font_glyph glyph_hp_fixed_5_7_127 = { {5,7,0,0}, diff --git a/c/src/libchip/flash/am29lv160.c b/c/src/libchip/flash/am29lv160.c index a50de0135f..923d4d7450 100644 --- a/c/src/libchip/flash/am29lv160.c +++ b/c/src/libchip/flash/am29lv160.c @@ -99,7 +99,7 @@ rtems_am29lv160_blank (const rtems_fdisk_segment_desc* sd, offset += sd->offset + (segment - sd->segment) * sd->size; seg_8 += offset; - + count = offset & (sizeof (uint32_t) - 1); size -= count; @@ -112,12 +112,12 @@ rtems_am29lv160_blank (const rtems_fdisk_segment_desc* sd, #endif return EIO; } - + seg_32 = (volatile uint32_t*) seg_8; - - count = size / sizeof (uint32_t); + + count = size / sizeof (uint32_t); size -= count * sizeof (uint32_t); - + while (count--) if (*seg_32++ != 0xffffffff) { @@ -127,7 +127,7 @@ rtems_am29lv160_blank (const rtems_fdisk_segment_desc* sd, #endif return EIO; } - + seg_8 = (volatile uint8_t*) seg_32; while (size--) @@ -139,7 +139,7 @@ rtems_am29lv160_blank (const rtems_fdisk_segment_desc* sd, #endif return EIO; } - + return 0; } @@ -153,7 +153,7 @@ rtems_am29lv160_verify (const rtems_fdisk_segment_desc* sd, { const rtems_am29lv160_config* ac = &rtems_am29lv160_configuration[device]; const uint8_t* addr = ac->base; - + addr += (sd->offset + (segment - sd->segment) * sd->size) + offset; if (memcmp (addr, buffer, size) != 0) @@ -180,7 +180,7 @@ rtems_am29lv160_toggle_wait_8 (volatile uint8_t* status) if (((status1 ^ status2) & (1 << 6)) == 0) return 0; - + #if AM26LV160_ERROR_TRACE printf ("AM26LV160: error bit detected: %p = 0x%04x\n", status, status1); @@ -230,19 +230,19 @@ rtems_am29lv160_write_data_8 (volatile uint8_t* base, { volatile uint8_t* seg = base + offset; rtems_interrupt_level level; - + /* * Issue a reset. */ *base = 0xf0; - + while (size) { rtems_interrupt_disable (level); *(base + 0xaaa) = 0xaa; *(base + 0x555) = 0x55; *(base + 0xaaa) = 0xa0; - *seg = *data++; + *seg = *data++; rtems_interrupt_enable (level); if (rtems_am29lv160_toggle_wait_8 (seg++) != 0) return EIO; @@ -267,12 +267,12 @@ rtems_am29lv160_write_data_16 (volatile uint16_t* base, rtems_interrupt_level level; size /= 2; - + /* * Issue a reset. */ *base = 0xf0; - + while (size) { rtems_interrupt_disable (level); @@ -289,7 +289,7 @@ rtems_am29lv160_write_data_16 (volatile uint16_t* base, /* * Issue a reset. */ - *base = 0xf0; + *base = 0xf0; return 0; } @@ -375,12 +375,12 @@ rtems_am29lv160_erase (const rtems_fdisk_segment_desc* sd, { volatile uint8_t* base = ac->base; volatile uint8_t* seg = base + offset; - + /* * Issue a reset. */ rtems_interrupt_disable (level); - *base = 0xf0; + *base = 0xf0; *(base + 0xaaa) = 0xaa; *(base + 0x555) = 0x55; *(base + 0xaaa) = 0x80; @@ -388,7 +388,7 @@ rtems_am29lv160_erase (const rtems_fdisk_segment_desc* sd, *(base + 0x555) = 0x55; *seg = 0x30; rtems_interrupt_enable (level); - + ret = rtems_am29lv160_toggle_wait_8 (seg); /* @@ -413,7 +413,7 @@ rtems_am29lv160_erase (const rtems_fdisk_segment_desc* sd, *(base + 0x2aa) = 0x55; *seg = 0x30; rtems_interrupt_enable (level); - + ret = rtems_am29lv160_toggle_wait_16 (seg); /* @@ -447,7 +447,7 @@ rtems_am29lv160_erase_device (const rtems_fdisk_device_desc* dd, for (segment = 0; segment < dd->segment_count; segment++) { uint32_t seg_segment; - + for (seg_segment = 0; seg_segment < dd->segments[segment].count; seg_segment++) @@ -459,7 +459,7 @@ rtems_am29lv160_erase_device (const rtems_fdisk_device_desc* dd, return ret; } } - + return 0; } diff --git a/c/src/libchip/i2c/i2c-2b-eeprom.c b/c/src/libchip/i2c/i2c-2b-eeprom.c index 4de791284b..fa6c0205b3 100644 --- a/c/src/libchip/i2c/i2c-2b-eeprom.c +++ b/c/src/libchip/i2c/i2c-2b-eeprom.c @@ -5,19 +5,19 @@ * read operations slurp data from there... */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann , 2005, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * This software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -26,18 +26,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -46,9 +46,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #include diff --git a/c/src/libchip/i2c/i2c-2b-eeprom.h b/c/src/libchip/i2c/i2c-2b-eeprom.h index dc225963e2..1457a380b5 100644 --- a/c/src/libchip/i2c/i2c-2b-eeprom.h +++ b/c/src/libchip/i2c/i2c-2b-eeprom.h @@ -7,19 +7,19 @@ * read/write operations slurp/write data from there... */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann , 2005, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * This software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -28,18 +28,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -48,9 +48,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #include diff --git a/c/src/libchip/i2c/i2c-ds1621.c b/c/src/libchip/i2c/i2c-ds1621.c index 7665bf7134..2401763194 100644 --- a/c/src/libchip/i2c/i2c-ds1621.c +++ b/c/src/libchip/i2c/i2c-ds1621.c @@ -6,19 +6,19 @@ * Demonstrates the implementation of a i2c high-level driver. */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann , 2005, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * This software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -27,18 +27,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -47,9 +47,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #include #include diff --git a/c/src/libchip/i2c/i2c-ds1621.h b/c/src/libchip/i2c/i2c-ds1621.h index 512fd81b1e..247d762cab 100644 --- a/c/src/libchip/i2c/i2c-ds1621.h +++ b/c/src/libchip/i2c/i2c-ds1621.h @@ -8,19 +8,19 @@ * Demonstrates the implementation of a i2c high-level driver. */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann , 2005, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * This software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -29,18 +29,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -49,9 +49,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #define DS1621_CMD_READ_TEMP 0xaa #define DS1621_CMD_CSR_ACCESS 0xac diff --git a/c/src/libchip/i2c/spi-flash-m25p40.c b/c/src/libchip/i2c/spi-flash-m25p40.c index ace433db23..4114673191 100644 --- a/c/src/libchip/i2c/spi-flash-m25p40.c +++ b/c/src/libchip/i2c/spi-flash-m25p40.c @@ -38,7 +38,7 @@ static spi_memdrv_t spi_flash_m25p40_rw_drv_t = { } }; -rtems_libi2c_drv_t *spi_flash_m25p40_rw_driver_descriptor = +rtems_libi2c_drv_t *spi_flash_m25p40_rw_driver_descriptor = &spi_flash_m25p40_rw_drv_t.libi2c_drv_entry; static spi_memdrv_t spi_flash_m25p40_ro_drv_t = { @@ -56,5 +56,5 @@ static spi_memdrv_t spi_flash_m25p40_ro_drv_t = { } }; -rtems_libi2c_drv_t *spi_flash_m25p40_ro_driver_descriptor = +rtems_libi2c_drv_t *spi_flash_m25p40_ro_driver_descriptor = &spi_flash_m25p40_ro_drv_t.libi2c_drv_entry; diff --git a/c/src/libchip/i2c/spi-flash-m25p40.h b/c/src/libchip/i2c/spi-flash-m25p40.h index f653c125e0..19f905e39c 100644 --- a/c/src/libchip/i2c/spi-flash-m25p40.h +++ b/c/src/libchip/i2c/spi-flash-m25p40.h @@ -21,8 +21,8 @@ */ -#ifndef _LIBCHIP_SPI_FLASH_M25P40_H -#define _LIBCHIP_SPI_FLASH_M25P40_H +#ifndef _LIBCHIP_SPI_FLASH_M25P40_H +#define _LIBCHIP_SPI_FLASH_M25P40_H #include @@ -31,7 +31,7 @@ extern "C" { #endif /* - * pass one of these descriptor pointers to rtems_libi2c_register_drv + * pass one of these descriptor pointers to rtems_libi2c_register_drv */ extern rtems_libi2c_drv_t *spi_flash_m25p40_rw_driver_descriptor; diff --git a/c/src/libchip/i2c/spi-fram-fm25l256.c b/c/src/libchip/i2c/spi-fram-fm25l256.c index 84942c0078..30ef1e8cb2 100644 --- a/c/src/libchip/i2c/spi-fram-fm25l256.c +++ b/c/src/libchip/i2c/spi-fram-fm25l256.c @@ -38,7 +38,7 @@ static spi_memdrv_t spi_fram_fm25l256_rw_drv_t = { } }; -rtems_libi2c_drv_t *spi_fram_fm25l256_rw_driver_descriptor = +rtems_libi2c_drv_t *spi_fram_fm25l256_rw_driver_descriptor = &spi_fram_fm25l256_rw_drv_t.libi2c_drv_entry; static spi_memdrv_t spi_fram_fm25l256_ro_drv_t = { @@ -56,5 +56,5 @@ static spi_memdrv_t spi_fram_fm25l256_ro_drv_t = { } }; -rtems_libi2c_drv_t *spi_fram_fm25l256_ro_driver_descriptor = +rtems_libi2c_drv_t *spi_fram_fm25l256_ro_driver_descriptor = &spi_fram_fm25l256_ro_drv_t.libi2c_drv_entry; diff --git a/c/src/libchip/i2c/spi-fram-fm25l256.h b/c/src/libchip/i2c/spi-fram-fm25l256.h index d2287c1c14..8082c872d4 100644 --- a/c/src/libchip/i2c/spi-fram-fm25l256.h +++ b/c/src/libchip/i2c/spi-fram-fm25l256.h @@ -21,8 +21,8 @@ */ -#ifndef _LIBCHIP_SPI_FRAM_FM25L256_H -#define _LIBCHIP_SPI_FRAM_FM25L256_H +#ifndef _LIBCHIP_SPI_FRAM_FM25L256_H +#define _LIBCHIP_SPI_FRAM_FM25L256_H #include @@ -31,7 +31,7 @@ extern "C" { #endif /* - * pass one of these descriptor pointers to rtems_libi2c_register_drv + * pass one of these descriptor pointers to rtems_libi2c_register_drv */ extern rtems_libi2c_drv_t *spi_fram_fm25l256_rw_driver_descriptor; diff --git a/c/src/libchip/i2c/spi-memdrv.c b/c/src/libchip/i2c/spi-memdrv.c index b20d8ba75a..6dbb929e6a 100644 --- a/c/src/libchip/i2c/spi-memdrv.c +++ b/c/src/libchip/i2c/spi-memdrv.c @@ -162,11 +162,11 @@ rtems_status_code spi_memdrv_write rc = RTEMS_INVALID_ADDRESS; } } - while ((rc == RTEMS_SUCCESSFUL) && + while ((rc == RTEMS_SUCCESSFUL) && (cnt > bytes_sent)) { curr_cnt = cnt - bytes_sent; if ((mem_param_ptr->page_size > 0) && - (off / mem_param_ptr->page_size) != + (off / mem_param_ptr->page_size) != ((off+curr_cnt+1) / mem_param_ptr->page_size)) { curr_cnt = mem_param_ptr->page_size - (off % mem_param_ptr->page_size); } @@ -185,7 +185,7 @@ rtems_status_code spi_memdrv_write RTEMS_LIBI2C_IOCTL_SET_TFRMODE, &tfr_mode); } - + /* * address device */ @@ -369,7 +369,7 @@ rtems_status_code spi_memdrv_read } if (off >= mem_param_ptr->mem_size) { - /* + /* * HACK: beyond size of memory array? then read status register instead */ /* @@ -411,7 +411,7 @@ rtems_status_code spi_memdrv_read } } /* - * fetch read data + * fetch read data */ if (rc == RTEMS_SUCCESSFUL) { ret_cnt = rtems_libi2c_read_bytes (minor,buf,cnt); @@ -419,7 +419,7 @@ rtems_status_code spi_memdrv_read rc = -ret_cnt; } } - + /* * terminate transfer */ diff --git a/c/src/libchip/i2c/spi-memdrv.h b/c/src/libchip/i2c/spi-memdrv.h index aa6027c73b..4351e5f5cb 100644 --- a/c/src/libchip/i2c/spi-memdrv.h +++ b/c/src/libchip/i2c/spi-memdrv.h @@ -17,8 +17,8 @@ \*===============================================================*/ -#ifndef _LIBCHIP_SPI_MEMDRV_H -#define _LIBCHIP_SPI_MEMDRV_H +#ifndef _LIBCHIP_SPI_MEMDRV_H +#define _LIBCHIP_SPI_MEMDRV_H #include diff --git a/c/src/libchip/i2c/spi-sd-card.c b/c/src/libchip/i2c/spi-sd-card.c index 96c12d78de..8415e9ca52 100644 --- a/c/src/libchip/i2c/spi-sd-card.c +++ b/c/src/libchip/i2c/spi-sd-card.c @@ -674,8 +674,8 @@ static rtems_status_code sd_card_init( sd_card_driver_entry *e) * HCS (> 2G capacity). SD spec requires the correct CRC7 be sent even * when in SPI mode. So this will just change the default CRC7 and * keep it there for all subsequent commands (which just require a do - * not care CRC byte). - */ + * not care CRC byte). + */ SD_CARD_COMMAND_SET_CRC7( e->command, 0x43U); rv = sd_card_send_register_command( e, SD_CARD_CMD_SEND_IF_COND, if_cond_reg, &if_cond_reg); @@ -686,9 +686,9 @@ static rtems_status_code sd_card_init( sd_card_driver_entry *e) * fail. */ if (rv < 0) { - /* Failed CMD8, so SD 1.x or MMC */ + /* Failed CMD8, so SD 1.x or MMC */ cmd_arg = 0; - } else { + } else { cmd_arg = SD_CARD_FLAG_HCS; } @@ -729,7 +729,7 @@ static rtems_status_code sd_card_init( sd_card_driver_entry *e) } } } else { - /* + /* * Does not seem to be SD card. Do init for MMC. * First send CMD58 once to enable check for HCS * (similar to CMD8 of SD) with bits 30:29 set to 10b. @@ -763,7 +763,7 @@ static rtems_status_code sd_card_init( sd_card_driver_entry *e) RTEMS_CLEANUP_RV_SC( rv, sc, sd_card_driver_init_cleanup, "Failed to initialize MMC"); } } - + /* * Not idle? * @@ -802,14 +802,14 @@ static rtems_status_code sd_card_init( sd_card_driver_entry *e) /* * Card is MMC. Unless already proven to be not HCS (< 4.2) * must do CMD58 again to check the OCR bits 30:29. - */ + */ if (high_capacity) { uint32_t reg = 0; /* * The argument should still be correct since was never * set to 0 - */ + */ rv = sd_card_send_register_command( e, SD_CARD_CMD_READ_OCR, cmd_arg, ®); RTEMS_CLEANUP_RV_SC( rv, sc, sd_card_driver_init_cleanup, "Failed CMD58 for MMC 4.2"); @@ -906,7 +906,7 @@ static rtems_status_code sd_card_init( sd_card_driver_entry *e) /* For high capacity cards the address is in blocks */ e->block_size_shift = 0; } else if (e->block_size_shift == 10) { - /* + /* * Low capacity 2GByte cards with reported block size of 1024 * need to be set back to block size of 512 per 'Simplified * Physical Layer Specification Version 2.0' section 4.3.2. diff --git a/c/src/libchip/i2c/spi-sd-card.h b/c/src/libchip/i2c/spi-sd-card.h index 50662ff1dc..9817381c33 100644 --- a/c/src/libchip/i2c/spi-sd-card.h +++ b/c/src/libchip/i2c/spi-sd-card.h @@ -61,7 +61,7 @@ typedef struct { uint8_t command [SD_CARD_COMMAND_SIZE]; uint8_t response [SD_CARD_COMMAND_SIZE]; int response_index; - uint32_t n_ac_max; + uint32_t n_ac_max; uint32_t block_number; uint32_t block_size; uint32_t block_size_shift; diff --git a/c/src/libchip/ide/ata.c b/c/src/libchip/ide/ata.c index 2d17748a57..d243a5d4be 100644 --- a/c/src/libchip/ide/ata.c +++ b/c/src/libchip/ide/ata.c @@ -246,7 +246,7 @@ ata_io_data_request(dev_t device, rtems_blkdev_request *req) ata_printf("ata_io_data_request: type: READ: %lu, %lu cmd:%02x\n", req->bufs[0].block, req->bufnum, areq->regs.regs[IDE_REGISTER_COMMAND]); -#endif +#endif } else { @@ -256,7 +256,7 @@ ata_io_data_request(dev_t device, rtems_blkdev_request *req) ata_printf("ata_io_data_request: type: WRITE: %lu, %lu cmd:%02x\n", req->bufs[0].block, req->bufnum, areq->regs.regs[IDE_REGISTER_COMMAND]); -#endif +#endif } } @@ -302,7 +302,7 @@ ata_io_data_request(dev_t device, rtems_blkdev_request *req) /* add request to the queue of awaiting requests to the controller */ ata_add_to_controller_queue(ctrl_minor, areq); - + return RTEMS_SUCCESSFUL; } @@ -447,7 +447,7 @@ ata_process_request(rtems_device_minor_number ctrl_minor) uint8_t i, dev; uint16_t val; ISR_Level level; - + /* if no requests to controller then do nothing */ if (rtems_chain_is_empty(&ata_ide_ctrls[ctrl_minor].reqs)) return; @@ -481,7 +481,7 @@ ata_process_request(rtems_device_minor_number ctrl_minor) #if ATA_DEBUG ata_printf("ata_process_request: type: %d\n", areq->type); #endif - + /* continue to execute ATA protocols depending on type of request */ if (areq->type == ATA_COMMAND_TYPE_PIO_OUT) { @@ -553,19 +553,19 @@ ata_request_done(ata_req_t *areq, rtems_device_minor_number ctrl_minor, #if ATA_DEBUG ata_printf("ata_request_done: entry\n"); #endif - + ATA_EXEC_CALLBACK(areq, status, error); rtems_chain_extract(&areq->link); - + if (!rtems_chain_is_empty(&ata_ide_ctrls[ctrl_minor].reqs)) { free(areq); ata_process_request(ctrl_minor); return; } - + free(areq); - + #if ATA_DEBUG ata_printf("ata_request_done: exit\n"); #endif @@ -591,7 +591,7 @@ ata_non_data_request_done(ata_req_t *areq, #if ATA_DEBUG ata_printf("ata_non_data_request_done: entry\n"); #endif - + areq->status = status; areq->error = error; rtems_semaphore_release(areq->sema); @@ -613,9 +613,9 @@ ata_add_to_controller_queue(rtems_device_minor_number ctrl_minor, ata_req_t *areq) { PREEMPTION_KEY(key); - + DISABLE_PREEMPTION(key); - + rtems_chain_append(&ata_ide_ctrls[ctrl_minor].reqs, &areq->link); if (rtems_chain_has_only_one_node(&ata_ide_ctrls[ctrl_minor].reqs)) { @@ -781,7 +781,7 @@ ata_pio_in_protocol(rtems_device_minor_number ctrl_minor, ata_req_t *areq) ccbuf = areq->cbuf - ccbuf; areq->cnt -= ccbuf; } - + if (areq->cnt == 0) { ata_request_done(areq, ctrl_minor, RTEMS_SUCCESSFUL, RTEMS_SUCCESSFUL); @@ -816,7 +816,7 @@ ata_pio_out_protocol(rtems_device_minor_number ctrl_minor, ata_req_t *areq) #if ATA_DEBUG ata_printf("ata_pio_out_protocol:\n"); #endif - + dev = areq->regs.regs[IDE_REGISTER_DEVICE_HEAD] & IDE_REGISTER_DEVICE_HEAD_DEV; @@ -871,15 +871,15 @@ ata_queue_task(rtems_task_argument arg) uint16_t val1; rtems_status_code rc; ISR_Level level; - + PREEMPTION_KEY(key); DISABLE_PREEMPTION(key); - + while (1) { ENABLE_PREEMPTION(key); - + /* get event which has happend */ rc = rtems_message_queue_receive(ata_queue_id, &msg, &size, RTEMS_WAIT, RTEMS_NO_TIMEOUT); @@ -890,12 +890,12 @@ ata_queue_task(rtems_task_argument arg) ctrl_minor = msg.ctrl_minor; DISABLE_PREEMPTION(key); - + /* get current request to the controller */ _ISR_Disable(level); areq = (ata_req_t *)(ata_ide_ctrls[ctrl_minor].reqs.first); _ISR_Enable(level); - + switch(msg.type) { case ATA_MSG_PROCESS_NEXT_EVT: @@ -1012,7 +1012,7 @@ ata_ioctl(rtems_disk_device *dd, uint32_t cmd, void *argp) dev_t device = rtems_disk_physical_device_number(dd); rtems_status_code status; rtems_device_minor_number rel_minor; - + rel_minor = (rtems_filesystem_dev_minor_t(device)) / ATA_MINOR_NUM_RESERVED_PER_ATA_DEVICE; @@ -1040,7 +1040,7 @@ ata_ioctl(rtems_disk_device *dd, uint32_t cmd, void *argp) *((uint32_t*) argp) = RTEMS_BLKDEV_CAP_MULTISECTOR_CONT; status = RTEMS_SUCCESSFUL; break; - + default: return rtems_blkdev_ioctl (dd, cmd, argp); break; @@ -1108,7 +1108,7 @@ rtems_ata_initialize(rtems_device_major_number major, return status; #endif #endif - + /* create queue for asynchronous requests handling */ status = rtems_message_queue_create( rtems_build_name('A', 'T', 'A', 'Q'), @@ -1128,7 +1128,7 @@ rtems_ata_initialize(rtems_device_major_number major, */ status = rtems_task_create( rtems_build_name ('A', 'T', 'A', 'T'), - ((rtems_ata_driver_task_priority > 0) + ((rtems_ata_driver_task_priority > 0) ? rtems_ata_driver_task_priority : ATA_DRIVER_TASK_DEFAULT_PRIORITY), ATA_DRIVER_TASK_STACK_SIZE, @@ -1362,7 +1362,7 @@ rtems_ata_initialize(rtems_device_major_number major, ATA_DEV_INFO(ctrl_minor, 0).present = true; ATA_DEV_INFO(ctrl_minor,1).present = true; } - + /* for each found ATA device obtain it configuration */ for (dev = 0; dev < 2; dev++) if (ATA_DEV_INFO(ctrl_minor, dev).present) @@ -1405,7 +1405,7 @@ rtems_ata_initialize(rtems_device_major_number major, CF_LE_W(buffer[ATA_IDENT_WORD_NUM_OF_CURR_LOG_HEADS]); ATA_DEV_INFO(ctrl_minor, dev).sectors = CF_LE_W(buffer[ATA_IDENT_WORD_NUM_OF_CURR_LOG_SECS]); - ATA_DEV_INFO(ctrl_minor, dev).lba_sectors = + ATA_DEV_INFO(ctrl_minor, dev).lba_sectors = CF_LE_W(buffer[ATA_IDENT_WORD_NUM_OF_USR_SECS1]); ATA_DEV_INFO(ctrl_minor, dev).lba_sectors <<= 16; ATA_DEV_INFO(ctrl_minor, dev).lba_sectors += CF_LE_W(buffer[ATA_IDENT_WORD_NUM_OF_USR_SECS0]); @@ -1498,7 +1498,7 @@ ata_process_request_on_init_phase(rtems_device_minor_number ctrl_minor, uint8_t i, dev; uint16_t val, val1; volatile unsigned retries; - + assert(areq); dev = areq->regs.regs[IDE_REGISTER_DEVICE_HEAD] & diff --git a/c/src/libchip/ide/ide_controller.c b/c/src/libchip/ide/ide_controller.c index 2afad248f1..5b8a841829 100644 --- a/c/src/libchip/ide/ide_controller.c +++ b/c/src/libchip/ide/ide_controller.c @@ -60,7 +60,7 @@ ide_controller_initialize(rtems_device_major_number major, if ((IDE_Controller_Table[minor].probe == NULL || IDE_Controller_Table[minor].probe(minor)) && - (IDE_Controller_Table[minor].fns->ctrl_probe == NULL || + (IDE_Controller_Table[minor].fns->ctrl_probe == NULL || IDE_Controller_Table[minor].fns->ctrl_probe(minor))) { status = rtems_io_register_name(IDE_Controller_Table[minor].name, diff --git a/c/src/libchip/ide/ide_ctrl_cfg.h b/c/src/libchip/ide/ide_ctrl_cfg.h index 276cac9ec5..d7865698f9 100644 --- a/c/src/libchip/ide/ide_ctrl_cfg.h +++ b/c/src/libchip/ide/ide_ctrl_cfg.h @@ -1,7 +1,7 @@ /* * ide_ctrl_cfg.h * - * LibChip library IDE controller header file - structures used for + * LibChip library IDE controller header file - structures used for * configuration and plugin interface definition. * * Copyright (C) 2002 OKTET Ltd., St.-Petersburg, Russia diff --git a/c/src/libchip/network/elnk.c b/c/src/libchip/network/elnk.c index eb323d484f..b3fd3a4c80 100644 --- a/c/src/libchip/network/elnk.c +++ b/c/src/libchip/network/elnk.c @@ -1248,7 +1248,7 @@ xl_mii_writereg( static int xl_miibus_readreg( struct elnk_softc *sc, - int phy, + int phy, int reg ) { struct xl_mii_frame frame; @@ -1278,8 +1278,8 @@ xl_miibus_readreg( static int xl_miibus_writereg( struct elnk_softc *sc, - int phy, - int reg, + int phy, + int reg, int data ) { struct xl_mii_frame frame; @@ -2657,7 +2657,7 @@ elnk_init (void *arg) xl_miibus_writereg(sc, 0x18, MII_ANAR, ANAR_10 | ANAR_TX | ANAR_10_FD | ANAR_TX_FD ); /* ANAR_T4 */ xl_miibus_writereg(sc, 0x18, MII_BMCR, BMCR_STARTNEG | BMCR_AUTOEN ); - for (i=0; ((sr = xl_miibus_readreg(sc, 0x18, MII_BMSR)) & BMSR_ACOMP) == 0 && i < 20; i++) + for (i=0; ((sr = xl_miibus_readreg(sc, 0x18, MII_BMSR)) & BMSR_ACOMP) == 0 && i < 20; i++) DELAY(10000); } diff --git a/c/src/libchip/network/greth.c b/c/src/libchip/network/greth.c index 2e48233958..de0a9988f8 100644 --- a/c/src/libchip/network/greth.c +++ b/c/src/libchip/network/greth.c @@ -114,13 +114,13 @@ struct greth_softc { struct arpcom arpcom; - + greth_regs *regs; - + int acceptBroadcast; rtems_id rxDaemonTid; rtems_id txDaemonTid; - + unsigned int tx_ptr; unsigned int tx_dptr; unsigned int tx_cnt; @@ -132,7 +132,7 @@ struct greth_softc struct mbuf **rxmbuf; struct mbuf **txmbuf; rtems_vector_number vector; - + /*Status*/ struct phy_device_info phydev; int fd; @@ -141,20 +141,20 @@ struct greth_softc int gbit_mac; int auto_neg; unsigned int auto_neg_time; - + /* * Statistics */ unsigned long rxInterrupts; - + unsigned long rxPackets; unsigned long rxLengthError; unsigned long rxNonOctet; unsigned long rxBadCRC; unsigned long rxOverrun; - + unsigned long txInterrupts; - + unsigned long txDeferred; unsigned long txHeartbeat; unsigned long txLateCollision; @@ -180,10 +180,10 @@ greth_interrupt_handler (rtems_vector_number v) { uint32_t status; /* read and clear interrupt cause */ - + status = greth.regs->status; greth.regs->status = status; - + /* Frame received? */ if (status & (GRETH_STATUS_RXERR | GRETH_STATUS_RXIRQ)) { @@ -225,7 +225,7 @@ static void write_mii(uint32_t phy_addr, uint32_t reg_addr, uint32_t data) while (greth.regs->mdio_ctrl & GRETH_MDIO_BUSY) {} } -static void print_init_info(struct greth_softc *sc) +static void print_init_info(struct greth_softc *sc) { printf("greth: driver attached\n"); printf("**** PHY ****\n"); @@ -270,7 +270,7 @@ greth_initialize_hardware (struct greth_softc *sc) greth_regs *regs; regs = sc->regs; - + /* Reset the controller. */ greth.rxInterrupts = 0; greth.rxPackets = 0; @@ -278,23 +278,23 @@ greth_initialize_hardware (struct greth_softc *sc) regs->ctrl = 0; regs->ctrl = GRETH_CTRL_RST; /* Reset ON */ regs->ctrl = 0; /* Reset OFF */ - + /* Check if mac is gbit capable*/ - sc->gbit_mac = (regs->ctrl >> 27) & 1; - + sc->gbit_mac = (regs->ctrl >> 27) & 1; + /* Get the phy address which assumed to have been set correctly with the reset value in hardware*/ phyaddr = (regs->mdio_ctrl >> 11) & 0x1F; /* get phy control register default values */ while ((phyctrl = read_mii(phyaddr, 0)) & 0x8000) {} - + /* reset PHY and wait for completion */ write_mii(phyaddr, 0, 0x8000 | phyctrl); while ((read_mii(phyaddr, 0)) & 0x8000) {} - - /* Check if PHY is autoneg capable and then determine operating mode, + + /* Check if PHY is autoneg capable and then determine operating mode, otherwise force it to 10 Mbit halfduplex */ sc->gb = 0; sc->fd = 0; @@ -374,9 +374,9 @@ auto_neg_done: sc->phydev.device = 0; sc->phydev.rev = 0; phystatus = read_mii(phyaddr, 1); - + /*Read out PHY info if extended registers are available */ - if (phystatus & 1) { + if (phystatus & 1) { tmp1 = read_mii(phyaddr, 2); tmp2 = read_mii(phyaddr, 3); @@ -418,7 +418,7 @@ auto_neg_done: sc->rx_ptr = 0; regs->txdesc = (int) sc->txdesc; regs->rxdesc = (int) sc->rxdesc; - + sc->rxmbuf = calloc(sc->rxbufs, sizeof(*sc->rxmbuf)); sc->txmbuf = calloc(sc->txbufs, sizeof(*sc->txmbuf)); @@ -450,9 +450,9 @@ auto_neg_done: sc->rxdesc[sc->rxbufs - 1].ctrl |= GRETH_RXD_WRAP; /* set ethernet address. */ - regs->mac_addr_msb = + regs->mac_addr_msb = sc->arpcom.ac_enaddr[0] << 8 | sc->arpcom.ac_enaddr[1]; - regs->mac_addr_lsb = + regs->mac_addr_lsb = sc->arpcom.ac_enaddr[2] << 24 | sc->arpcom.ac_enaddr[3] << 16 | sc->arpcom.ac_enaddr[4] << 8 | sc->arpcom.ac_enaddr[5]; @@ -481,13 +481,13 @@ greth_rxDaemon (void *arg) struct mbuf *m; unsigned int len, len_status, bad; rtems_event_set events; - + for (;;) { rtems_bsdnet_event_receive (INTERRUPT_EVENT, RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &events); - + #ifdef GRETH_ETH_DEBUG printf ("r\n"); #endif @@ -562,7 +562,7 @@ greth_rxDaemon (void *arg) dp->rx_ptr = (dp->rx_ptr + 1) % dp->rxbufs; } } - + } static int inside = 0; @@ -573,7 +573,7 @@ sendpacket (struct ifnet *ifp, struct mbuf *m) unsigned char *temp; struct mbuf *n; unsigned int len; - + /*printf("Send packet entered\n");*/ if (inside) printf ("error: sendpacket re-entered!!\n"); inside = 1; @@ -614,16 +614,16 @@ sendpacket (struct ifnet *ifp, struct mbuf *m) if ((m = m->m_next) == NULL) break; } - + m_freem (n); - + /* don't send long packets */ if (len <= GRETH_MAXBUF_LEN) { if (dp->tx_ptr < dp->txbufs-1) { dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_ENABLE | len; } else { - dp->txdesc[dp->tx_ptr].ctrl = + dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_WRAP | GRETH_TXD_ENABLE | len; } dp->regs->ctrl = dp->regs->ctrl | GRETH_CTRL_TXEN; @@ -645,7 +645,7 @@ sendpacket_gbit (struct ifnet *ifp, struct mbuf *m) /* * Waiting for Transmitter ready */ - + len = 0; #ifdef GRETH_DEBUG printf("TXD: 0x%08x\n", (int) m->m_data); @@ -674,17 +674,17 @@ sendpacket_gbit (struct ifnet *ifp, struct mbuf *m) if (dp->tx_ptr < dp->txbufs-1) { if ((m->m_next) == NULL) { dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_ENABLE | GRETH_TXD_CS | m->m_len; - break; + break; } else { dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_ENABLE | GRETH_TXD_MORE | GRETH_TXD_CS | m->m_len; } } else { if ((m->m_next) == NULL) { - dp->txdesc[dp->tx_ptr].ctrl = + dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_WRAP | GRETH_TXD_ENABLE | GRETH_TXD_CS | m->m_len; break; } else { - dp->txdesc[dp->tx_ptr].ctrl = + dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_WRAP | GRETH_TXD_ENABLE | GRETH_TXD_MORE | GRETH_TXD_CS | m->m_len; } } @@ -692,7 +692,7 @@ sendpacket_gbit (struct ifnet *ifp, struct mbuf *m) dp->tx_ptr = (dp->tx_ptr + 1) % dp->txbufs; dp->tx_cnt++; m = m->m_next; - + } dp->txmbuf[dp->tx_ptr] = m; dp->tx_cnt++; @@ -711,25 +711,25 @@ greth_txDaemon (void *arg) struct ifnet *ifp = &sc->arpcom.ac_if; struct mbuf *m; rtems_event_set events; - + for (;;) { /* * Wait for packet */ - + rtems_bsdnet_event_receive (START_TRANSMIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &events); #ifdef GRETH_DEBUG printf ("t\n"); #endif - + /* * Send packets till queue is empty */ - - + + for (;;) { /* @@ -754,20 +754,20 @@ greth_txDaemon_gbit (void *arg) struct ifnet *ifp = &sc->arpcom.ac_if; struct mbuf *m; rtems_event_set events; - + for (;;) { /* * Wait for packet */ - + rtems_bsdnet_event_receive (START_TRANSMIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &events); #ifdef GRETH_DEBUG printf ("t\n"); #endif - + /* * Send packets till queue is empty */ @@ -795,10 +795,10 @@ static void greth_start (struct ifnet *ifp) { struct greth_softc *sc = ifp->if_softc; - + ifp->if_flags |= IFF_OACTIVE; rtems_event_send (sc->txDaemonTid, START_TRANSMIT_EVENT); - + } /* @@ -830,7 +830,7 @@ greth_init (void *arg) sc->txDaemonTid = rtems_bsdnet_newproc ("DCtx", 4096, greth_txDaemon, sc); } - + } /* @@ -963,7 +963,7 @@ rtems_greth_driver_attach (struct rtems_bsdnet_ifconfig *config, sc->vector = chip->vector; sc->txbufs = chip->txd_count; sc->rxbufs = chip->rxd_count; - + /* * Set up network interface values */ diff --git a/c/src/libchip/network/greth.h b/c/src/libchip/network/greth.h index b9dab7bcb6..222a9efbc2 100644 --- a/c/src/libchip/network/greth.h +++ b/c/src/libchip/network/greth.h @@ -37,8 +37,8 @@ typedef struct _greth_regs { #define GRETH_TOTAL_BD 128 #define GRETH_MAXBUF_LEN 1520 - -/* Tx BD */ + +/* Tx BD */ #define GRETH_TXD_ENABLE 0x0800 /* Tx BD Enable */ #define GRETH_TXD_WRAP 0x1000 /* Tx BD Wrap (last BD) */ #define GRETH_TXD_IRQ 0x2000 /* Tx BD IRQ Enable */ @@ -58,13 +58,13 @@ typedef struct _greth_regs { #define GRETH_TXD_CS (GRETH_TXD_IPCS | \ GRETH_TXD_TCPCS | \ GRETH_TXD_UDPCS) - -/* Rx BD */ + +/* Rx BD */ #define GRETH_RXD_ENABLE 0x0800 /* Rx BD Enable */ #define GRETH_RXD_WRAP 0x1000 /* Rx BD Wrap (last BD) */ #define GRETH_RXD_IRQ 0x2000 /* Rx BD IRQ Enable */ -#define GRETH_RXD_DRIBBLE 0x4000 /* Rx BD Dribble Nibble Status */ +#define GRETH_RXD_DRIBBLE 0x4000 /* Rx BD Dribble Nibble Status */ #define GRETH_RXD_TOOLONG 0x8000 /* Rx BD Too Long Status */ #define GRETH_RXD_CRCERR 0x10000 /* Rx BD CRC Error Status */ #define GRETH_RXD_OVERRUN 0x20000 /* Rx BD Overrun Status */ @@ -131,12 +131,12 @@ int rtems_greth_driver_attach ( ); /* PHY data */ -struct phy_device_info +struct phy_device_info { int vendor; int device; int rev; - + int adv; int part; diff --git a/c/src/libchip/network/if_dc.c b/c/src/libchip/network/if_dc.c index 80f7c4924c..bdd1d8874f 100644 --- a/c/src/libchip/network/if_dc.c +++ b/c/src/libchip/network/if_dc.c @@ -2,10 +2,10 @@ * * Ported from FreeBSD --> RTEMS, december 03. * Daron Chabot - * -- only tested with i386 bsp. + * -- only tested with i386 bsp. * -- supports *one* card (until the PCI & IRQ APIs get sorted out ;-)) * - * + * * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * @@ -112,7 +112,7 @@ #define DRIVER_SUPPORTED #warning The if_dc driver is untested on the PPC platform !!! #endif - + #if defined(DRIVER_SUPPORTED) /* this covers the file "globally"... */ #include @@ -135,7 +135,7 @@ #include #include #include - + /* moved to cpukit/include/rtems in CVS current ! */ /*#include "if_media.h" */ /*#include "pci.h" */ @@ -151,10 +151,10 @@ #if defined(__i386__) #define vtophys(p) (u_int32_t)(p) -#else +#else #define vtophys(p) vtophys(p) #endif - + /* #include #include @@ -179,17 +179,17 @@ #include #endif -/* NOTE: use mem space mapping (for now ...) +/* NOTE: use mem space mapping (for now ...) #define DC_USEIOSPACE */ - + #ifdef __alpha__ #define SRM_MEDIA #endif #include - + #include "if_dcreg.h" @@ -205,15 +205,15 @@ static struct dc_softc dc_softc_devs[NDRIVER]; #include "miibus_if.h" - + #ifndef lint static const char rcsid[] = "$FreeBSD: src/sys/pci/if_dc.c,v 1.9.2.41 2003/03/05 18:42:33 njl Exp $"; #endif #endif - - + + /* * Various supported device vendors/types and their names. * NOTE: @@ -417,8 +417,8 @@ DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, 0, 0); /* XXX Fixme: rtems_bsp_delay( ) for the pc386 BSP (at least) * needs work... see pc386/include/bsp.h. - * I have "a" solution, utilizing the 2nd i8254 timer, - * if anyone is interested (first timer is used for clock_tick ISR)... + * I have "a" solution, utilizing the 2nd i8254 timer, + * if anyone is interested (first timer is used for clock_tick ISR)... */ #ifdef __i386__ extern void Wait_X_ms( unsigned int ); @@ -754,7 +754,7 @@ static void dc_mii_send(sc, bits, cnt) static int dc_mii_readreg(sc, frame) struct dc_softc *sc; struct dc_mii_frame *frame; - + { int i, ack, s; @@ -766,7 +766,7 @@ static int dc_mii_readreg(sc, frame) frame->mii_opcode = DC_MII_READOP; frame->mii_turnaround = 0; frame->mii_data = 0; - + /* * Sync the PHYs. */ @@ -824,7 +824,7 @@ fail: static int dc_mii_writereg(sc, frame) struct dc_softc *sc; struct dc_mii_frame *frame; - + { int s; @@ -838,7 +838,7 @@ static int dc_mii_writereg(sc, frame) /* * Sync the PHYs. - */ + */ dc_mii_sync(sc); dc_mii_send(sc, frame->mii_stdelim, 2); @@ -1227,7 +1227,7 @@ void dc_setfilt_21143(sc) sp[h >> 4] |= 1 << (h & 0xF); } #endif - + if (ifp->if_flags & IFF_BROADCAST) { h = dc_crc_le(sc, (caddr_t)ðerbroadcastaddr); sp[h >> 4] |= 1 << (h & 0xF); @@ -1332,7 +1332,7 @@ void dc_setfilt_asix(sc) CSR_WRITE_4(sc, DC_AX_FILTIDX, DC_AX_FILTIDX_PAR0); ac_enaddr = (u_int32_t *)&sc->arpcom.ac_enaddr[0]; CSR_WRITE_4(sc, DC_AX_FILTDATA, *ac_enaddr); - + CSR_WRITE_4(sc, DC_AX_FILTIDX, DC_AX_FILTIDX_PAR1); ac_enaddr = (u_int32_t *)&sc->arpcom.ac_enaddr[4]; @@ -1546,7 +1546,7 @@ static void dc_setcfg(sc, media) DC_CLRBIT(sc, DC_NETCFG, DC_NETCFG_PORTSEL); } } -#endif +#endif if ((media & IFM_GMASK) == IFM_FDX) { DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_FULLDUPLEX); @@ -1615,7 +1615,7 @@ struct dc_type *dc_devtype( int unitnum ) uint32_t rev; int rc; - + t = dc_devs; while(t->dc_name != NULL) { @@ -1627,7 +1627,7 @@ struct dc_type *dc_devtype( int unitnum ) pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\ DC_PCI_CFRV, &rev); rev &= 0xFF; - + if (t->dc_did == DC_DEVICEID_98713 && rev >= DC_REVISION_98713A) t++; @@ -1901,7 +1901,7 @@ decISON(const rtems_irq_connect_data* irq) { return (BSP_irq_enabled_at_i8259s(irq->name)); } - + /* * Attach the interface. Allocate softc structures, do ifmedia @@ -1910,12 +1910,12 @@ decISON(const rtems_irq_connect_data* irq) int rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) { - int rc; + int rc; u_char eaddr[ETHER_ADDR_LEN]; - + char *unitName; int unitNumber; - + uint32_t command; struct dc_softc *sc; struct ifnet *ifp; @@ -1923,7 +1923,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) uint32_t revision; int error = 0, mac_offset; uint32_t value; - + /* * Get the instance number for the board we're going to configure * from the user. @@ -1947,11 +1947,11 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) return (0); } memset(sc, 0, sizeof(struct dc_softc)); - + /*unit = device_get_unit(dev);*/ sc->dc_unit = unitNumber; sc->dc_name = unitName; - + /* * Handle power management nonsense. * @@ -1965,7 +1965,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) } t = sc->dc_info; - + /* * Map control/status registers. */ @@ -2014,20 +2014,20 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\ DC_PCI_CFBMA, &value); sc->membase = value; - + /* Allocate interrupt */ memset(&sc->irqInfo, 0, sizeof(rtems_irq_connect_data)); /*pcib_conf_read32(sig, DC_PCI_CFIT, &value); */ pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\ DC_PCI_CFIT, &value); - + sc->irqInfo.name = value & 0xFF; sc->irqInfo.hdl = (rtems_irq_hdl)dc_intr; sc->irqInfo.handle = (void *)sc; /* new parameter */ sc->irqInfo.on = nop; sc->irqInfo.off = nop; sc->irqInfo.isOn = decISON; - + #ifdef BSP_SHARED_HANDLER_SUPPORT rc = BSP_install_rtems_shared_irq_handler( &sc->irqInfo ); #else @@ -2036,8 +2036,8 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) if(!rc) { rtems_panic("Can't install dec2114x irq handler.\n"); } - - + + #if 0 rid = 0; sc->dc_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, @@ -2061,7 +2061,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) } #endif - + /* Need this info to decide on a chip type. sc->dc_info = dc_devtype(dev); */ @@ -2203,8 +2203,8 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) pci_write_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\ DC_PCI_CFDD, command); } - - + + /* * Try to learn something about the supported media. * We know that ASIX and ADMtek and Davicom devices @@ -2268,7 +2268,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) sc->dc_ldata = malloc(sizeof(struct dc_list_data), M_DEVBUF, M_NOWAIT); - + if (sc->dc_ldata == NULL) { printk("dc%d: no memory for list buffers!\n", sc->dc_unit); if (sc->dc_pnic_rx_buf != NULL) @@ -2283,7 +2283,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) } bzero(sc->dc_ldata, sizeof(struct dc_list_data)); - + ifp = &sc->arpcom.ac_if; ifp->if_softc = sc; ifp->if_unit = unitNumber; /*sc->dc_unit;*/ @@ -2347,7 +2347,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) goto fail; } #endif - + /* * Call MI attach routine. */ @@ -2382,16 +2382,16 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) command = pci_read_config(dev, DC_PCI_CFDD, 4); command &= ~(DC_CFDD_SNOOZE_MODE|DC_CFDD_SLEEP_MODE); switch ((command >> 8) & 0xff) { - case 3: + case 3: sc->dc_srm_media = IFM_10_T; break; - case 4: + case 4: sc->dc_srm_media = IFM_10_T | IFM_FDX; break; - case 5: + case 5: sc->dc_srm_media = IFM_100_TX; break; - case 6: + case 6: sc->dc_srm_media = IFM_100_TX | IFM_FDX; break; } @@ -2663,7 +2663,7 @@ static void dc_pnic_rx_bug_war(sc, idx) * frame reception. */ dc_newbuf(sc, i, m); - bcopy(ptr, mtod(m, char *), total_len); + bcopy(ptr, mtod(m, char *), total_len); cur_rx->dc_status = rxstat | DC_RXSTAT_FIRSTFRAG; return; @@ -2759,7 +2759,7 @@ static void dc_rxeof(sc) * comes up in the ring. However, don't report long * frames as errors since they could be vlans */ - if ((rxstat & DC_RXSTAT_RXERR)){ + if ((rxstat & DC_RXSTAT_RXERR)){ if (!(rxstat & DC_RXSTAT_GIANT) || (rxstat & (DC_RXSTAT_CRCERR | DC_RXSTAT_DRIBBLE | DC_RXSTAT_MIIERE | DC_RXSTAT_COLLSEEN | @@ -2778,7 +2778,7 @@ static void dc_rxeof(sc) } } - /* No errors; receive the packet. */ + /* No errors; receive the packet. */ total_len -= ETHER_CRC_LEN; #ifdef __i386__ @@ -3168,10 +3168,10 @@ dc_daemon(void * arg) RTEMS_WAIT | RTEMS_EVENT_ANY, \ RTEMS_NO_TIMEOUT, &events); - - + + ifp = &sc->arpcom.ac_if; - + while((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS) { CSR_WRITE_4(sc, DC_ISR, status); @@ -3434,10 +3434,10 @@ static void dc_init(xsc) break; case 16: DC_SETBIT(sc, DC_BUSCTL, DC_CACHEALIGN_16LONG); - break; + break; case 8: DC_SETBIT(sc, DC_BUSCTL, DC_CACHEALIGN_8LONG); - break; + break; case 0: default: DC_SETBIT(sc, DC_BUSCTL, DC_CACHEALIGN_NONE); @@ -3523,7 +3523,7 @@ static void dc_init(xsc) */ if (sc->dc_flags & DC_TULIP_LEDS) { CSR_WRITE_4(sc, DC_WATCHDOG, - DC_WDOG_CTLWREN|DC_WDOG_LINK|DC_WDOG_ACTIVITY); + DC_WDOG_CTLWREN|DC_WDOG_LINK|DC_WDOG_ACTIVITY); CSR_WRITE_4(sc, DC_WATCHDOG, 0); } @@ -3563,7 +3563,7 @@ static void dc_init(xsc) struct ifreq ifr; ifr.ifr_media = sc->dc_srm_media; - ifmedia_ioctl(ifp, &ifr, &mii->mii_media, SIOCSIFMEDIA); + ifmedia_ioctl(ifp, &ifr, &mii->mii_media, SIOCSIFMEDIA); sc->dc_srm_media = 0; } #endif diff --git a/c/src/libchip/network/if_dcreg.h b/c/src/libchip/network/if_dcreg.h index 6bff0ada0f..07395c1884 100644 --- a/c/src/libchip/network/if_dcreg.h +++ b/c/src/libchip/network/if_dcreg.h @@ -535,7 +535,7 @@ struct dc_mii_frame { /* * Special ASIX-specific bits in the ASIX NETCFG register (CSR6). */ -#define DC_AX_NETCFG_RX_BROAD 0x00000100 +#define DC_AX_NETCFG_RX_BROAD 0x00000100 /* * RX Filter Index Register values @@ -627,7 +627,7 @@ struct dc_mii_frame { DC_SETBIT(sc, DC_PN_GPIO, ((r) << 4)); \ DC_CLRBIT(sc, DC_PN_GPIO, (r)); \ } - + /* shortcut MII access register */ #define DC_PN_MII_DATA 0x0000FFFF #define DC_PN_MII_RESERVER 0x00020000 @@ -706,7 +706,7 @@ struct dc_softc { u_int32_t dc_flags; u_int32_t dc_txthresh; u_int8_t *dc_srom; - struct dc_mediainfo *dc_mi; + struct dc_mediainfo *dc_mi; /* struct callout_handle dc_stat_ch; */ @@ -820,7 +820,7 @@ struct dc_softc { #define DC_REVISION_82C168 0x10 #define DC_REVISION_82C169 0x20 -/* +/* * Lite-On PNIC II device ID. Note: this is actually a Macronix 98715A * with wake on lan/magic packet support. */ diff --git a/c/src/libchip/network/open_eth.c b/c/src/libchip/network/open_eth.c index 3844be978d..97c0e5b8fe 100644 --- a/c/src/libchip/network/open_eth.c +++ b/c/src/libchip/network/open_eth.c @@ -243,7 +243,7 @@ open_eth_initialize_hardware (struct open_eth_softc *sc) if (!sc->en100MHz) mii_cr = 0; write_mii(0, mii_cr | 0x8000); while (read_mii(0) & 0x8000) {} - if (!sc->en100MHz) write_mii(0, 0); + if (!sc->en100MHz) write_mii(0, 0); mii_cr = read_mii(0); printf("open_eth: driver attached, PHY config : 0x%04" PRIx32 "\n", read_mii(0)); diff --git a/c/src/libchip/network/smc91111.c b/c/src/libchip/network/smc91111.c index a3fc177b7c..d959386463 100644 --- a/c/src/libchip/network/smc91111.c +++ b/c/src/libchip/network/smc91111.c @@ -47,13 +47,13 @@ 2 for added data IO output: get_reg, put_reg 4 for packet allocation/free output 8 for only startup status, so we can tell we're installed OK - 16 dump phy read/write + 16 dump phy read/write 32 precise register dump 64 dump packets */ /*#define DEBUG (-1)*/ /*#define DEBUG (-1 & ~(16))*/ -#define DEBUG (0) +#define DEBUG (0) #include "smc91111config.h" #include @@ -569,7 +569,7 @@ static void sendpacket(struct ifnet *ifp, struct mbuf *m) CYG_ASSERT(sdata, "!No sg data pointer here"); - /* start on an odd offset? + /* start on an odd offset? * If last byte also (1byte mbuf with different pointer should not occur) * let following code handle it */ @@ -579,7 +579,7 @@ static void sendpacket(struct ifnet *ifp, struct mbuf *m) odd = ~odd; len--; } - + /* speed up copying a bit, never copy last word */ while(len >= 17){ put_data(cpd, *(sdata)); @@ -593,13 +593,13 @@ static void sendpacket(struct ifnet *ifp, struct mbuf *m) sdata += 8; len -= 16; } - + /* copy word wise, skip last word */ while (len >= 3) { put_data(cpd, *sdata++); len -= sizeof(*sdata); } - + /* one or two bytes left to put into fifo */ if ( len > 1 ){ /* the last 2bytes */ @@ -1637,7 +1637,7 @@ void lan91cxx_print_bank(int bank){ regno=i+bank<<3; regval[i] = get_reg(cpd, regno); } - printk("---- BANK %d ----\n\r",bank); + printk("---- BANK %d ----\n\r",bank); for(i=0; i<8; i++){ printk("0x%x: 0x%x\n\r",i,regval[i]); } diff --git a/c/src/libchip/network/smc91111.h b/c/src/libchip/network/smc91111.h index b29de003c4..bc41f49222 100644 --- a/c/src/libchip/network/smc91111.h +++ b/c/src/libchip/network/smc91111.h @@ -356,13 +356,13 @@ typedef struct lan91cxx_priv_data { rtems_id txDaemonTid; scmv91111_configuration_t config; - + /* backend */ int rpc_cur_mode; int autoneg_active; int phyaddr; unsigned int lastPhy18; - + int txbusy; /* A packet has been sent*/ unsigned long txkey; /* Used to ack when packet sent*/ unsigned short* base; /* Base I/O address of controller*/ @@ -395,42 +395,42 @@ typedef struct _debug_regs_pair { } debug_regs_pair; static debug_regs_pair debug_regs[] = { - {LAN91CXX_TCR , "LAN91CXX_TCR" ,0}, - {LAN91CXX_EPH_STATUS , "LAN91CXX_EPH_STATUS",0}, - {LAN91CXX_RCR , "LAN91CXX_RCR" ,0}, - {LAN91CXX_COUNTER , "LAN91CXX_COUNTER" ,0}, - {LAN91CXX_MIR , "LAN91CXX_MIR" ,0}, - {LAN91CXX_MCR , "LAN91CXX_MCR" ,0}, - {LAN91CXX_RPCR , "LAN91CXX_RPCR" ,0}, - {LAN91CXX_RESERVED_0 , "LAN91CXX_RESERVED_0",0}, - {LAN91CXX_BS , "LAN91CXX_BS" ,0}, - {LAN91CXX_CONFIG , "LAN91CXX_CONFIG" ,0}, - {LAN91CXX_BASE_REG , "LAN91CXX_BASE_REG" ,0}, - {LAN91CXX_IA01 , "LAN91CXX_IA01" ,0}, - {LAN91CXX_IA23 , "LAN91CXX_IA23" ,0}, - {LAN91CXX_IA45 , "LAN91CXX_IA45" ,0}, - {LAN91CXX_GENERAL , "LAN91CXX_GENERAL" ,0}, - {LAN91CXX_CONTROL , "LAN91CXX_CONTROL" ,0}, - {LAN91CXX_BS2 , "LAN91CXX_BS2" ,0}, - {LAN91CXX_MMU_COMMAND, "LAN91CXX_MMU_COMMAND",0}, - {LAN91CXX_PNR , "LAN91CXX_PNR" ,0}, - {LAN91CXX_FIFO_PORTS , "LAN91CXX_FIFO_PORTS" ,0}, - {LAN91CXX_POINTER , "LAN91CXX_POINTER" ,0}, - {LAN91CXX_DATA_HIGH , "LAN91CXX_DATA_HIGH" ,0}, - {LAN91CXX_DATA , "LAN91CXX_DATA" ,0}, + {LAN91CXX_TCR , "LAN91CXX_TCR" ,0}, + {LAN91CXX_EPH_STATUS , "LAN91CXX_EPH_STATUS",0}, + {LAN91CXX_RCR , "LAN91CXX_RCR" ,0}, + {LAN91CXX_COUNTER , "LAN91CXX_COUNTER" ,0}, + {LAN91CXX_MIR , "LAN91CXX_MIR" ,0}, + {LAN91CXX_MCR , "LAN91CXX_MCR" ,0}, + {LAN91CXX_RPCR , "LAN91CXX_RPCR" ,0}, + {LAN91CXX_RESERVED_0 , "LAN91CXX_RESERVED_0",0}, + {LAN91CXX_BS , "LAN91CXX_BS" ,0}, + {LAN91CXX_CONFIG , "LAN91CXX_CONFIG" ,0}, + {LAN91CXX_BASE_REG , "LAN91CXX_BASE_REG" ,0}, + {LAN91CXX_IA01 , "LAN91CXX_IA01" ,0}, + {LAN91CXX_IA23 , "LAN91CXX_IA23" ,0}, + {LAN91CXX_IA45 , "LAN91CXX_IA45" ,0}, + {LAN91CXX_GENERAL , "LAN91CXX_GENERAL" ,0}, + {LAN91CXX_CONTROL , "LAN91CXX_CONTROL" ,0}, + {LAN91CXX_BS2 , "LAN91CXX_BS2" ,0}, + {LAN91CXX_MMU_COMMAND, "LAN91CXX_MMU_COMMAND",0}, + {LAN91CXX_PNR , "LAN91CXX_PNR" ,0}, + {LAN91CXX_FIFO_PORTS , "LAN91CXX_FIFO_PORTS" ,0}, + {LAN91CXX_POINTER , "LAN91CXX_POINTER" ,0}, + {LAN91CXX_DATA_HIGH , "LAN91CXX_DATA_HIGH" ,0}, + {LAN91CXX_DATA , "LAN91CXX_DATA" ,0}, {LAN91CXX_INTERRUPT , "LAN91CXX_INTERRUPT" ,0}, {LAN91CXX_BS3 , "LAN91CXX_BS3" ,0}, {LAN91CXX_MT01 , "LAN91CXX_MT01" ,0}, - {LAN91CXX_MT23 , "LAN91CXX_MT23" ,0}, - {LAN91CXX_MT45 , "LAN91CXX_MT45" ,0}, + {LAN91CXX_MT23 , "LAN91CXX_MT23" ,0}, + {LAN91CXX_MT45 , "LAN91CXX_MT45" ,0}, {LAN91CXX_MT67 , "LAN91CXX_MT67" ,0}, /*{LAN91CXX_MGMT , "LAN91CXX_MGMT" ,0}, */ - {LAN91CXX_REVISION , "LAN91CXX_REVISION" ,0}, - {LAN91CXX_ERCV , "LAN91CXX_ERCV" ,0}, - {LAN91CXX_BS4 , "LAN91CXX_BS4" ,0}, + {LAN91CXX_REVISION , "LAN91CXX_REVISION" ,0}, + {LAN91CXX_ERCV , "LAN91CXX_ERCV" ,0}, + {LAN91CXX_BS4 , "LAN91CXX_BS4" ,0}, + - {-1,0} }; @@ -448,7 +448,7 @@ get_reg(struct lan91cxx_priv_data *cpd, int regno) HAL_WRITE_UINT16(cpd->base+(LAN91CXX_BS), CYG_CPU_TO_LE16(regno>>3)); HAL_READ_UINT16(cpd->base+((regno&0x7)), val); val = CYG_LE16_TO_CPU(val); - + /*rtems_interrupt_enable(Irql);*/ #ifdef DEBUG & 32 @@ -462,7 +462,7 @@ get_reg(struct lan91cxx_priv_data *cpd, int regno) #else db2_printf("%sread reg %d:%x -> 0x%04x\n", dbg_prefix, regno>>3,(regno&0x7)*2, val); #endif - + return val; } #endif /* SMSC_PLATFORM_DEFINED_GET_REG*/ @@ -485,12 +485,12 @@ put_reg(struct lan91cxx_priv_data *cpd, int regno, unsigned short val) #else db2_printf("%swrite reg %d:%x <- 0x%04x\n", dbg_prefix, regno>>3,(regno&0x7)*2, val); #endif - + /*rtems_interrupt_disable(Irql);*/ - + HAL_WRITE_UINT16(cpd->base+(LAN91CXX_BS), CYG_CPU_TO_LE16(regno>>3)); HAL_WRITE_UINT16(cpd->base+((regno&0x7)), CYG_CPU_TO_LE16(val)); - + /*rtems_interrupt_enable(Irql);*/ } @@ -503,7 +503,7 @@ static __inline__ void put_data(struct lan91cxx_priv_data *cpd, unsigned short val) { db2_printf("%s[wdata] <- 0x%04x\n", dbg_prefix, val); - + HAL_WRITE_UINT16(cpd->base+((LAN91CXX_DATA & 0x7)), val); } @@ -513,7 +513,7 @@ static __inline__ void put_data8(struct lan91cxx_priv_data *cpd, unsigned char val) { db2_printf("%s[bdata] <- 0x%02x\n", dbg_prefix, val); - + HAL_WRITE_UINT8(((unsigned char *)(cpd->base+((LAN91CXX_DATA & 0x7))))+1, val); } @@ -526,7 +526,7 @@ static __inline__ rxd_t get_data(struct lan91cxx_priv_data *cpd) { rxd_t val; - + #ifdef LAN91CXX_32BIT_RX HAL_READ_UINT32(cpd->base+((LAN91CXX_DATA_HIGH & 0x7)), val); #else @@ -545,7 +545,7 @@ static __inline__ unsigned short get_banksel(struct lan91cxx_priv_data *cpd) { unsigned short val; - + HAL_READ_UINT16(cpd->base+(LAN91CXX_BS), val); val = CYG_LE16_TO_CPU(val); db2_printf("read bank sel val 0x%04x\n", val); diff --git a/c/src/libchip/rtc/ds1375-rtc.h b/c/src/libchip/rtc/ds1375-rtc.h index 98d44b4916..ea50e576d8 100644 --- a/c/src/libchip/rtc/ds1375-rtc.h +++ b/c/src/libchip/rtc/ds1375-rtc.h @@ -4,20 +4,20 @@ /* Driver for the Maxim 1375 i2c RTC (TOD only; very simple...) */ -/* +/* * Authorship * ---------- * This software was created by * * Till Straumann , 2005-2007, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * The software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -26,18 +26,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -46,9 +46,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #include #include diff --git a/c/src/libchip/rtc/ds1375.c b/c/src/libchip/rtc/ds1375.c index 2a63c47755..4946e9a9df 100644 --- a/c/src/libchip/rtc/ds1375.c +++ b/c/src/libchip/rtc/ds1375.c @@ -2,20 +2,20 @@ /* Driver for the Maxim 1375 i2c RTC (TOD only; very simple...) */ -/* +/* * Authorship * ---------- * This software was created by * * Till Straumann , 2005-2007, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * The software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -24,18 +24,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -44,9 +44,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ /* This driver uses the file-system interface to the i2c bus */ @@ -78,7 +78,7 @@ printk(fmt,args); \ } \ } while (0) - + STATIC uint8_t ds1375_bcd2bin(uint8_t x) { @@ -190,7 +190,7 @@ STATIC int wr_bytes( * the chip interprets the first byte after START as * the register pointer. */ - + d[0] = off; memcpy( d + 1, buf, len ); @@ -290,7 +290,7 @@ STATIC int ds1375_set_time( buf[DS1375_DAY_OFF] = tm.tm_wday + 1; buf[DS1375_DAT_OFF] = ds1375_bin2bcd( time->day ); buf[DS1375_MON_OFF] = ds1375_bin2bcd( time->month ); - + if ( time->year >= 2000 ) { buf[DS1375_YR_OFF] = ds1375_bin2bcd( time->year - 2000 ); buf[DS1375_MON_OFF] |= DS1375_MON_CTRY; @@ -323,7 +323,7 @@ STATIC int ds1375_set_time( goto cleanup; rval = 0; - + cleanup: if ( fd >= 0 ) { if ( ! ( DS1375_CR_ECLK & cr ) ) { @@ -352,8 +352,8 @@ ds1375_get_time_tst() { rtems_time_of_day rtod; time_t secs; - - ds1375_get_time( 0, &rtod ); + + ds1375_get_time( 0, &rtod ); secs = _TOD_To_seconds( &rtod ); printf( "%s\n", ctime( &secs ) ); return secs; @@ -374,7 +374,7 @@ rtems_time_of_day rt; if ( ! prt ) prt = &rt; - + secs = mktime( &tm ); /* convert to UTC */ @@ -417,7 +417,7 @@ rtc_ds1375_set_register( uint32_t port, uint8_t reg, uint32_t value ) { int fd; uint8_t v = value; - + if ( ( fd = open( (const char*)port, O_RDWR ) ) >= 0 ) { wr_bytes( fd, reg, &v, 1 ); close( fd ); diff --git a/c/src/libchip/rtc/mc146818a.c b/c/src/libchip/rtc/mc146818a.c index 4cd933e86f..de11c49654 100644 --- a/c/src/libchip/rtc/mc146818a.c +++ b/c/src/libchip/rtc/mc146818a.c @@ -1,5 +1,5 @@ /* - * This file interfaces with the real-time clock found in + * This file interfaces with the real-time clock found in * a Motorola MC146818A (common on PC hardware) * * Year 2K Notes: @@ -99,7 +99,7 @@ int mc146818a_get_time( while (((*getReg)( mc146818a, MC146818A_STATUSA ) & MC146818ASA_TUP) != 0) { rtems_interrupt_flash( level ); } - + /* * Read the time (we have at least 244 usec to do this) */ @@ -150,7 +150,7 @@ int mc146818a_set_time( * Stop the RTC */ (*setReg)( mc146818a, MC146818A_STATUSB, MC146818ASB_HALT|MC146818ASB_24HR ); - + if ( time->year >= 2088 ) rtems_fatal_error_occurred( RTEMS_INVALID_NUMBER ); @@ -160,7 +160,7 @@ int mc146818a_set_time( (*setReg)( mc146818a, MC146818A_HRS, To_BCD(time->hour) ); (*setReg)( mc146818a, MC146818A_MIN, To_BCD(time->minute) ); (*setReg)( mc146818a, MC146818A_SEC, To_BCD(time->second) ); - + /* * Restart the RTC */ diff --git a/c/src/libchip/rtc/mc146818a.h b/c/src/libchip/rtc/mc146818a.h index e631708e43..6af8fc2d04 100644 --- a/c/src/libchip/rtc/mc146818a.h +++ b/c/src/libchip/rtc/mc146818a.h @@ -43,7 +43,7 @@ #define MC146818A_STATUSD 0x0d /* status register D */ #define MC146818ASD_PWR 0x80 /* clock lost power */ - + /* * Driver function table */ diff --git a/c/src/libchip/serial/ns16550.c b/c/src/libchip/serial/ns16550.c index 5997280e84..a50d245224 100644 --- a/c/src/libchip/serial/ns16550.c +++ b/c/src/libchip/serial/ns16550.c @@ -19,7 +19,7 @@ * * This driver uses the termios pseudo driver. */ - + /* * $Id$ */ diff --git a/c/src/libchip/shmdr/poll.c b/c/src/libchip/shmdr/poll.c index 1190a53854..aec9cfe7ff 100644 --- a/c/src/libchip/shmdr/poll.c +++ b/c/src/libchip/shmdr/poll.c @@ -49,7 +49,7 @@ void Shm_install_timer(void) status = rtems_timer_create( rtems_build_name( 'S', 'H', 'P', 'L' ), &id ); assert( !status ); - + status = rtems_timer_fire_after( id, 1, Shm_Poll_TSR, NULL ); assert( !status ); } -- cgit v1.2.3