summaryrefslogtreecommitdiff
path: root/firmware/common/timefuncs.c (follow)
Commit message (Collapse)AuthorAge
* Move intrinsic RTC implmentation differences to driver filesMichael Sevakis2017-01-26
| | | | | | | | | | | Some drivers set tm_wday just fine and do not need it coerced to be correct. Others set tm_yday, so don't overwrite what the driver sets; just zero it inside if it can't fill the field. Move calls to set_day_of_week() to the sorts of drivers that presumably required the hammer (FS#11814) in get_time() where the weekday isn't locked to the date. Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a
* Calculate day-of-week after reading time from RTC. Should fix FS#11814Bertrik Sikken2012-04-12
| | | | Change-Id: I31dc0b0db5272d16ae55790252e3963e1a91d5bb
* Remove USB time sync code when there's no RTC.Boris Gjenero2011-12-16
| | | | | | | | | Without an RTC, Rockbox doesn't keep time. In that situation, USB time sync previously did nothing but reported success. After this change, the USB time sync request won't be recognized on those targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31319 a1c6a512-1295-4272-9138-f99709370657
* Remove conditional added around set_day_of_week in r31301.Boris Gjenero2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31305 a1c6a512-1295-4272-9138-f99709370657
* Add conditionals around functions that are only needed when RTC is present.Boris Gjenero2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31301 a1c6a512-1295-4272-9138-f99709370657
* Return -1 for not implemented RTC functions.Thomas Martitz2011-03-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29546 a1c6a512-1295-4272-9138-f99709370657
* Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz2010-05-06
| | | | | | | | 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
* Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with ↵Bertrik Sikken2009-10-18
| | | | | | current_time, instead of comparing them directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
* FS#10569 RTC driver cleanupNils Wallménius2009-09-26
| | | | | | | | 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
* Move yearday_to_daymonth() to usb_storage.c. It's the only user, this ↵Frank Gevaerts2009-08-11
| | | | | | 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
* Consolidate day of week calculationFrank Gevaerts2009-08-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22258 a1c6a512-1295-4272-9138-f99709370657
* rework new time handling functions a bit to be more memory efficientFrank Gevaerts2009-08-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22257 a1c6a512-1295-4272-9138-f99709370657
* Add support for setting the clock using a special SCSI command. This is the ↵Frank Gevaerts2009-08-11
| | | | | | | | | | | 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
* Fix yellow introduced in r21561Alexander Levin2009-06-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21563 a1c6a512-1295-4272-9138-f99709370657
* Make the get_time on non-RTC sims behave like target, i.e. always return a ↵Alexander Levin2009-06-29
| | | | | | constant time (FS#10390) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21561 a1c6a512-1295-4272-9138-f99709370657
* Onda VX747:Maurus Cuelenaere2009-02-13
| | | | | | | | | | | | | * 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
* Onda VX747:Maurus Cuelenaere2008-07-15
| | | | | | | | | | | | | 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
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | 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
* Fixed FS#7849Bertrik Sikken2008-04-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17123 a1c6a512-1295-4272-9138-f99709370657
* FS#7353 - mktime() is only used by targets that have an RTCRobert Keevil2007-07-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13883 a1c6a512-1295-4272-9138-f99709370657
* Set CONFIG_RTC to 0 for non-RTC targets, and check with #if to profit from ↵Jens Arnold2007-03-16
| | | | | | -Wundef. No code change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12811 a1c6a512-1295-4272-9138-f99709370657
* remove runtime detection of h1x0 series RTC MOD, but leave driver codeRobert Kukla2007-03-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12554 a1c6a512-1295-4272-9138-f99709370657
* FS#6419 - driver for H1x0 series RTC Mod with runtime detectionRobert Kukla2007-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12520 a1c6a512-1295-4272-9138-f99709370657
* Patch #5166 by Robert Keevil - Last.fm loggingLinus Nielsen Feltzing2006-10-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11269 a1c6a512-1295-4272-9138-f99709370657
* Iriver firmware compatibility kludge: RTC year offset. The offset is chosen ↵Jens Arnold2006-03-10
| | | | | | 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
* Improve ipod i2c driver somewhat by at least taking advantage of the ↵Brandon Low2006-03-09
| | | | | | 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
* Fix red builds (with frustration)Brandon Low2006-03-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8941 a1c6a512-1295-4272-9138-f99709370657
* Make seconds flow evenly and further throttle RTC reads solution partially ↵Brandon Low2006-03-06
| | | | | | thanks to amiconn git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8938 a1c6a512-1295-4272-9138-f99709370657
* Make the RTC read throttling work, thanks to herz42 on ircBrandon Low2006-03-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8926 a1c6a512-1295-4272-9138-f99709370657
* Fix some yellow buildsBrandon Low2006-03-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8913 a1c6a512-1295-4272-9138-f99709370657
* Move the RTC read throttling to a smarter placeBrandon Low2006-03-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8912 a1c6a512-1295-4272-9138-f99709370657
* Reworking of Archos RTC code to create a (slightly) more abstract RTC apiDave Chapman2005-12-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8216 a1c6a512-1295-4272-9138-f99709370657
* Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC ↵Dave Chapman2005-12-04
| | | | | | defines from config-*.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
* Unified build system to use SOURCES for sim builds too, a single Makefile-lookDaniel Stenberg2005-02-18
| | | | | | | | 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
* Const policed pointer arguments to functions, part 2Jens Arnold2004-08-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4996 a1c6a512-1295-4272-9138-f99709370657
* valid_time() now handles tm_wday correctlyLinus Nielsen Feltzing2004-04-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4555 a1c6a512-1295-4272-9138-f99709370657
* Reworked the time get/set functionsLinus Nielsen Feltzing2004-04-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4522 a1c6a512-1295-4272-9138-f99709370657
* tm_mon starts at 0Björn Stenberg2003-01-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3173 a1c6a512-1295-4272-9138-f99709370657
* Corrected get_time(). This should fix the bad file date bug. Also changed ↵Björn Stenberg2003-01-27
| | | | | | 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
* Killed a warningLinus Nielsen Feltzing2002-11-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2882 a1c6a512-1295-4272-9138-f99709370657
* Removed debug outputLinus Nielsen Feltzing2002-11-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2880 a1c6a512-1295-4272-9138-f99709370657
* Now uses timefuncs.h instead of time.hLinus Nielsen Feltzing2002-11-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2868 a1c6a512-1295-4272-9138-f99709370657
* Only Recorders have RTCLinus Nielsen Feltzing2002-11-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2864 a1c6a512-1295-4272-9138-f99709370657
* New time functionsLinus Nielsen Feltzing2002-11-20
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2861 a1c6a512-1295-4272-9138-f99709370657