Commit Graph

1714 Commits

Author SHA1 Message Date
Oliver Schmidt
28f88a7d56 Consistently use the term 'device'. 2019-05-08 17:11:07 +02:00
Oliver Schmidt
c2a71ee62b Updated several aspects regarding Ethernet drivers.
I. Build Ethernet drivers individually for each target.

After all the Ethernet cards/carts are different enough to ask for customized drivers. Building the drivers individually opens the option to use .ifdef's to customize them.

II. Removed Ethernet driver I/O base.

So far the base address of the Ethernet chip was a general property of all Ethernet drivers. It served two purposes:
1. Allowing to use a single Ethernet driver for a certain Ethernet chip, no matter what machine was connected to the chip.
2. Allowing use an Ethernet card in all Apple II slots.

However, we now use customized Ethernet drivers for the individual machines so 1.) isn't relevant anymore. In fact one wants to omit the overhead of a runtime-adjustable base address where it isn't needed.

So only the Apple II slots are left. But this should rather be a driver-internal approach then. We should just hand the driver the slot number the user wants to use and have the driver do its thing.

III. With per-target Ethernet drivers we can have per-target MAC addresses.

IV. Added support for RR-Net MK3 unique MAC addresses.

The RR-Net MK3 can be operated in two modes:

- In cartrigde mode it has a startup-ROM that sets the CS8900A MAC address to the unique MAC address.
- In clockport mode the driver has to read the two lowest MAC address bytes from the EEPROM and combine them with 28:CD:4C:FF.

See http://wiki.icomp.de/wiki/RR-Net#Detecting_MK3 for details.

The driver first checks if the current CS8900A MAC address starts with 28:CD:4C:FF. If it does, it overwrites its built in default MAC address with the CS8900A MAC address.

If the CS8900A MAC address didn't start with 28:CD:4C:FF, it checks if there are two valid MAC address bytes in the EEPROM. If they are there, it overwrites its built in default MAC address with a combination of 28:CD:4C:FF and those two bytes.

V. Added support for the upcoming 'Dracarys' Ethernet PBI for the ATARI.

See http://atariage.com/forums/topic/287376-preannouncement-dragon-cart-ii/ for details on Dracarys.

So far there was only one Ethernet solution for the ATARI. Therefore the relevant driver was loaded statically. With now having two solutions we have to load the corresponding driver dynamically (like on the other machines). Fortunately this doesn't mean significant additional overhead as there are several mouse drivers for the ATARI asking for dynamic mouse driver loading. Therefore the dynamic driver loading infrastructure was linked already.

Another aspect of more than one Ethernet solution is that the Ethernet config program becomes necessary on the ATARI to select the correct driver. Although that program is pretty simple and therefore rather small it means that now only one "major" program fits on a 130kB disk. So we need now 5(!) 130kB disk images instead 3 so far.
2019-05-08 16:46:47 +02:00
Oliver Schmidt
5499e53880 Added workaround for 6551 UART. 2019-05-06 17:47:02 +02:00
Andreas Urke
770bbfc6f6 Allow UART TX or RX to not be configured 2017-06-30 02:50:24 +02:00
Nicolas Tsiftes
f0bddb277c Merge pull request #2203 from herjulf/AES128HW
Atmel radio AES128 crypto engine support.
2017-06-22 14:14:17 +02:00
George Oikonomou
3800cb18a9 Merge pull request #2216 from herjulf/CCA
Atmel radio; Support for RADIO_PARAM_CCA_THRESHOLD plus rf_environment example
2017-06-02 22:40:27 +01:00
Robert Olsson
bb5d5546ce Atmel radio bug fix when setting tx-power. Spotted by Voravit Tanyingyong 2017-06-02 08:42:43 +02:00
Robert Olsson
bb90d50ba1 RADIO_PARAM_POWER_MODE for Atmel radio
modified:   cpu/avr/radio/rf230bb/rf230bb.c
	modified:   cpu/avr/radio/rf230bb/rf230bb.h
2017-06-01 17:30:30 +02:00
Robert Olsson
c2560498b6 Atmel radio; Support for RADIO_PARAM_CCA_THRESHOLD added 2017-05-05 12:55:03 +02:00
George Oikonomou
3cc5505b69 Merge pull request #1787 from g-oikonomou/contrib/cc26xx/improve-cca-monitoring
Use `ccaInfo.ccaState` to decide whether CCA is complete
2017-04-24 16:02:47 +01:00
George Oikonomou
7b193ee014 Merge pull request #1932 from g-oikonomou/contrib/cc1350/lp-and-st
Add support for the CC1350 LP and Sensortag
2017-04-24 15:34:22 +01:00
George Oikonomou
6a36a398bd Merge pull request #1931 from g-oikonomou/contrib/cc26xx-cc13xx/update-rf-api
Use TI-Provided CC13xx/CC26xx RF API
2017-04-24 15:33:14 +01:00
Robert Olsson
58517dfcbd AES128 HW crypto engine support for Atmel radios
modified:   cpu/avr/radio/rf230bb/atmega128rfa1_registermap.h
modified:   cpu/avr/radio/rf230bb/atmega256rfr2_registermap.h
modified:   cpu/avr/radio/rf230bb/rf230bb.c
modified:   cpu/avr/radio/rf230bb/rf230bb.h
2017-04-24 14:34:01 +02:00
Bernhard Hackl
848f801460 Fix several uninitialized variables 2017-04-19 01:55:27 -07:00
Oliver Schmidt
fa618ad86c Adjusted cc65 compiler options to recent cc65 option handling change. 2017-04-10 11:09:28 +02:00
Robert Olsson
aed5457332 Correct names for Atmel previous radio fixes plus static declarations. 2017-04-02 11:32:52 +02:00
Robert Olsson
093550ecbf Update for Atmel radio part II
modified:   cpu/avr/radio/rf230bb/halbb.c
	modified:   cpu/avr/radio/rf230bb/rf230bb.c
2017-03-31 18:38:27 +02:00
George Oikonomou
4425a67433 Merge pull request #2162 from posjodin/PR4
Updates for  Atmel radio
2017-03-31 12:24:55 +01:00
Robert Olsson
d6128852b2 Added missing register definitions in at86rf230_registermap.h
modified:   cpu/avr/radio/rf230bb/at86rf230_registermap.h
2017-03-29 11:32:39 +02:00
Robert Olsson
55daec98dc Added missing registers in
modified:   cpu/avr/radio/rf230bb/atmega128rfa1_registermap.h
2017-03-28 22:16:50 +02:00
Robert Olsson
94defe6ba2 Updates for Atmel RF233 radio in AtMega256rfr2 including register
update for MAC symbol counter. Basic functions for get/set-value
parameter setting added. SPI radios needs to be tested.

	modified:   cpu/avr/radio/rf230bb/atmega256rfr2_registermap.h
	modified:   cpu/avr/radio/rf230bb/rf230bb.c
2017-03-28 18:53:56 +02:00
Robert Olsson
bf8e77ea4e Added missing prototype
modified:   cpu/avr/radio/rf230bb/rf230bb.h
2017-03-24 17:07:35 +01:00
Robert Olsson
9e5aed5df6 Support for changing PANID and channel from project-conf.h
modified:   cpu/avr/radio/rf230bb/rf230bb.c
	modified:   platform/avr-rss2/contiki-conf.h
	modified:   platform/avr-rss2/contiki-main.c
2017-03-24 16:56:22 +01:00
Oliver Schmidt
356814fe9c Merge pull request #2146 from oliverschmidt/slip
Add SLIP support to retro platforms.
2017-03-18 15:56:06 +01:00
Oliver Schmidt
7f3fcbd8e7 Made it somewhat more obvious that this is SLIP-only. 2017-03-18 14:19:36 +01:00
George Oikonomou
6d51c1a9f9 Merge pull request #2138 from atiselsts/bugfix/cc26xx/limited_busywait
CC26xx IEEE mode driver fixes and robustness improvements
2017-03-17 23:09:11 +00:00
George Oikonomou
b91448dfa4 Merge pull request #1348 from g-oikonomou/bugfix/cc26xx/wait-for-rssi-valid
Wait for a valid RSSI reading in CC13xx/CC26xx RF drivers
2017-03-17 22:52:51 +00:00
Atis Elsts
c850bae186 CC26xx IEEE mode: introduce and use LIMITED_BUSYWAIT macro; avoids watchdog reboots in cases when the radio fails to turn off 2017-03-14 18:42:09 +00:00
Atis Elsts
3b090d97c7 CC26xx IEEE mode: more robust radio timer handling: do not crash the system in case the radio timer failed to start; allow the overflow checker to be called when the radio is off 2017-03-14 18:41:05 +00:00
Atis Elsts
dbd9d32daf CC26xx RF core: don't bail out from restarting the radio timer if just stopping it failed 2017-03-14 18:36:23 +00:00
Thanos Tsakiris
dbcac67aab Normalize code style with uncrustify 2017-03-08 17:09:53 +02:00
Thanos Tsakiris
d80f362a2b Adjust CC26xx/CC13xx ADC reading for gain and offset 2017-03-08 15:55:28 +02:00
George Oikonomou
809ca640a1 Merge pull request #2090 from atiselsts/bugfix/cc26xx_lqi
CC26xx IEEE mode radio: fix LQI reading
2017-02-18 22:25:01 +00:00
Oliver Schmidt
91beb8670f Added SLIP support to retro platforms.
The cc65 tool chain comes with V.24 drivers so it seems reasonable to use the existing Contiki SLIP driver to implement network access via SLIP as alternative to Ethernet.

Some notes:
- The Ethernet configuration was simplified in order to allow share it with SLIP.
- The Contiki SLIP driver presumes an interrupt driven serial receiver to write into the SLIP buffer. However the cc65 V.24 drivers aren't up to that. Therefore the main loops were extended to pull received data from the V.24 buffers and push it into the SLIP buffer.
- As far as I understand the serial sender is supposed to block until the data is sent. Therefore a loop calls the non-blocking V.24 driver until the data is sent.

On all platforms there's only one V.24 driver available. Therefore V.24 drivers are always loaded statically.

On the Apple][ the mouse driver is now loaded statically - independently from SLIP vs. Ethernet. After all there's only one mouse driver available. However there's a major benefit with SLIP: Here all drivers are loaded statically. Therefore the dynamic module loader isn't necessary at all. And without the loader the heap manager isn't necessary at all. This allows for a reduction in code size roughly compensating for the size of the SLIP buffer.
2017-02-15 23:43:28 +01:00
Oliver Schmidt
a6472c8dd9 Revert to static Ethernet driver for the ATARI.
After all there's no momentum for a W5100-based Ethernet solution on the ATARI. So I revert to static linkage of the CS8900A driver as this improves program load times.
2017-01-27 00:18:25 +01:00
Atis Elsts
cd1bcb101d CC26xx IEEE mode radio: fix reading lqi 2017-01-26 13:31:15 +00:00
George Oikonomou
07de8b238b Easy manipulation of CC13xx Prop Mode RX buffers 2017-01-15 12:25:10 +00:00
George Oikonomou
ba12ed2cce Re-initialise RX buffers each time we turn the RF on 2017-01-15 12:24:30 +00:00
George Oikonomou
7603e104c4 Allow band-specific RSSI offset override 2016-12-11 20:44:25 +00:00
George Oikonomou
47bda9b6be Provide additional overrides for the 470MHz frequency band 2016-12-11 20:44:25 +00:00
George Oikonomou
c745199d53 Allow frequency band-specific overrides 2016-12-11 20:44:25 +00:00
George Oikonomou
5756248949 Factor-out CC13xx PROP mode TX power table
The CC13xx PROP mode TX power table can differ between boards as well as across frequency bands. This commit provides defaults for all bands and allows the board to override.
2016-12-11 20:41:00 +00:00
George Oikonomou
7ca3bea701 Make LNA bias trim offset configurable 2016-12-11 20:40:24 +00:00
George Oikonomou
6b7681c516 Extend the RF core to support RF switches 2016-12-11 16:54:11 +00:00
George Oikonomou
e0e6f82c46 Allow boards to explicitly provide an RSSI offset 2016-12-11 16:54:10 +00:00
George Oikonomou
00944ec677 Allow boards to append to overrides 2016-12-11 16:54:10 +00:00
George Oikonomou
d9ea888323 Delegate RF Front End and Bias settings to board.h 2016-12-11 16:54:10 +00:00
Jonas Olsson
a56b520215 Make sure correct clocks is running in the RF Core (RFE). 2016-12-11 16:51:48 +00:00
Jonas Olsson
43b9679bcc Move setting of RF mode to correct place, needs to be called on every boot. 2016-12-11 16:51:48 +00:00
George Oikonomou
e73ac7d26f Update to latest overrides and patches 2016-12-11 16:51:48 +00:00