Commit Graph

11 Commits (e3d8b28483714f4b09a032aaa73782633354653e)

Author SHA1 Message Date
Martin Kojtal 501bc29426 rtc time test: fix coding style 2018-11-15 07:20:09 +00:00
RFulchiero 0de5ab2686 Add a protected HAL set_time() test
When DEVICE_LPTICKER is defined set_time() only works correctly on
the first call. This test calls set_time() twice and ensures the
time set by both calls is correct.  This test only runs if
DEVICE_RTC or DEVICE_LPTICKER is defined.
2018-11-01 17:17:56 -05:00
Przemyslaw Stekiel 4a3bcee602 tests-mbed_hal-rtc_time: use templates instead of global variable 2018-10-11 11:59:01 +02:00
Przemyslaw Stekiel 8d57429de4 tests-mbed_hal-rtc_time: alocate required test data on stack
This is fix for issue 8368.

Test is causing some problems on `REALTEK_RTL8195AM` and `ARM` compiler. There is some kind of memory issue. Probably there is not enough memory space for global data provided by the test. Data definitions have been moved into test function body so, they will land on stack. With this fix the test works on `REALTEK_RTL8195AM/ARM`.
2018-10-11 11:58:47 +02:00
Martin Kojtal e52bb68f93 tests: astyle fix
All tests should comply to our coding standard now
2018-08-03 10:23:38 +01:00
Przemyslaw Stekiel fcdaeccea1 Add tests for extended RTC. 2017-12-05 07:53:41 +01:00
Russ Butler adcd2928fe Fix mktime test DST error
Initialize all values of timeinfo in make_time_info. This prevents
the field 'tm_isdst' from getting inadvertently set to 1 causing
time to be off by 1 hour.
2017-06-09 16:29:24 -05:00
Russ Butler d6af53c3ab Limit mktime test range for IAR
Do not test mktime or localtime past the year 1935 for IAR since this
is out of their supported range.
2017-06-09 16:26:17 -05:00
Vincent Coubard 6b020a3510 mbed_localtime: Add support of year day.
This field is needed by the LPC43XX targets.
2017-06-08 10:32:57 +01:00
Vincent Coubard 946ed353bc mbed_mktime: Improve documentation for doxygen. 2017-06-08 10:01:43 +01:00
Vincent Coubard f880e44145 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-07 22:06:22 -05:00