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
79c8bb7ddf
Updae more comments
2016-07-27 08:03:09 -06:00
Gregory Nutt
59e0c4411f
Correct some comments
2016-07-26 13:39:20 -06:00
Gregory Nutt
0c7f5d62e4
More comments
2016-07-26 12:13:30 -06:00
Gregory Nutt
084d200a66
PTY: Cosmetic, update some comments
2016-07-26 10:09:35 -06:00
Gregory Nutt
eaaa69da0a
serial.c: Fix an error in FIONWRITE calculation
2016-07-26 06:47:53 -06:00
Gregory Nutt
e0b4a10dfa
drivers/serial/pty.c, serial.c, usbdev/cdcacm.c, include/nuttx/fs/ioctl.h: Fix FIONWRITE and add FIONSPACE. All implementations of FIONWRITE were wrong. FIONWRITE should return the number of bytes waiting in the outgoing send queue, not the free space. Rather, FIONSPACE should return the free space in the send queue.
2016-07-25 14:06:32 -06:00
Gregory Nutt
eb94cc5419
Update some comments
2016-07-24 12:48:37 -06:00
Wolfgang Reissnegger
4f83d58b24
USBMSC: Fix reversed logic on waiting for SCSI thread start.
...
The scsi thread was waiting for the wrong condition.
However, this was masked by the fact that the code creating the scsi thread
was also holding usbmsc_scsi_lock(priv) while initializing data, hence this
lock synchronized the scsi thread start with init completion.
2016-07-23 20:11:00 -07:00
Wolfgang Reissnegger
2974d2b07e
USBMSC: Add locks when removing request from queue.
2016-07-23 20:10:41 -07:00
Wolfgang Reissnegger
81f7758848
USBMSC: Fix usbtrace() string.
2016-07-23 20:10:20 -07: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
Gregory Nutt
9a8c3572db
serial.c: Fix a race condition noted by Stefan Kolb. Between the test if the TX buffer is full and entering a critical section, bytes may be removed from the TX buffer making the wait unnecessary. The unnecessary wait is an inefficiency, but not really a problem. But with USB CDC/ACM it can be a problem because the entire TX buffer may be emptied when we lose the race. If that happens that uart_putxmitchar() can hang waiting for data to be removed from an empty TX buffer.
2016-07-22 07:47:59 -06:00
Gregory Nutt
7370d3171a
Move include/nuttx/lib.h to include/nuttx/lib/lib.h
2016-07-21 14:05:44 -06:00
Gregory Nutt
23a876ab9c
Move include/nuttx/math.h to include/nuttx/lib/math.h
2016-07-21 13:58:09 -06:00
Gregory Nutt
10fff9011a
Move include/nuttx/configdata.h to include/nuttx/mtd/configdata.h
2016-07-21 13:34:54 -06:00
Gregory Nutt
ee9c66186c
ramdisk.h moved from include/fs/nuttx/ to include/nuttx/drivers.
2016-07-20 14:02:18 -06:00
Gregory Nutt
46dbbe837e
rwbuffer.h moved from include/nuttx/ to include/nuttx/drivers.
2016-07-20 13:54:38 -06:00
Gregory Nutt
1b9b3a7b47
pwm.h moved from include/nuttx/ to include/nuttx/drivers.
2016-07-20 13:48:24 -06:00
Gregory Nutt
ddcaa3d425
can.h moved from include/nuttx/ to include/nuttx/drivers.
2016-07-20 13:38:36 -06:00
Gregory Nutt
4b4dbc79a2
Move driver related prototypes out of include/nuttx/fs/fs.h and into new include/drivers/drivers.h
2016-07-20 13:15:37 -06:00
Gregory Nutt
e73e82a923
Move prototypes of mkfifo2() from sys/stat.h and pipe2() from unistd.h. They are non-standard and should not be in such a public place. They are not in include/nuttx/fs/fs.h (which isn't a great place either).
2016-07-20 11:57:18 -06:00
Gregory Nutt
2cacc6204a
Kconfig: If Pseudo-terminals are enabled, then pipes must be selected as well
2016-07-19 14:26:40 -06:00
Gregory Nutt
318f34fb7d
Psuedo-terminal pipe size is now configurable
2016-07-19 14:26:41 -06:00
Gregory Nutt
b28fa8a609
Move pipe() and mkpipe() to nuttx/libc. Change syscalls to pipe2() and mkfifo2()
2016-07-19 14:15:26 -06:00
Gregory Nutt
671d7fae31
Add mkfifo2() and pipe2() which are just like mkfifo() and pipe(), but allow control of the size of the underlying, in-memory circular buffer
2016-07-19 13:51:05 -06:00
Gregory Nutt
9a44f3017b
Fix a few typos in the last commit
2016-07-19 13:40:54 -06:00
Gregory Nutt
d6bf67f9ff
Alloc different sizes for pipe and fifo buffers
2016-07-19 13:34:18 -06:00
Gregory Nutt
56582e2263
Update some comments
2016-07-19 10:40:23 -06:00
Gregory Nutt
8bf4684de8
Update some comments
2016-07-19 09:53:52 -06:00
Gregory Nutt
a4458c5016
PTY: Fix a race condition in test-fifo-empty-before-read logic
2016-07-19 06:45:02 -06:00
Gregory Nutt
d9fbf4c90f
Eliminate some warnings
2016-07-18 11:27:06 -06:00
Gregory Nutt
1660329d06
Rename up_rnginitialize to devrandom_register
2016-07-18 10:55:37 -06:00
Gregory Nutt
6194467c13
PTY: Fix termios read input processing.. what was I thinking? Also, if some data was read, pty_read() should not block on the empty FIFO.
2016-07-18 08:00:56 -06:00
Gregory Nutt
e0aaa168aa
/dev/urandom: Add option to replace software PRNG with hardware TRNG.
2016-07-18 07:03:47 -06:00
Gregory Nutt
bf25eef79f
Update comments in Kconfig
2016-07-18 06:43:08 -06:00
Ken Pettit
39174da3be
Remove naming conflict in drivers/mtd/filemntd.c
2016-07-17 20:19:44 -06:00
Gregory Nutt
1b7455c171
Update comments in a Kconfig
2016-07-17 11:09:01 -06:00
Gregory Nutt
07e20479ad
/dev/random: Add configuration option to use the congruential PRNG.
2016-07-17 07:56:25 -06:00
Gregory Nutt
ffd3a31649
Rename lib_rand.c to lib_srand.c
2016-07-17 07:11:09 -06:00
David Alessio
6cefbc0c3f
This change provides an option to add /dev/urandom to all architectures. The pseudo-random algorithm I choose strikes an arguably-good balance between being "random" and small/fast enough for 8/16 bit MCUs. It’s the well-documented xorshift128 algorithm. It has an internal state of 128 bits that can be [re-]seeded with a write.
2016-07-17 06:42:26 -06:00
Gregory Nutt
ded91e451b
PTY: Add TERMIOS support.
2016-07-16 10:43:44 -06:00
Alan Carvalho de Assis
8fa14b8fed
Fix poll-related compile issues introduced with recent PTY changes
2016-07-16 07:03:38 -06:00
Gregory Nutt
6a75f2df89
PTY: Add some encode to reduce the likely of misinterpreting the return value of the file open() method
2016-07-15 17:13:21 -06:00
Gregory Nutt
4b1553d3ad
PTY: Fix some tricky issues. Now seems to be working. A lot more testing is needed
2016-07-15 14:29:32 -06:00
Gregory Nutt
4b5149b244
PTY: Fix a few errors from early testing
2016-07-15 14:09:02 -06:00
Gregory Nutt
9ecd558002
Add the correct implementation of the file_poll() function
2016-07-15 11:34:08 -06:00
Gregory Nutt
f7f7036db8
Update some comments
2016-07-15 11:15:33 -06:00
Gregory Nutt
4d1b811117
PTY: Add support for the poll() method.
2016-07-15 10:07:33 -06:00
Gregory Nutt
95555a0199
PTY: Add ioctls to support locking and unlocking of the slave. LIBC: Add implementation of unlockpt()
2016-07-15 09:39:33 -06:00
Gregory Nutt
6139860c0b
PTY: Added PTY IOCTL command definitions. Add support for TIOCGPTN. LIB: Implement ptsname() and ptsname_r()
2016-07-15 08:33:47 -06:00
Gregory Nutt
bcbe9806d2
In SUSv1 model, need to tried the PTY driver pair as unlinked if the master closes its reference
2016-07-15 07:33:48 -06:00
Gregory Nutt
14c216107a
PTY: Need to free PTMX minor number is slave is unlinked
2016-07-15 07:22:36 -06:00
Gregory Nutt
e50646336b
Add PTY header files
2016-07-15 07:19:42 -06:00
Gregory Nutt
7fa5093fff
PTYs prototypes hooked into build and configuration system (as EXPERIMENTAL)
2016-07-15 06:48:10 -06:00
Gregory Nutt
ccf4bfafcb
Prototype versions of ptmx/pty suppoprt. Still under developement; not yet hooked into build or configuration system.
2016-07-14 20:20:48 -06:00
Ken Pettit
fea2aaba05
SMART MTD layer: Fixes freesector logic error when sectorsPerBlk=256, adds DEBUGASSERT for invalid geometry and additional memory debug logic. Also fixes the dangling pointer on error bug.
2016-07-14 10:31:28 -06:00
Gregory Nutt
6fda036615
Eliminate a warning
2016-07-13 14:09:51 -06:00
Gregory Nutt
74037a7951
Merged in ziggurat29/nuttx/stm32l4_smartfs_test (pull request #97 )
...
fixes to n25qxxx mtd driver for smartfs support, etc...
2016-07-12 12:16:13 -06:00
ziggurat29
74777499bc
alter the notion of 'blocksize' to be equivalent to 'flash write page size' in order to align with assumptions in the smartfs driver (at least, maybe other things do as well).
...
Correct a bug that was previously masked by having blocksize=eraseblocksize which would cause buffer overflows and delicious hardfaults.
Trivial spelling changes in comments, etc.
2016-07-12 11:46:08 -05:00
Sebastien Lorquet
0d41a1cd42
Before accessing the sst26 flash, the "Global Unlock" command must me executed, which I do in the sst26 driver.
...
BUT. re-reading the datasheet, the WREN instruction is required to enable the execution of this command. This was not done.
I have no idea how the driver currently works except by chance. The writes
should never happen at all, the flash is half-enabled!
2016-07-12 10:34:03 -06:00
Heath Petersen
dc72e16625
handle when CONFIG_SERIAL_UART_ARCH_IOCTL is not enabled
2016-07-12 06:50:58 +00:00
Frank Benkert
5d3cdff16b
drivers/pipes/Kconfig: Add missing configuration for pipe ring buffer size.
2016-07-08 06:32:58 -06:00
ziggurat29
2cadf783fd
cdcacm_unbind leaks write request objects. This arises due to freeing the
...
bulk IN endpoint before the loop that frees the requests via cdcasm_freereq.
That function checks the parameters and skips the freeing if either is NULL.
Freeing the bulk IN enpoint will cause the first param to be NULL, thereby
bypassing the free operation. To fix, I moved the release of the bulk IN
endpoint until after to loop (much as was the case for the OUT and read
requests, which did not exhibit the problem).
2016-07-07 12:02:23 -05:00
Paul A. Patience
0690391d42
ioexpander/gpio: Add missing argument to gpin_read and gpout_read
2016-07-05 15:55:16 -04:00
Gregory Nutt
02b91d9880
Add a SYSLOG character device that can be used to re-direct output to the SYSLOG
2016-07-05 12:58:18 -06:00
Gregory Nutt
a39ce80add
SYSLOG logic should use existing file interfaces, not re-invent them.
2016-07-05 12:12:44 -06:00
Gregory Nutt
3b825b3e00
Improve a debug assertion
2016-07-05 09:50:54 -06:00
Gregory Nutt
5b6fafb3f5
Several MTD FLASH drivers nullify the freed 'priv' structure and failed to return NULL as stated in the comments. Result, will operate on a NULL pointer later. Noted by David Sidrane.
2016-06-30 17:49:53 -06:00
Gregory Nutt
a897fd4ccf
Eliminate use of apps/system/usbmonitor. Use drivers/usbmonitor instead.
2016-06-30 13:09:22 -06:00
Gregory Nutt
7c34a77b54
Move apps/system/usbmonitor to nuttx/drivers/usbmonitor
2016-06-30 12:24:33 -06:00
Gregory Nutt
cbb36416ab
Need to use back- not forward-slash in character constant
2016-06-27 09:52:50 -06: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
Wolfgang Reissnegger
d27ebee070
[sam34][timer] Fix ops check in TCIOC_STOP.
2016-06-23 17:12:24 -07:00
Gregory Nutt
acf3b14fe2
Trivial typo fix in README and document
2016-06-22 16:17:57 -06:00
Gregory Nutt
31b8e52267
Update README and documentatino
2016-06-22 14:47:40 -06:00
Gregory Nutt
0cb137d021
SYSLOG device flush logic not meaningful if SYSLOG file channels not supported
2016-06-22 13:35:53 -06:00
Gregory Nutt
1774ff2ed9
Add SYSLOG documentation to the porting guide
2016-06-22 12:26:54 -06:00
Gregory Nutt
b3acebd292
Update/replace drivers/syslog/README.txt
2016-06-22 10:47:27 -06:00
Gregory Nutt
9c87749afc
SYSLOG device channel: Pre-pending CR to LF is now a configuration option
2016-06-22 10:08:20 -06:00
Gregory Nutt
91b82dcae3
SYSLOG character device channel will now expand LF to CR-LF
2016-06-22 08:36:50 -06:00