Commit Graph

406 Commits (d7d5954f59fe54425eab25df52a91e1e899a0e11)

Author SHA1 Message Date
0xc0170 f4591dbbab Merge branch 'upstream_master' into dev_kl46z 2013-11-05 22:08:07 +01:00
Bogdan Marinescu cf71d0831b Merge pull request #99 from xiongyihui/master
add readable(), writeable() and settings changed callback to USBSerial
2013-11-05 01:37:35 -08:00
Bogdan Marinescu bb04bf917a Merge branch 'lpc4088' of git://github.com/arebert/mbed into arebert-lpc4088
Conflicts:
	workspace_tools/export/gccarm.py
2013-11-04 12:19:29 +02:00
Yihui Xiong d3ca818905 add readable(), writeable() and settings changed callback to USBSerial 2013-11-01 12:38:27 +08:00
Andreas Rebert 09cf4ef128 Support for exporting to GCC_ARM 2013-10-31 13:28:05 +01:00
Adam Green 64620e2e78 lwip: Stop dropping long TCP segments
If lwIP placed more than 2 pbufs in a TCP segment, the ethernet driver
would fail to send it as it didn't have enough Tx descriptors.  The
maximum number of pbufs outstanding for transmit that lwIP keeps is
defined by the TCP_SND_QUEUELEN macro.  I modifed the value of
LPC_NUM_BUFF_TXDESCS to take advantage of this lwIP value.  The +1
takes into account that LPC_EMAC->TxProduceIndex ==
LPC->TxConsumeIndex is reserved for indicating that the queue is empty
so a full queue uses one less than the maximum count.
2013-10-29 23:41:21 -07:00
Adam Green 692cbd11f6 lwip: Fix invalid checksum bug
tcp_write() would incorrectly byte swap the checksum 1 too many times
when concatenating a pbuf to an existing TCP segment if the number of
bytes in the concatenated data was odd.  I hit this issue when I tried
to reproduce a lost segment issue reported by a mbed user in this forum
thread: http://mbed.org/forum/mbed/topic/4354/?page=2#comment-22657
2013-10-29 23:41:21 -07:00
pbrier b1d88905a9 fixed can_filter() prototype (prevents build of LPC1768) 2013-10-26 17:02:29 +02:00
Emilio Monti 317a1f66d2 Merge pull request #91 from jorisa/master
Add CAN api filter support and LPC11CXX CAN implementation
2013-10-25 06:58:05 -07:00
Bogdan Marinescu 9d881770c9 Merge remote-tracking branch 'github/master' 2013-10-25 15:43:01 +03:00
Adam Green 969733ae8f serial_putc() to make better use of Tx FIFO
If don't know if this is an issue that anyone cares about.  I am also
not sure what the best way to solve it is either.  I just thought I
would issue a pull request with this commit to bring the issue to light
and show a possible solution that I have tested on my mbed-1768 device.

Previously the serial_putc() API didn't make any use of the Tx FIFO
since the serial_writable() API it utilizes only returns true when the
FIFO is completely empty.  This is due to the fact that the THRE bit of
the UART's LSR (Line Status Register) only goes high when the whole
FIFO is empty.

I noticed this when doing some performance testing with the network
stack.  I went from calling printf() to output 3 bytes every 10 seconds
(with packet drop stats) to instead output 4 bytes every 10 seconds.
I thought these should easily fit in the 16 byte FIFO but outputting
one extra byte caused an additional three 550 byte UDP packets to be
dropped.  This should only happen if the additional character being
sent to the UART was taking away extra CPU cycles from the network
stack.

My solution is to keep track of the number of bytes that have been
placed in the Tx FIFO since it was last detected as being completely
empty (via the THRE bit).  Only once this count hits 16 does the code
then block, waiting for the THRE bit to go high.  Each time the THRE
bit does go high, the count is reset to 0 again and it is incremented
for each byte that is loaded into the THR.
2013-10-25 15:17:06 +03:00
Joe Turner 6ae1e9e360 Merge branch 'master' of git://github.com/mbedmicro/mbed into bugfix-STM32-vectors 2013-10-25 13:11:25 +01:00
Joe Turner 0ef4905728 Fix relocation of vector on STM32. 2013-10-25 13:09:06 +01:00
Bogdan Marinescu 544ac9e728 Disable DEVICE_STDIO_MESSAGES for LPC81X
Because the LPC81X HAL implementation calls error(), which in turn calls
fprintf(), quite a bit of code is added to the image, which is not a good
idea on such resource constrained targets.
2013-10-25 14:51:01 +03:00
Bogdan Marinescu 5742abe6d9 Added the new RawSerial.h in mbed.h 2013-10-23 17:28:05 +03:00
Bogdan Marinescu 2404dc0092 Added new serial class, remove interrupt chaining
The new RawSerial class is a simple wrapper over the serial HAL that can
be safely used from an interrupt handler.
Interrupt chaining code was removed from InterruptIn, Serial and Ticker
because it caused lots of issues with the RTOS. Interrupt chaining is
still possible using the InterruptManager class.
2013-10-23 16:08:34 +03:00
Joris Aerts 739f2a6375 Add can_api hal implementation to LPC11CXX target
Most of the functionality works, interrupts might need a little more work.
2013-10-22 11:02:10 -07:00
Joris Aerts 08c1483eb3 Add bitfields definition to LPC11XX target
Generated from UM10398
2013-10-22 11:00:17 -07:00
Joris Aerts 067e446ae2 Add CAN->filter to API and add placeholders to hal's
Add filter function and modify CAN->read definition to allow reading specific messages.
2013-10-22 10:57:28 -07:00
Bogdan Marinescu fe7021d433 Renamed ubloxusbgsm in main to ubloxusb
Since the tests are now generic (both GSM and CDMA), rename the directory
to reflect this.
2013-10-22 12:41:01 +03:00
Bogdan Marinescu ae0bc41693 Added support for CDMA modem in SMSTest
Also remove unnecessary thread from main
2013-10-22 12:27:18 +03:00
Bogdan Marinescu 7f35fc4b76 Added support for CMDA modem in HTTPClientTest
Also remove unnecessary thread from main
2013-10-22 11:59:11 +03:00
Bogdan Marinescu dfb472ceaf fixed invalid include name 2013-10-21 14:43:46 +03:00
Bogdan Marinescu 8557b24b61 Merge remote-tracking branch 'github/master' 2013-10-21 14:23:04 +03:00
Bogdan Marinescu 8aaa1b76a6 Added auto synchronization for the u-blox GSM modem test
Also changed the test to look more like the original VodafoneUSBModem SMS
test (added another thread).
2013-10-21 14:21:42 +03:00
0xc0170 5129cd05f3 Merge branch 'upstream_master' into dev_gpio_irq_endis 2013-10-21 12:29:43 +02:00
0xc0170 b0537af763 gpio irq enable/disable
- InterruptIn disable_irq/enable_irq
2013-10-19 22:28:29 +02:00
Bogdan Marinescu 5e6262a91a Fixed macro definitions in u-blox test 2013-10-19 14:39:50 +03:00
Bogdan Marinescu ea9ba23ff5 Changed u-blox modem test
The test is not automated now, so it can be synced with the official
repository.
Also changed it to look more like the original VodafoneUSBModem test by
adding another thread in the code.
2013-10-19 00:54:32 +03:00
0xc0170 d9ed7aba77 CMSIS KL46 files (were KL25 renamed) 2013-10-17 19:32:40 +02:00
Bogdan Marinescu bdf5d03ba1 Updated tests
- Vodafone tests are gone for now
- Added u-blox TCP test (UB_1) and SMS test (UB_2).
- tests can now have more than a single source directory
2013-10-17 18:57:02 +03:00
Bogdan Marinescu a34945661d Added CellularModem as an abstract base class for modem implementations
Now both UbloxUSBGSMModem and UbloxUSBCDMAModem inherit from
CellularModem.
2013-10-17 15:40:46 +03:00
Bogdan Marinescu 87fbaa5507 Added missing constructor for CDMA modem initializer 2013-10-17 13:52:34 +03:00
Bogdan Marinescu 7585a23e6c Added CellularModem library, removed old VodafoneUSBModem library 2013-10-17 12:01:55 +03:00
Bogdan Marinescu 6a5d7c654d Modifications for compatibility with GCC 2013-10-17 10:34:07 +03:00
Bogdan Marinescu 2f26d09606 Changed debugging macros in WANDongle and WANDongleSerialPort
Now they use "dbg.h" which is a part of USBHost, thus eliminating the
dependency on code from CellularModem.
2013-10-16 23:59:32 +03:00
Bogdan Marinescu aa209e3002 Remove USBSerialStream from USBHost
The code from USBSerialStream depends on some headers from CellularModem,
so remove it from USBHost.
2013-10-16 23:57:09 +03:00
Bogdan Marinescu d8c3822c4c Changed USBHostConf.h to better match the previous USBHost configuration. 2013-10-16 16:00:49 +03:00
Bogdan Marinescu 26ac4e5288 Remove "debugging LED" from USBHost.cpp 2013-10-16 15:55:04 +03:00
Bogdan Marinescu 1c088eed13 Moved USBSerialStream from the CellularModem library to USBHost
This removes any dependency on USB code from CellularModem.
2013-10-16 15:53:58 +03:00
Bogdan Marinescu 864d3ef195 Renamed USB3GModule to USBHost3GModule to keep the naming convention 2013-10-16 15:52:47 +03:00
Bogdan Marinescu a4da762016 Removed references to specific initializers from the code 2013-10-16 15:47:46 +03:00
Bogdan Marinescu ae2e7c3051 Refactored dongle initialization code
The code for dongle initialization (WANDongleInitializer.cpp) was removed from
this class, it will be added by each modem as needed.
2013-10-16 15:46:26 +03:00
Bogdan Marinescu a0d9973cab Initial import of USB3GModem in the USBHost library
In the future, USBHostConf.h should really reside in the project that
imports USBHost, not inside the USBHost library itself. Doing that now
though might break compatibility with projects that currently import
USBHost, so we need to figure out a better solution.
2013-10-16 15:45:25 +03:00
Andreas Rebert a0a6cbe1d3 Merge branch 'master' into lpc4088 2013-10-11 14:02:59 +02:00
Andreas Rebert a574fd73b3 Bugfixes for I2C and port impl 2013-10-11 14:01:49 +02:00
Michael Ammann 330e59fb85 make buffer big enough 2013-10-09 15:12:53 +03:00
Dave Van Wagner d3963de05d Added methods to retrieve gateway and netmask from DHCP assignment 2013-10-09 13:47:41 +03:00
0xc0170 122f24b83f Update: Merge branch 'master' into freedomKL46Z
Conflicts:
	workspace_tools/targets.py
2013-10-06 18:55:32 +02:00
0xc0170 44bb8e00e5 First passed tests for KL46
- spi is failing, need to fix it
2013-10-01 20:18:39 +02:00