diff options
Diffstat (limited to 'c/src/lib/libbsp/arm/nds/rtc/rtc.c')
-rw-r--r-- | c/src/lib/libbsp/arm/nds/rtc/rtc.c | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/c/src/lib/libbsp/arm/nds/rtc/rtc.c b/c/src/lib/libbsp/arm/nds/rtc/rtc.c deleted file mode 100644 index da0f23263d..0000000000 --- a/c/src/lib/libbsp/arm/nds/rtc/rtc.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * RTEMS for Nintendo DS realtime clock driver. - */ - -/* - * Copyright (c) 2008 by Cedric Gestes <ctaf42@gmail.com> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * - * http://www.rtems.org/license/LICENSE - */ - -#include <rtems.h> -#include <libchip/rtc.h> -#include <bsp.h> -#include <nds.h> - -rtems_device_minor_number RTC_Minor; -size_t RTC_Count = 1; - -/* - * probe for a rtc. we always claim to have one. - */ -static bool -nds_rtc_probe (int minor) -{ - return true; -} - -/* - * initialize the nds rtc. - */ -static void -nds_rtc_init (int minor) -{ - /* nothing to do here (already done in the arm7 main) */ - printk ("[+] rtc started\n"); -} - -/* - * read current time from nds real-time clock chip and convert it - * to the rtems_time_of_day structure. - */ -static int -nds_rtc_get_time (int minor, rtems_time_of_day * time) -{ - time->year = 2000 + IPC->time.rtc.year; - time->month = IPC->time.rtc.month; - time->day = IPC->time.rtc.day; - time->hour = IPC->time.rtc.hours; - time->minute = IPC->time.rtc.minutes; - time->second = IPC->time.rtc.seconds; - time->ticks = 0; - - return 0; -} - -/* - * set time to the arm7 nds rtc. - * NOTE: this is not supported. - */ -static int -nds_rtc_set_time (int minor, const rtems_time_of_day * time) -{ - return -1; -} - -/* - * driver function table. - */ -rtc_fns nds_rtc_fns = { - nds_rtc_init, - nds_rtc_get_time, - nds_rtc_set_time -}; - -/* - * the following table configures the RTC drivers used in this BSP - */ - -rtc_tbl RTC_Table[] = { - { - "/dev/rtc", /* sDeviceName */ - RTC_CUSTOM, /* deviceType */ - &nds_rtc_fns, /* pDeviceFns */ - nds_rtc_probe, /* deviceProbe */ - NULL, /* pDeviceParams */ - 0, /* ulCtrlPort1 */ - 0, /* ulDataPort */ - NULL, /* getRegister */ - NULL /* setRegister */ - } -}; |