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
Gregory Nutt
95e20afcd2
drivers/: Remove dangling space at the end of lines.
2017-06-28 13:17:17 -06:00
Mark Schulte
b3222bbc8a
irq_dispatch: Add argument pointer to irq_dispatch
...
Provide a user defined callback context for irq's, such that when
registering a callback users can provide a pointer that will get
passed back when the isr is called.
2017-02-27 06:27:56 -06:00
Marc Rechté
58c2cd2843
drivers/ioexpander: Add some debug output.
2016-11-08 07:46:25 -06:00
Gregory Nutt
9965cbe428
drivers/: Review and correct some stylistic inconsistencies
2016-08-07 09:43:48 -06:00
Gregory Nutt
3d5df2e5af
Extend I/O Expander interrupt controls; Add test of level sensitve interrupt to Simulated I/O expander
2016-08-04 16:19:52 -06:00
Gregory Nutt
1f9799b68d
I/O Expanders: Interrupt detection logic should not ignore the no-change case. Still need to handle level interrupts even with no change.
2016-08-03 13:10:20 -06:00
Gregory Nutt
803b540e8a
Fix various issues with I/O expander and GPIO lower half drivers from testing with simulated I/O expander
2016-08-03 12:46:54 -06:00
Gregory Nutt
778a8131bf
SIM: Add a simulated I/O Expander driver
2016-08-03 09:44:48 -06:00
Gregory Nutt
62bc64bc55
Back out last Makefile.unix change. After puzzling about this for a while, I moved the definitions to apps/Make.defs. Also includes some cosmetic changes to GPIO lower half driver comments.
2016-08-02 08:37:30 -06:00
Gregory Nutt
9685fd8c99
GPIO driver: Add an IOCTL to unregister a signal handler
2016-08-01 13:52:27 -06:00
Gregory Nutt
0f9fb09a53
GPIO driver: Add an IOCTL command to get the pin type
2016-08-01 12:09:00 -06:00
Gregory Nutt
d0f6a23a32
Ooops.. forgot to add files before last commit
2016-08-01 11:15:29 -06:00
Gregory Nutt
d47aa75669
Add PCF8574 I/O Expander driver. Some cleanup also of other expander drivers.
2016-08-01 11:10:11 -06:00
Gregory Nutt
e0f3df5d97
Remove another lingering kruft
2016-08-01 10:01:28 -06:00
Gregory Nutt
583dad647c
TCA64xx: Remove some unused kruft
2016-08-01 09:59:36 -06:00
Gregory Nutt
9d9ff44736
GPIO lower half: Add conditional logic to handle the case where the I/O expander does not support interrupts.
2016-08-01 09:06:58 -06:00
Gregory Nutt
bf60f11801
Remove some unnecessary header file inclusions
2016-08-01 08:55:13 -06:00
Gregory Nutt
3e79ffc6dd
Some updates to the last commit
2016-08-01 08:49:15 -06:00
Gregory Nutt
6090f69bfd
Add a GPIO lower-half driver that can be used to register a GPIO character driver for accessing pins on an I/O expander.
2016-08-01 08:43:10 -06:00
Gregory Nutt
91b1006d42
I/O Expander Interface: Add argument to interrupt callback. Add a method to detach the interrupt.
2016-08-01 07:26:04 -06:00
Gregory Nutt
fb84e51d5b
Minor improvements/fixes to the TCA64xx driver.
2016-08-01 06:48:05 -06:00
Gregory Nutt
c0b83cb4b4
First (untested) cut at a TCA64XX I/O Expander driver leverages from Project Ara
2016-07-31 19:52:44 -06:00
Gregory Nutt
8fab9fb00f
Rethink last commit -- probably going down the wrong path
2016-07-31 18:33:04 -06:00
Gregory Nutt
8a67509b34
I/O Expander: Encode and extend I/O expander options to include interrupt configuration.
2016-07-31 18:19:59 -06:00
Gregory Nutt
9f00d87c07
Another update to the I/O Expander skeleton.c file
2016-07-31 17:03:25 -06:00
Gregory Nutt
bbe7a97685
Remove a duplicated line
2016-07-31 16:41:12 -06:00
Gregory Nutt
b98a966135
Another update to the I/O Expander skeleton.c file
2016-07-31 16:39:44 -06:00
Gregory Nutt
c6d65b0943
Update I/O Expander skeleton.c file
2016-07-31 15:43:36 -06:00
Gregory Nutt
99843fe5fe
I/O Expander: Update skelton file
2016-07-31 14:42:30 -06:00
Gregory Nutt
becf7e70c4
Add an I/O Expander skelton driver
2016-07-31 11:52:59 -06:00
Gregory Nutt
5f9ee79298
I/O Expander: Remove hard-coded PCA9555 fields from ioexpander.h definitons. Add support for an attach() method that may be used when any subset of pin interrupts occur.
...
PCA9555 Driver: Replace the signalling logic with a simple callback using the new definitons of ioexpander.h. This repartitioning of functionality is necessary because (1) the I/O expander driver is the lower-lower part of any driver that uses GPIOs (include the GPIO driver itself) and should not be interacting directly with the much higher level application layer. And (2) in order to be compatible with the GPIO driver (and any arbitrary upper half driver), the PCA9555 should not directly signal, but should call back into the upper half. The upper half driver that interacts directly with the application is the appropriate place to be generating signal.
2016-07-31 11:09:47 -06:00
Gregory Nutt
eb94cc5419
Update some comments
2016-07-24 12:48:37 -06:00
Gregory Nutt
2d92bffdcc
Trivial change left in editor
2016-07-23 13:53:37 -06:00
Gregory Nutt
a932578e76
GPIO driver: Add support for receiving signals from interrupt pins.
2016-07-23 13:53:06 -06:00
Paul A. Patience
0690391d42
ioexpander/gpio: Add missing argument to gpin_read and gpout_read
2016-07-05 15:55:16 -04:00
Michael Spahlinger
3d5e690977
Shadow-Mode: The output- and configuration registers of the IO-Expander
...
are held in the microcontrollers memory and only written to the IO-Expander.
This reduces bus traffic and is more error-proof than the normal read-
modify-write operation.
Retry Mode: If enabled and an error occurs while writing to the IO-Expander the
current transmission is automatically repeated once.
2016-06-27 08:11:54 -06:00
Gregory Nutt
b16fdaf155
Some small improvements to GPIO driver
2016-06-26 11:24:35 -06:00
Gregory Nutt
db50f13511
Correct some typos in DEBUGASSERT statements
2016-06-24 14:34:21 -06:00
Gregory Nutt
20708c7c5e
GPIO driver: Fix inconsistency in naming; beef up a debug assertion.
2016-06-24 11:32:24 -06:00
Gregory Nutt
ae19ca45e0
drivrs/ioexpander: Add support for a very simple GPIO drivers. It supports only pre-conrigured input and output pins and only basic input and output operations.
2016-06-24 09:43:49 -06:00
Sebastien Lorquet
9fd3db6293
PCA9555: Fix condition where GPIO interrupt is not re-enabled.
2016-04-20 09:59:16 -06:00
Frank Benkert
35df528f69
PCA9555: Remove duplicate variable declaration
2016-02-23 07:33:52 -06:00
Gregory Nutt
cea3854dea
PCA5555: Add logic to make the driver thread safe. Problem noted by Stefan Kolb.
2016-02-03 12:39:11 -06:00
Gregory Nutt
e5d86dd3fc
Oops. Apparently a copy'n'paste was accidentally a cut'n'paste
2016-02-02 12:53:32 -06:00
Gregory Nutt
009e9f76cb
I2C: Fixes/improvements from last massive I2C commits
2016-02-02 07:13:03 -06:00
Gregory Nutt
69ce24c70c
I2C: Remove the setfrequency method from the interface
2016-02-01 16:31:13 -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