Commit graph

10025 commits

Author SHA1 Message Date
Adam Dunkels 4a85d49a09 Include a subplatform-conf.h, which may override configuration parameters set by the cooja/contiki-conf.h 2015-05-10 10:51:12 +02:00
Adam Dunkels 81391c11a7 Need to specify the target name, which allows us to have platforms that inherit from the cooja platform, like the cooja-ip64 platform 2015-05-10 10:51:12 +02:00
Adam Dunkels 06daa08ffc Added a function for getting the default RPL instance 2015-05-10 10:51:11 +02:00
Adam Dunkels bab1c48912 New Cooja platform designed for runnig IP64 routers for automated testing 2015-05-10 10:51:11 +02:00
Adam Dunkels bc222ed85c Code for building an IP64 router 2015-05-10 10:51:11 +02:00
Adam Dunkels 33372945a3 HTTP socket code with support for GET and POST 2015-05-10 10:51:11 +02:00
Adam Dunkels ba409cce57 Treat multicast transmissions as recyclable 2015-05-10 10:36:50 +02:00
Adam Dunkels 269188846c Added support for DNS64 translation of DNS queries for IPv6 addresses to IPv4 addresses, and the translation of responses from IPv4 to IPv6 2015-05-10 10:36:50 +02:00
Adam Dunkels 251813a6dd Maintain stats about how many packets have been translated from IPv4 to IPv6 and vice versa 2015-05-10 10:36:50 +02:00
Adam Dunkels 191a57d06c Minor copyright header fix 2015-05-10 10:36:50 +02:00
Adam Dunkels 0f1f12fdc7 Bugfix in tcp-socket: there were a few corner cases when the tcp-socket state would be messed up, which is fixed with this patch 2015-05-10 10:36:50 +02:00
Adam Dunkels df2cdbbd79 Merge pull request #1050 from simonduq/fix-uip-ds6-routes
Added missing sanity check in uip-ds6-route.c
2015-05-08 10:58:41 +02:00
Simon Duquennoy 8344290e08 Added missing sanity check in uip-ds6-route.c 2015-05-07 16:58:23 +02:00
George Oikonomou 2059be3a43 Merge pull request #1031 from bthebaudeau/cc2538-gpio-irqs
cc2538: gpio: Improve and fix IRQ management
2015-05-03 18:42:53 +01:00
Nicolas Tsiftes f7ca4b41a9 Merge pull request #1001 from adamdunkels/pr/queuebuf-no-ref
Cleanup: remove the obsolete reference packetbuf
2015-05-03 16:35:17 +02:00
George Oikonomou c2740fedb2 Merge pull request #1041 from uknoblic/cc2538_i2c
Fix CC2538 I2C clock computation bug
2015-04-29 13:35:01 +01:00
Ulf Knoblich 8e624c750d cc2538 i2c bug in clock computation 2015-04-29 11:07:59 +02:00
Benoît Thébaudeau 3d9d52de87 cc2538: gpio: Fix missed interrupts
Only the interrupt flags that have been handled must be cleared.
Otherwise, if a new interrupt occurs after the interrupt statuses are
read and before they are cleared, then it is discarded without having
been handled. This issue was particularly likely with two interrupt
trigger conditions occurring on different pins of the same port in a
short period of time.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-04-27 01:14:51 +02:00
Benoît Thébaudeau 1a5632cba0 cc2538: gpio: Fix missed power-up interrupts
Power-up interrupts do not always update the regular interrupt status.
Because of that, in order not to miss power-up interrupts, the ISR must
handle both the regular and the power-up interrupt statuses.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-04-27 01:14:51 +02:00
Benoît Thébaudeau 1e67ab3941 cc2538: gpio: Add macros to get interrupt status
Introduce new useful GPIO macros to:
 - get the raw interrupt status of a port,
 - get the masked interrupt status of a port,
 - get the power-up interrupt status of a port.

These macros are cleaner and less error-prone than raw register access
code copied all over the place.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-04-27 01:14:51 +02:00
Benoît Thébaudeau 41d9078ed4 cc2538: gpio: Factor out duplicated ISR code
This makes the code easier to maintain, and this reduces the binary
image size.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-04-27 01:14:50 +02:00
Oliver Schmidt 6c706e53ee Merge pull request #1036 from oliverschmidt/master
Several minor retrocomputing changes.
2015-04-26 22:38:13 +02:00
Oliver Schmidt 9aee07c9ad Leverage the recently added exec() cmdline support in the cc65 C library for the Apple ][. 2015-04-26 21:45:33 +02:00
Oliver Schmidt a824722862 Merge remote-tracking branch 'upstream/master' 2015-04-26 14:35:40 +02:00
Oliver Schmidt 7b3e80a957 Remove received packet(s) to allow to send one.
Behave just like the CS8900A driver: Both the CS8900A and the LAN91C96 dynamically share a buffer for received packets and packets to be send. If the chip is exposed to a network with a lot of broadcasts the shared buffer might fill quicker with received packets than the 6502 reads them (via polling). So we might need to drop some received packets in order to be able to send anything at all.
2015-04-26 14:23:33 +02:00
George Oikonomou 6ac939bc58 Merge pull request #1029 from adamdunkels/pr/enc28j60-ip64-bindings
IP64 bindings for the ENC28j60 Ethernet driver
2015-04-15 10:35:09 +01:00
Adam Dunkels 12beebeec0 IP64 bindings for the ENC28j60 Ethernet driver 2015-04-15 08:30:26 +02:00
George Oikonomou 9b28486b1a Merge pull request #1028 from g-oikonomou/cc26xx/contrib/rf-filtering-frame-version
Fix CC26xx RF frame filtering for frames with version==1
2015-04-14 13:45:06 +01:00
George Oikonomou 692d50d22f Don't reject frames with version==1 2015-04-14 12:58:49 +01:00
Nicolas Tsiftes 7d06494331 Merge pull request #917 from cetic/pr-hbh-user-conf
Allow user configuration of RPL hop-by-hop option
2015-04-03 22:19:51 +02:00
Laurent Deru 0efa9f2046 Allow user configuration of RPL hop-by-hop option 2015-04-03 09:52:36 +02:00
Adam Dunkels d5f06c91bb Disable the websever6 compile test for the exp5438 platform 2015-04-01 21:33:27 +02:00
Adam Dunkels 7acf747c1a Removed packetbuf references. This was a feature that is not used anymore and only made the code more complex. 2015-04-01 21:33:02 +02:00
Adam Dunkels c9c6688524 Remove the unused reference queuebufs, as they only make the code more complex than it needs to be 2015-04-01 10:01:57 +02:00
Nicolas Tsiftes 8f50d9709d Merge pull request #999 from adamdunkels/lebrush-rdnss-support-rebased
RDNSS support, again
2015-03-30 17:21:23 +02:00
Nicolas Tsiftes 793ed65cba Merge pull request #1013 from g-oikonomou/contrib/remove-uip-guard
Remove unnecessary #if guards
2015-03-30 16:59:23 +02:00
George Oikonomou 7238a1628f Merge pull request #1004 from alignan/z1-reed-sensor
Added Reed Sensor driver, example, and minor fix to the SHT25 sensor driver
2015-03-30 15:05:05 +01:00
Nicolas Tsiftes 132b31d6de Merge pull request #715 from adamdunkels/pr/enc28j60
ENC28j60 Ethernet driver code
2015-03-30 13:45:12 +02:00
Antonio Lignan b9334a3b0e Added Reed Sensor driver and example 2015-03-30 10:30:09 +02:00
Adam Dunkels 060bc8f8d7 Merge pull request #1011 from g-oikonomou/contrib/rf230bb-guard
Update #if guard to match header filename
2015-03-30 08:05:34 +02:00
George Oikonomou aedffb6c87 Merge pull request #767 from ejoerns/pull-req/timer-note
Note that timer_reset() must not be executed before timer expired
2015-03-29 00:46:30 +00:00
George Oikonomou 489f9618e8 Update #if guard to match header filename
Closes #952
2015-03-28 23:53:05 +00:00
George Oikonomou ff118be070 Remove unnecessary #if guards
ipv4/uip.c will not even be include in the list of sources in the first place if we are building with NETSTACK_CONF_WITH_IPV6 (CONTIKI_WITH_IPV6). Thus, there is no longer a need to wrap the entire source code in an #if guard.

Closes #935
2015-03-28 23:50:19 +00:00
George Oikonomou 48e987baac Merge pull request #1005 from alignan/i2c_cc2538
CC2538 I2C driver
2015-03-28 23:23:06 +00:00
George Oikonomou 36a80089e7 Merge pull request #1000 from cladmi/master
Cleanup old platforms configuration
2015-03-28 22:17:55 +00:00
George Oikonomou a9f499e528 Merge pull request #1009 from bthebaudeau/use-additive-offsets
Use additive offsets
2015-03-28 19:55:45 +00:00
Benoît Thébaudeau 19fd7a3551 Use additive offsets
OR-ing an offset to a base address instead of adding it is dangerous
because it can only work if the base address is aligned enough for the
offset.

Moreover, if the base address or the offset has a value unknown at
compile time, then the assembly instructions dedicated to 'base +
offset' addressing on most CPUs can't be emitted by the compiler because
this would require the alignment of the base address against the offset
to be known in order to optimize 'base | offset' into 'base + offset'.
In that case, the compiler has to emit more instructions in order to
compute 'base | offset' on most CPUs, e.g. on ARM, which means larger
binary size and slower execution.

Hence, replace all occurrences of 'base | offset' with 'base + offset'.
This must become a coding rule.

Here are the results for the cc2538-demo example:
 - Compilation of uart_init():
    * before:
        REG(regs->base | UART_CC) = 0;
        200b78:	f446 637c 	orr.w	r3, r6, #4032	; 0xfc0
        200b7c:	f043 0308 	orr.w	r3, r3, #8
        200b80:	2200      	movs	r2, #0
        200b82:	601a      	str	r2, [r3, #0]

    * now:
        REG(regs->base + UART_CC) = 0;
        200b7a:	2300      	movs	r3, #0
        200b7c:	f8c4 3fc8 	str.w	r3, [r4, #4040]	; 0xfc8

 - Size of the .text section:
    * before:	0x4c7c
    * now:	0x4c28
    * saved:	84 bytes

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-03-28 17:28:15 +01:00
Antonio Lignan 22be9fd8b7 I2C driver taken from PR #677, uncrustified, made functions static and added burst modes 2015-03-25 16:44:12 +01:00
Gaëtan Harter d0232bb20d Remove unused UIP_CONF_ND6_ defines in platforms
UIP_CONF_ND6_MAX_PREFIXE
  UIP_CONF_ND6_MAX_DEFROUTERS
2015-03-24 13:09:29 +01:00
Gaëtan Harter 697d8c0d23 Remove siclowpan compressions define in platforms
Several platforms defined compressions modes values:

    SICSLOWPAN_CONF_COMPRESSION_IPV6
    SICSLOWPAN_CONF_COMPRESSION_HC1
    SICSLOWPAN_CONF_COMPRESSION_HC01

instead of using the global SICSLOWPAN_COMPRESSION_LEVEL definitions
2015-03-24 11:40:32 +01:00