The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
11:1c1ebd0324fa
Parent:
10:fcb9359f0959
Child:
12:f63353af7be8
--- a/rtc.h	Thu May 14 14:44:00 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/* mbed Microcontroller Library - rtc
- * Copyright (c) 2008, sford
- */
- 
-#ifndef MBED_RTC_TIME_H
-#define MBED_RTC_TIME_H
-
-#include <time.h>
-
-using namespace std;
-
-#ifdef __ARMCC_VERSION
-
-typedef unsigned long clockid_t;
-struct timespec {
-    time_t tv_sec;
-    long tv_nsec;
-};
-#define CLOCK_REALTIME (clockid_t)1
-
-#endif
-
-/* Section: rtc
- *  Functions for manipulating the RTC (real-time clock).
- */
-
-extern "C" {
-
-namespace std {
-
-/* Function: time
- *  Returns the number of seconds since the epoch (00:00:00 UTC,
- *  January 1, 1970), and also stores the return value in the address
- *  pointed to by timer if it is non-NULL.
- */
-time_t time(time_t *timer);
-
-/* Function: stime
- *  Sets the current time, measured in seconds since the epoch, using
- *  the value pointed to by timer.
- */
-void stime(const time_t *timer);
-
-}
-
-/* Function: time_str
- *  Returns a pointer to a string representing the current time
- *  in human readable form, as generated by ctime()
- */
-char *time_str();
-
-
-/* Function: set_time
- *  Sets the current time, specifying year through to day
- */
-void set_time(int year, int month, int day, int hour, int minute, int second);
-
-/* Function: clock_settime
- *  Sets the time of the clock specified by clock_id, which must be
- *  CLOCK_REALTIME, according to the value of *tp.
- */
-int clock_settime(clockid_t clock_id, const struct timespec *tp);
-
-/* Function: clock_gettime
- *  Sets *tp to be the current time of the clock specified by
- *  clock_id, which must be CLOCK_REALTIME.
- */
-int clock_gettime(clockid_t clock_id, struct timespec *tp);
-
-/* Function: clock_getres
- *  Sets *tp to be the resolution of the clock specified by clock_id,
- *  which must be CLOCK_REALTIME.
- */
-int clock_getres(clockid_t clock_id, struct timespec *tp);
-
-/* Function: create_time
- *  A convenience function for constructing a time_t value.
- */
-time_t create_time(int year, int month, int day, int hour, int minute, int second);
-
-}
-
-#endif
-