diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-21 10:43:04 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-21 10:43:04 +0000 |
commit | 6128a4aa5e791ed4e0a655bfd346a52d92da7883 (patch) | |
tree | af53ca3f67ce405b6fbc6c98399c8e0c87e01a9e /c/src/lib/libbsp/i386/pc386/clock | |
parent | 2004-04-20 Ralf Corsepius <ralf_corsepius@rtems.org> (diff) | |
download | rtems-6128a4aa5e791ed4e0a655bfd346a52d92da7883.tar.bz2 |
Remove stray white spaces.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/clock')
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/clock/ckinit.c | 24 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/clock/rtc.c | 22 |
2 files changed, 23 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c index 9fa7acbd33..a1b1899dc9 100644 --- a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c +++ b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c @@ -64,7 +64,7 @@ rtems_device_minor_number rtems_clock_minor; | Description: Interrupt Service Routine for clock (0h) interruption. | Global Variables: Clock_driver_ticks, Clock_isrs. | Arguments: vector - standard RTEMS argument - see documentation. -| Returns: standard return value - see documentation. +| Returns: standard return value - see documentation. +--------------------------------------------------------------------------*/ static void clockIsr() { @@ -99,7 +99,7 @@ static void clockIsr() | not really necessary, since there will be a reset at exit. | Global Variables: None. | Arguments: None. -| Returns: Nothing. +| Returns: Nothing. +--------------------------------------------------------------------------*/ void clockOff(const rtems_irq_connect_data* unused) { @@ -115,7 +115,7 @@ void clockOff(const rtems_irq_connect_data* unused) | Description: Initialize and install clock interrupt handler. | Global Variables: None. | Arguments: None. -| Returns: Nothing. +| Returns: Nothing. +--------------------------------------------------------------------------*/ static void clockOn(const rtems_irq_connect_data* unused) { @@ -162,9 +162,9 @@ static void clockOn(const rtems_irq_connect_data* unused) outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN); outport_byte(TIMER_CNTR0, count >> 0 & 0xff); outport_byte(TIMER_CNTR0, count >> 8 & 0xff); - } + } -} +} int clockIsOn(const rtems_irq_connect_data* unused) { @@ -176,8 +176,8 @@ static rtems_irq_connect_data clockIrqData = {BSP_PERIODIC_TIMER, clockOn, clockOff, clockIsOn}; - - + + /*-------------------------------------------------------------------------+ | Clock device driver INITIALIZE entry point. @@ -195,14 +195,14 @@ Clock_initialize(rtems_device_major_number major, rtems_fatal_error_occurred(1); } /* make major/minor avail to others such as shared memory driver */ - + rtems_clock_major = major; rtems_clock_minor = minor; - + return RTEMS_SUCCESSFUL; } /* Clock_initialize */ - + /*-------------------------------------------------------------------------+ | Console device driver CONTROL entry point +--------------------------------------------------------------------------*/ @@ -214,12 +214,12 @@ Clock_control(rtems_device_major_number major, if (pargp != NULL) { rtems_libio_ioctl_args_t *args = pargp; - + /*-------------------------------------------------------------------------+ | This is hokey, but until we get a defined interface to do this, it will | just be this simple... +-------------------------------------------------------------------------*/ - + if (args->command == rtems_build_name('I', 'S', 'R', ' ')) clockIsr(); else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) diff --git a/c/src/lib/libbsp/i386/pc386/clock/rtc.c b/c/src/lib/libbsp/i386/pc386/clock/rtc.c index 401220bf6d..26c4c2056d 100644 --- a/c/src/lib/libbsp/i386/pc386/clock/rtc.c +++ b/c/src/lib/libbsp/i386/pc386/clock/rtc.c @@ -79,9 +79,9 @@ | Description: Convert 2 digit number to its BCD representation. | Global Variables: None. | Arguments: i - Number to convert. -| Returns: BCD representation of number. +| Returns: BCD representation of number. +--------------------------------------------------------------------------*/ -static inline uint8_t +static inline uint8_t bcd(uint8_t i) { return ((i / 16) * 10 + (i % 16)); @@ -99,9 +99,9 @@ bcd(uint8_t i) | Description: Convert years to seconds (since 1970). | Global Variables: None. | Arguments: y - year to convert (1970 <= y <= 2100). -| Returns: number of seconds since 1970. +| Returns: number of seconds since 1970. +--------------------------------------------------------------------------*/ -static inline uint32_t +static inline uint32_t ytos(uint16_t y) { /* v NUM LEAP YEARS v */ return ((y - 1970) * SECS_PER_REG_YEAR + (y - 1970 + 1) / 4 * SECS_PER_DAY); @@ -113,9 +113,9 @@ ytos(uint16_t y) | Description: Convert months to seconds since January. | Global Variables: None. | Arguments: m - month to convert, leap - is this a month of a leap year. -| Returns: number of seconds since January. +| Returns: number of seconds since January. +--------------------------------------------------------------------------*/ -static inline uint32_t +static inline uint32_t mtos(uint8_t m, rtems_boolean leap) { static uint16_t daysMonth[] = { 0, 0, 31, 59, 90, 120, 151, 181, @@ -132,9 +132,9 @@ mtos(uint8_t m, rtems_boolean leap) | Description: Perform action on RTC and return its result. | Global Variables: None. | Arguments: what - what to write to RTC port (what to do). -| Returns: result received from RTC port after action performed. +| Returns: result received from RTC port after action performed. +--------------------------------------------------------------------------*/ -static inline uint8_t +static inline uint8_t rtcin(uint8_t what) { uint8_t r; @@ -153,7 +153,7 @@ rtcin(uint8_t what) | Description: Initialize real-time clock (RTC). | Global Variables: None. | Arguments: None. -| Returns: Nothing. +| Returns: Nothing. +--------------------------------------------------------------------------*/ void init_rtc(void) @@ -181,7 +181,7 @@ init_rtc(void) | Description: Read present time from RTC and return it. | Global Variables: None. | Arguments: tod - to return present time in 'rtems_time_of_day' format. -| Returns: number of seconds from 1970/01/01 corresponding to 'tod'. +| Returns: number of seconds from 1970/01/01 corresponding to 'tod'. +--------------------------------------------------------------------------*/ long int rtc_read(rtems_time_of_day *tod) @@ -201,7 +201,7 @@ rtc_read(rtems_time_of_day *tod) sa = rtcin(RTC_STATUSA); tod->year = bcd(rtcin(RTC_YEAR)) + 1900; /* year */ - if (tod->year < 1970) tod->year += 100; + if (tod->year < 1970) tod->year += 100; tod->month = bcd(rtcin(RTC_MONTH)); /* month */ tod->day = bcd(rtcin(RTC_DAY)); /* day */ (void) bcd(rtcin(RTC_WDAY)); /* weekday */ |