diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-11-30 03:49:08 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-11-30 03:49:08 +0000 |
commit | 3495c57d11b6e39e2c8f8c9deb53a0b7b3a7b596 (patch) | |
tree | 50a66b31574167e158722ffb56e25c2ea9deb011 /c/src/libchip/rtc | |
parent | Whitespace removal. (diff) | |
download | rtems-3495c57d11b6e39e2c8f8c9deb53a0b7b3a7b596.tar.bz2 |
Whitespace removal.
Diffstat (limited to 'c/src/libchip/rtc')
-rw-r--r-- | c/src/libchip/rtc/ds1375-rtc.h | 18 | ||||
-rw-r--r-- | c/src/libchip/rtc/ds1375.c | 34 | ||||
-rw-r--r-- | c/src/libchip/rtc/mc146818a.c | 8 | ||||
-rw-r--r-- | c/src/libchip/rtc/mc146818a.h | 2 |
4 files changed, 31 insertions, 31 deletions
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 <strauman@slac.stanford.edu>, 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 <rtems.h> #include <libchip/rtc.h> 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 <strauman@slac.stanford.edu>, 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 */ |