diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-11-01 15:44:30 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-11-01 15:44:30 +0000 |
commit | d37f6cb1f3cac35b1f7f7373062fddb638707570 (patch) | |
tree | e81bc626c722cd995fae688f8605a23e5db1aecc /os/various/chrtclib.h | |
parent | 96f976382d7b94911dac7bea9477b3e2bc560408 (diff) | |
download | ChibiOS-d37f6cb1f3cac35b1f7f7373062fddb638707570.tar.gz ChibiOS-d37f6cb1f3cac35b1f7f7373062fddb638707570.tar.bz2 ChibiOS-d37f6cb1f3cac35b1f7f7373062fddb638707570.zip |
RTCv1. Time converstion functions moved to rtc.c(h). Chrtclib deleted.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7443 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various/chrtclib.h')
-rw-r--r-- | os/various/chrtclib.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/os/various/chrtclib.h b/os/various/chrtclib.h deleted file mode 100644 index ad9b4c706..000000000 --- a/os/various/chrtclib.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - ChibiOS - Copyright (C) 2014 Uladzimir Pylinsky aka barthess - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _CHRTCLIB_H_ -#define _CHRTCLIB_H_ - -#include <time.h> -#include <stdint.h> - -/** - * @file chrtclib.h - * @brief Time conversion routines. - * - * @addtogroup chrtclib - * @{ - */ - -/** - * @brief Type of a structure representing an RTC date/time stamp. - */ -typedef struct { - uint32_t year: 8; /**< @brief Years since 1980. */ - uint32_t month: 4; /**< @brief Months 1..12. */ - uint32_t dstflag: 1; /**< @brief DST correction flag. */ - uint32_t dayofweek: 3; /**< @brief Day of week 1..7. */ - uint32_t day: 5; /**< @brief Day of the month 1..31. */ - uint32_t millisecond: 27; /**< @brief Milliseconds since midnight.*/ -} RTCDateTime; - -#ifdef __cplusplus -extern "C" { -#endif - uint32_t rtcConvertDateTimeToFAT(const RTCDateTime *timespec); - void rtcConvertDateTimeToStructTm(const RTCDateTime *timespec, - struct tm *timp); - void rtcConvertStructTmToDateTime(const struct tm *timp, - uint32_t tv_msec, - RTCDateTime *timespec); -#ifdef __cplusplus -} -#endif - - -#endif /* _CHRTCLIB_H_ */ - -/** @} */ |