Juha Niskanen
d101fad026
Merged in juniskane/nuttx_stm32l4/stm32_rtc_small_patches_pr (pull request #511 )
...
Stm32 rtc small patches
* RTC: canceling an alarm marks it as inactive
* STM32L4, STM32F4, STM32F7 RTC: fix reading alarm value that is more than 24h in future
* STM32F0 RTC: fix backup register count in stm32_rtcc.h
All other STM32: SHIFTR_SUBFS_MASK was correct in STM32F0 only
* STM32L1: use correct EXTI line definitions
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-17 16:45:48 +00:00
Gregory Nutt
4810499d3a
Squashed commit of the following:
...
Replace all calls to sigqueue() in the OS proper with calls to nxsig_queue() to avoid accessing the errno variable.
sched/signal: Add nxsig_queue() which is functionally equivalent to sigqueue() except that it does not modify the errno variable.
2017-10-07 10:57:09 -06:00
Gregory Nutt
9568600ab1
Squashed commit of the following:
...
This commit backs out most of commit b4747286b1
. That change was added because sem_wait() would sometimes cause cancellation points inappropriated. But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.
In the OS, all calls to sem_wait() changed to nxsem_wait(). nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.
In all OS functions (not libraries), change sem_wait() to nxsem_wait(). This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.
sched/semaphore: Add the function nxsem_wait(). This is a new internal OS interface. It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615
Squashed commit of the following:
...
sched/semaphore: Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable. Changed all references to sem_post in the OS to nxsem_post().
sched/semaphore: Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable. Changed all references to sem_destroy() in the OS to nxsem_destroy().
libc/semaphore and sched/semaphore: Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable. Changed all references to sem_setprotocol in the OS to nxsem_setprotocol(). sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552
Squashed commit of the following:
...
libc/semaphore: Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable. Changed all references to sem_getvalue in the OS to nxsem_getvalue().
sched/semaphore: Rename all internal private functions from sem_xyz to nxsem_xyz. The sem_ prefix is (will be) reserved only for the application semaphore interfaces.
libc/semaphore: Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable. Changed all references to sem_init in the OS to nxsem_init().
sched/semaphore: Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.
sched/semaphoate: Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Boris Astardzhiev
b1eceb838b
Extend the RTC framework with an alarm read ioctl (RTC_RD_ALARM). Through it consumer could get configuration settings about previously scheduled hardware alarms (active status, hours, minutes, seconds).
2017-09-03 08:39:02 -06:00
Juha Niskanen
0113b0db95
drivers: handle I2C_TRANSFER return value consistently. Some I2C peripherals transfers return zero on success, others number of completed transfers. Make drivers robust against this.
2017-08-04 07:31:36 -06:00
Juha Niskanen
b9a769d65d
drivers: fix some bad NULL checks
2017-05-15 07:20:32 -06:00
Jussi Kivilinna
e3b3e57e56
RTC: add interface for check if RTC time has been set
...
New interface allows checking if RTC time has been set. This allows to application to detect if RTC has valid time (after
reset) or should application attempt to get real time by other means (for example, by launching ntpclient or GPS).
2017-04-06 09:53:11 -06:00
Sebastien Lorquet
5363d0619a
Fix warnings
2016-11-18 15:26:08 +01:00
Gregory Nutt
47b52a2633
Fix an error in manually bringing in Sebastien's changes; Update some comments.
2016-11-17 16:15:06 -06:00
Gregory Nutt
9acd57c819
Fix up some naming and update some comments.
2016-11-17 15:50:39 -06:00
Gregory Nutt
19c1c9d78b
All timer lower half drivers. Port Sebastien's changes to all all other implementations of the timer lower half. Very many just and untested. Expect some problems.
2016-11-17 15:03:31 -06:00
Sebastien Lorquet
197cec58d2
timer driver: Use signal to notify of timer expiration. Add generic argument so that there can be additional usage.
2016-11-17 14:38:21 -06:00
Gregory Nutt
d4a048c0c6
Timer driver: Add hooks to support signal notification of timer expiration. Commented out because invasive interface changes would also be required to complete the implementation.
2016-11-17 12:41:11 -06:00
Gregory Nutt
ecb2d4cbc1
drivers/timer: Remove the TIOC_SETHANDLER IOCTL call. This calls directly from the timer driver into application code. That is non-standard, non-portable, and cannot be supported
2016-11-17 11:52:42 -06:00
Gregory Nutt
ab16ad7530
Fix some bugs in the oneshot driver logic
2016-08-12 14:19:11 -06:00
Gregory Nutt
82b86cdcf3
oneshot interface: max_delay method should return time in a standard struct timespec form.
2016-08-12 11:33:10 -06:00
Gregory Nutt
89135c55e4
drivers/timer: Add an upper-half, oneshot timer character driver.
2016-08-12 10:40:07 -06:00
Wolfgang Reissnegger
d27ebee070
[sam34][timer] Fix ops check in TCIOC_STOP.
2016-06-23 17:12:24 -07:00
Gregory Nutt
0c8c7fecf0
Add _ to the beginning of all debug macros to avoid name collisions
2016-06-16 12:33:32 -06:00
Gregory Nutt
b7f0fbc073
Centralize definitions associated with CONFIG_DEBUG_RTC
2016-06-16 07:39:23 -06:00
Gregory Nutt
37b9742189
Centralize definitions associated with CONFIG_DEBUG_TIMER
2016-06-16 07:16:25 -06:00
Gregory Nutt
6b517ed017
Centralize definitions associated with CONFIG_DEBUG_WATCHDOG
2016-06-16 06:28:04 -06:00
Gregory Nutt
efb02f2ef1
drivers/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network evernts are not errors.
2016-06-12 08:31:22 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2
Rename *lldbg to *llerr
2016-06-11 14:55:27 -06:00
Gregory Nutt
1cdc746726
Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES
2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Paul A. Patience
f8f7b7582c
Silence some warnings
2016-05-26 14:06:13 -04:00
Gregory Nutt
8eb7898a91
RTC driver: A PID of zero should mean to notify the calling task
2016-04-10 09:12:50 -06:00
Gregory Nutt
dc71a47df6
RTC: Fix some configuration issues when RTC_ALARM is disabled
2016-04-04 09:24:27 -06:00
Gregory Nutt
a44b0798e2
RTC driver: Needs to initialize state structure to zero on initalization
2016-04-03 12:40:25 -06:00
Gregory Nutt
ae95f6cdfd
RTC: Fix some errors when RTC debug is enabled
2016-04-03 09:52:25 -06:00
Gregory Nutt
1135ce804d
RTC: Extend interface by adding a method to set the alarm relative to the current time
2016-04-02 18:18:48 -06:00
Gregory Nutt
0723226bda
RTC: Further simplications of the RTC driver interface; Add sample implem.
2016-04-02 13:55:58 -06:00
Gregory Nutt
58d6624f29
RTC: Simplify the RTC driver interface. Way too much stuff in that interface and it is not fully implemented anywhere.
2016-04-02 13:01:02 -06:00
Gregory Nutt
69ce24c70c
I2C: Remove the setfrequency method from the interface
2016-02-01 16:31:13 -06:00
Gregory Nutt
6ad641888b
Add I2C frequency to the i2c_msg_s structure
2016-02-01 14:17:20 -06:00
Gregory Nutt
f9053182d3
I2C: Remove setaddress method
2016-02-01 12:14:31 -06:00
Gregory Nutt
8c9bddf998
I2C: Eliminate the I2C_WRITE and I2C_READ macros
2016-02-01 08:57:22 -06:00
Gregory Nutt
10000841a8
The I2C_TRANSFER method is no longer optional
2016-01-31 14:16:05 -06:00
Gregory Nutt
3a781a2d3f
Remove I2C slave methods from I2C master interface; rename i2c_dev_s to i2c_master_s.
2016-01-30 08:36:47 -06:00
Gregory Nutt
ceb415204e
Move include/nuttx/i2c.h to include/nuttx/i2c/i2c_master.h
2016-01-30 08:00:16 -06:00
Gregory Nutt
d4a53ee131
I2C: Eliminate the I2C_WRITEREAD method
2016-01-26 10:26:16 -06:00
Gregory Nutt
a2e1ece873
RTC: Handle RTC failures. If mktime is called with garbage, it may crash
2015-12-21 14:39:40 -06:00
Gregory Nutt
a696b807fb
PCF65263: Correct readback verification of seconds register
2015-12-21 14:00:25 -06:00
Gregory Nutt
d62a626703
Adds a driver for the PCA9635PW I2C LED driver IC which can be used to control the intensity of up to 16 LEDs. From Alexander Entinger
2015-12-15 08:05:10 -06:00
Gregory Nutt
11afff74dc
Kconfig change for improved usability
2015-11-29 12:13:24 -06:00
Gregory Nutt
8914400750
PCF85163: Correct I2C address
2015-11-21 07:14:36 -06:00
Gregory Nutt
294950ea3d
PCF85263: Need to clear the 100ths of second register when setting the time
2015-11-20 17:39:41 -06:00
Gregory Nutt
38c9d42e21
drivers/timers/pcf85263.c: Add a driver for the NXP PCF85263 I2C RTC
2015-11-20 17:36:10 -06:00
Gregory Nutt
3cff8a725b
Add a missing comment
2015-11-20 16:13:28 -06:00
Gregory Nutt
11c0f5be6f
Clear some trailing whitespace
2015-11-20 16:10:01 -06:00
Gregory Nutt
26cbdd8939
Completes PCF85263 RTC register definition header file.
2015-11-20 16:09:23 -06:00
Gregory Nutt
eb4c2f9c41
PCF85263 RTC register definition header file. Incomplete on initial commit
2015-11-20 14:51:43 -06:00
Gregory Nutt
db2fe45666
Update some comments
2015-11-20 09:55:18 -06:00
Gregory Nutt
9af0ee7fdb
DS323x: Costmetic cleanup
2015-11-19 19:43:01 -06:00
Gregory Nutt
b951533514
DS3232 not DS3234
2015-11-19 19:31:52 -06:00
Gregory Nutt
9a1ca0d489
Add support for DS1302 and DS3232 RTC chips
2015-11-19 19:26:09 -06:00
Gregory Nutt
367d8020be
Add some definitions for future support for the DS3234 SPI RTC
2015-11-19 15:57:36 -06:00
Gregory Nutt
892ba4f26a
DS1307: Change year bias to 1968 which is a leap year juse like 2000
2015-11-19 15:12:40 -06:00
Gregory Nutt
c34b5108a7
RTC: Fix system time initialization when using an exernal RTC. Fix some bugs in the DS1307/DS3231 RTC driver
2015-11-19 14:54:30 -06:00
Gregory Nutt
622ea95ab1
drivers/timers/ds3213.c: Extend to include support for the DS1307 RTC
2015-11-18 08:43:19 -06:00
Gregory Nutt
a654f35d98
Fix some stylistic issues found by tools/nxstyle
2015-11-17 17:35:17 -06:00
Gregory Nutt
25c4ff8285
Update some comments
2015-11-17 16:29:34 -06:00
Gregory Nutt
249fa2475b
Add logic to detect rollowing while reading or setting the time
2015-11-17 14:39:47 -06:00
Gregory Nutt
45530a77d4
Add support for DS3231 I2C RTC. Untested on initial commit.
2015-11-17 14:07:55 -06:00
Gregory Nutt
cf14f8d1b5
drivers/: Fixes to spacing and alignement
2015-10-10 10:41:00 -06:00
Gregory Nutt
af086c40ff
Remove dangling whitespace
2015-10-04 15:28:54 -06:00
Gregory Nutt
0b12dbf95d
Fix some spacing problems
2015-10-04 15:04:00 -06:00
Gregory Nutt
342f5fe33d
Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation
2015-06-28 08:08:57 -06:00
Gregory Nutt
2aa80e06f5
Remove executable flag from more .c and .h files
2015-04-09 08:20:57 -06:00
Gregory Nutt
bf7b5746a5
Correct typos in comments
2015-04-03 08:01:39 -06:00
Gregory Nutt
e78e762dd6
Add a very basic driver for the CS2100-CP Fractional-N Multipler chip.
2015-04-02 13:00:10 -06:00
Gregory Nutt
0ec67181c9
Move include/nuttx/timer.h, rtc.h and watchdog.h to include/nuttx/timers/.
2015-04-01 12:37:44 -06:00
Gregory Nutt
6cc74fecc8
Refresh configuration
2015-02-25 07:22:58 -06:00
Gregory Nutt
63ab39b274
VFS: The inode unlink method should not be support if operations on the root pseudo-filesystem are disabled.
2015-02-18 09:34:58 -06:00
Gregory Nutt
e2336a07bb
The RTC ioctl() method is now a configuration option
2015-02-18 08:23:10 -06:00
Gregory Nutt
f94e601981
Add an IOCTL method to the RTC interface
2015-02-18 08:05:31 -06:00
Gregory Nutt
5cb233f712
RTC: A little more clean-up of the RTC driver
2015-02-15 08:19:23 -06:00
Gregory Nutt
fcadc2d8e4
Add an RTC upper half driver. This is the driver that is documented in include/nutt/rtc.h
2015-02-13 11:49:04 -06:00
Gregory Nutt
c463f9fad6
Move timer-related drivers from drivers/ to drivers/timers.
2015-02-13 10:30:06 -06:00