Moshe Piekarski
b895fb6643
Add tm->yday to RTC ports missing it
...
Change-Id: I86882262bafb8d06f925aabb87ebd1b5dcb0cd53
2021-05-12 10:52:03 +00:00
Michael Sevakis
f4c4221306
Convert i.MX31 and AMS target to use RTC interrupt
...
Instead of checking ticks, set a sticky dirty flag that indicates
that the RTC needs to be read. This gives a timely update and more
accurate readout without actually reading the RTC until it changes.
The implementation should atomically read the flag and clear it.
Setting the flag would typically happen in an RTC tick ISR.
Change-Id: I6fd325f22845029a485c502c884812d3676026ea
2017-11-21 07:52:02 -05:00
Michael Sevakis
58b849c451
Move intrinsic RTC implmentation differences to driver files
...
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
2017-01-26 23:07:49 -05:00
Bertrik Sikken
449dff44ce
Calculate day-of-week after reading time from RTC. Should fix FS#11814
...
Change-Id: I31dc0b0db5272d16ae55790252e3963e1a91d5bb
2012-04-12 21:32:25 +02:00
Boris Gjenero
ff1c567417
Remove USB time sync code when there's no RTC.
...
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
2011-12-16 00:09:28 +00:00
Boris Gjenero
8414a44ad4
Remove conditional added around set_day_of_week in r31301.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31305 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 21:49:48 +00:00
Boris Gjenero
871c7bd34c
Add conditionals around functions that are only needed when RTC is present.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31301 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 21:38:23 +00:00
Thomas Martitz
294d058034
Return -1 for not implemented RTC functions.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29546 a1c6a512-1295-4272-9138-f99709370657
2011-03-08 21:36:47 +00:00
Thomas Martitz
50a6ca39ad
Move c/h files implementing/defining standard library stuff into a new libc 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
2010-05-06 21:04:40 +00:00
Bertrik Sikken
d24d885aa4
Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with current_time, instead of comparing them directly.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
2009-10-18 15:50:30 +00:00
Nils Wallménius
c8b87d76eb
FS#10569 RTC driver cleanup
...
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-09-26 14:58:32 +00:00
Frank Gevaerts
ceccec503e
Move yearday_to_daymonth() to usb_storage.c. It's the only user, this 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-11 20:03:59 +00:00
Frank Gevaerts
2dc50471ca
Consolidate day of week calculation
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22258 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 19:30:19 +00:00
Frank Gevaerts
eadfa483d1
rework new time handling functions a bit to be more memory efficient
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22257 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 18:54:13 +00:00
Frank Gevaerts
ed73a3274c
Add support for setting the clock using a special SCSI command. This is the 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-08-11 17:54:47 +00:00
Alexander Levin
eaa9df37e0
Fix yellow introduced in r21561
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21563 a1c6a512-1295-4272-9138-f99709370657
2009-06-29 14:58:02 +00:00
Alexander Levin
44bf40988b
Make the get_time on non-RTC sims behave like target, i.e. always return a constant time (FS#10390)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21561 a1c6a512-1295-4272-9138-f99709370657
2009-06-29 14:31:46 +00:00
Maurus Cuelenaere
4532d145f1
Onda VX747:
...
* 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
2009-02-13 00:45:49 +00:00
Maurus Cuelenaere
ebb612fbcc
Onda VX747:
...
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-07-15 17:17:01 +00:00
Daniel Stenberg
2acc0ac542
Updated our source code header to explicitly mention that we are GPL v2 or
...
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-06-28 18:10:04 +00:00
Bertrik Sikken
7697609455
Fixed FS#7849
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17123 a1c6a512-1295-4272-9138-f99709370657
2008-04-15 18:34:20 +00:00
Robert Keevil
ef65d91492
FS#7353 - mktime() is only used by targets that have an RTC
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13883 a1c6a512-1295-4272-9138-f99709370657
2007-07-14 12:34:52 +00:00
Jens Arnold
2c7b127dd7
Set CONFIG_RTC to 0 for non-RTC targets, and check with #if to profit from -Wundef. No code change.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12811 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 23:47:03 +00:00
Robert Kukla
ae08eeb4ff
remove runtime detection of h1x0 series RTC MOD, but leave driver code
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12554 a1c6a512-1295-4272-9138-f99709370657
2007-03-03 00:11:20 +00:00
Robert Kukla
50b5ee4781
FS#6419 - driver for H1x0 series RTC Mod with runtime detection
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12520 a1c6a512-1295-4272-9138-f99709370657
2007-02-28 13:20:36 +00:00
Linus Nielsen Feltzing
da153da0be
Patch #5166 by Robert Keevil - Last.fm logging
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11269 a1c6a512-1295-4272-9138-f99709370657
2006-10-19 09:42:58 +00:00
Jens Arnold
a738c3be31
Iriver firmware compatibility kludge: RTC year offset. The offset is chosen 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-10 19:17:01 +00:00
Brandon Low
19f4c2a093
Improve ipod i2c driver somewhat by at least taking advantage of the 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-09 19:47:12 +00:00
Brandon Low
8348cebe9a
Fix red builds (with frustration)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8941 a1c6a512-1295-4272-9138-f99709370657
2006-03-07 05:26:18 +00:00
Brandon Low
40d0d752aa
Make seconds flow evenly and further throttle RTC reads solution partially thanks to amiconn
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8938 a1c6a512-1295-4272-9138-f99709370657
2006-03-06 22:53:59 +00:00
Brandon Low
4a301c3275
Make the RTC read throttling work, thanks to herz42 on irc
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8926 a1c6a512-1295-4272-9138-f99709370657
2006-03-05 23:38:52 +00:00
Brandon Low
aab008053e
Fix some yellow builds
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8913 a1c6a512-1295-4272-9138-f99709370657
2006-03-05 18:34:27 +00:00
Brandon Low
6668b65ef2
Move the RTC read throttling to a smarter place
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8912 a1c6a512-1295-4272-9138-f99709370657
2006-03-05 18:19:46 +00:00
Dave Chapman
790b365595
Reworking of Archos RTC code to create a (slightly) more abstract RTC api
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8216 a1c6a512-1295-4272-9138-f99709370657
2005-12-11 00:47:40 +00:00
Dave Chapman
8c800cf59a
Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC defines from config-*.h
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
2005-12-04 15:23:47 +00:00
Daniel Stenberg
cdde25b597
Unified build system to use SOURCES for sim builds too, a single Makefile-look
...
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
2005-02-18 13:47:17 +00:00
Jens Arnold
0ceaa5e365
Const policed pointer arguments to functions, part 2
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4996 a1c6a512-1295-4272-9138-f99709370657
2004-08-17 01:45:48 +00:00
Linus Nielsen Feltzing
7662f06e53
valid_time() now handles tm_wday correctly
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4555 a1c6a512-1295-4272-9138-f99709370657
2004-04-25 23:47:50 +00:00
Linus Nielsen Feltzing
7ddf0d673d
Reworked the time get/set functions
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4522 a1c6a512-1295-4272-9138-f99709370657
2004-04-20 10:23:57 +00:00
Björn Stenberg
b8f5759d96
tm_mon starts at 0
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3173 a1c6a512-1295-4272-9138-f99709370657
2003-01-27 14:43:32 +00:00
Björn Stenberg
cc11e885d1
Corrected get_time(). This should fix the bad file date bug. Also changed 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
2003-01-27 14:24:40 +00:00
Linus Nielsen Feltzing
063c6d471f
Killed a warning
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2882 a1c6a512-1295-4272-9138-f99709370657
2002-11-24 15:04:22 +00:00
Linus Nielsen Feltzing
0281125c98
Removed debug output
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2880 a1c6a512-1295-4272-9138-f99709370657
2002-11-24 11:47:56 +00:00
Linus Nielsen Feltzing
2260f83376
Now uses timefuncs.h instead of time.h
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2868 a1c6a512-1295-4272-9138-f99709370657
2002-11-20 22:46:35 +00:00
Linus Nielsen Feltzing
4dd6654bb2
Only Recorders have RTC
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2864 a1c6a512-1295-4272-9138-f99709370657
2002-11-20 00:26:55 +00:00
Linus Nielsen Feltzing
85969853d5
New time functions
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2861 a1c6a512-1295-4272-9138-f99709370657
2002-11-20 00:00:25 +00:00