summaryrefslogtreecommitdiff
path: root/firmware/common/timefuncs.c
AgeCommit message (Collapse)Author
2011-03-08Return -1 for not implemented RTC functions.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29546 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2009-10-18Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with ↵Bertrik Sikken
current_time, instead of comparing them directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
2009-09-26FS#10569 RTC driver cleanupNils Wallménius
Change the RTC drivers so that the rtc_(read|write)_datetime functions now deal directly with the tm struct instead of passing a string of bcd digits to/from (set|get)_time . This simplifies drivers for rtc's that do not use a bcd representation internally and cleans up some target specific code and #ifdefs in generic code. Implement simple stubs for the sim to avoid #ifdefing for that too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22839 a1c6a512-1295-4272-9138-f99709370657
2009-08-11Move yearday_to_daymonth() to usb_storage.c. It's the only user, this ↵Frank Gevaerts
function is pretty specific, and it seems to be the cleanest way to avoid ram usage increases for unrelated targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22259 a1c6a512-1295-4272-9138-f99709370657
2009-08-11Consolidate day of week calculationFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22258 a1c6a512-1295-4272-9138-f99709370657
2009-08-11rework new time handling functions a bit to be more memory efficientFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22257 a1c6a512-1295-4272-9138-f99709370657
2009-08-11Add support for setting the clock using a special SCSI command. This is the ↵Frank Gevaerts
same method that itunes uses, and there are host-side tools for it (e.g. libgpod) Flyspray: FS#10514 Author: Laurent Papier and myself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22255 a1c6a512-1295-4272-9138-f99709370657
2009-06-29Fix yellow introduced in r21561Alexander Levin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21563 a1c6a512-1295-4272-9138-f99709370657
2009-06-29Make the get_time on non-RTC sims behave like target, i.e. always return a ↵Alexander Levin
constant time (FS#10390) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21561 a1c6a512-1295-4272-9138-f99709370657
2009-02-13Onda VX747:Maurus Cuelenaere
* Add preliminary keymap * Split up generic MIPS stuff from Ingenic specific * Make apps/ compilable * Add SD driver * Fix RTC driver * Add debug screen * Other cleanups/rewrites/fixes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19993 a1c6a512-1295-4272-9138-f99709370657
2008-07-15Onda VX747:Maurus Cuelenaere
1) Improve touchscreen handling 2) Add RTC driver 4) Add NAND Flash ID scanning 3) Other minor fixes Nand_ID: Add a generic NAND ID database (currently only containg Samsung chips) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18052 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-04-15Fixed FS#7849Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17123 a1c6a512-1295-4272-9138-f99709370657
2007-07-14FS#7353 - mktime() is only used by targets that have an RTCRobert Keevil
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13883 a1c6a512-1295-4272-9138-f99709370657
2007-03-16Set CONFIG_RTC to 0 for non-RTC targets, and check with #if to profit from ↵Jens Arnold
-Wundef. No code change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12811 a1c6a512-1295-4272-9138-f99709370657
2007-03-03remove runtime detection of h1x0 series RTC MOD, but leave driver codeRobert Kukla
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12554 a1c6a512-1295-4272-9138-f99709370657
2007-02-28FS#6419 - driver for H1x0 series RTC Mod with runtime detectionRobert Kukla
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12520 a1c6a512-1295-4272-9138-f99709370657
2006-10-19Patch #5166 by Robert Keevil - Last.fm loggingLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11269 a1c6a512-1295-4272-9138-f99709370657
2006-03-10Iriver firmware compatibility kludge: RTC year offset. The offset is chosen ↵Jens Arnold
in a way to make leap years work correctly in rockbox; the original firmware will still be one year off but doesn't reset the date anymore. [We don't want to wait until 2016 ;-) ] git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8991 a1c6a512-1295-4272-9138-f99709370657
2006-03-09Improve ipod i2c driver somewhat by at least taking advantage of the ↵Brandon Low
in-device addressing in the pcf50605, also switch to a 10bit resistive divider for the ipod battery reading, this is easily configurable if it needs changing, or even to become a user/runtime setting git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8980 a1c6a512-1295-4272-9138-f99709370657
2006-03-07Fix red builds (with frustration)Brandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8941 a1c6a512-1295-4272-9138-f99709370657
2006-03-06Make seconds flow evenly and further throttle RTC reads solution partially ↵Brandon Low
thanks to amiconn git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8938 a1c6a512-1295-4272-9138-f99709370657
2006-03-05Make the RTC read throttling work, thanks to herz42 on ircBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8926 a1c6a512-1295-4272-9138-f99709370657
2006-03-05Fix some yellow buildsBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8913 a1c6a512-1295-4272-9138-f99709370657
2006-03-05Move the RTC read throttling to a smarter placeBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8912 a1c6a512-1295-4272-9138-f99709370657
2005-12-11Reworking of Archos RTC code to create a (slightly) more abstract RTC apiDave Chapman
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8216 a1c6a512-1295-4272-9138-f99709370657
2005-12-04Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC ↵Dave Chapman
defines from config-*.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
2005-02-18Unified build system to use SOURCES for sim builds too, a single Makefile-lookDaniel Stenberg
made by configure and various related adjustments. This has not yet been tested on cygwin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6001 a1c6a512-1295-4272-9138-f99709370657
2004-08-17 Const policed pointer arguments to functions, part 2Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4996 a1c6a512-1295-4272-9138-f99709370657
2004-04-25valid_time() now handles tm_wday correctlyLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4555 a1c6a512-1295-4272-9138-f99709370657
2004-04-20Reworked the time get/set functionsLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4522 a1c6a512-1295-4272-9138-f99709370657
2003-01-27tm_mon starts at 0Björn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3173 a1c6a512-1295-4272-9138-f99709370657
2003-01-27Corrected get_time(). This should fix the bad file date bug. Also changed ↵Björn Stenberg
status.c to use get_time() instead of reading directly from RTC. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3170 a1c6a512-1295-4272-9138-f99709370657
2002-11-24Killed a warningLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2882 a1c6a512-1295-4272-9138-f99709370657
2002-11-24Removed debug outputLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2880 a1c6a512-1295-4272-9138-f99709370657
2002-11-20Now uses timefuncs.h instead of time.hLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2868 a1c6a512-1295-4272-9138-f99709370657
2002-11-20Only Recorders have RTCLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2864 a1c6a512-1295-4272-9138-f99709370657
2002-11-20New time functionsLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2861 a1c6a512-1295-4272-9138-f99709370657