mirror of
https://github.com/apache/nuttx.git
synced 2026-03-28 02:59:15 +08:00
Merge remote-tracking branch 'origin/master' into composite
This commit is contained in:
56
ChangeLog
56
ChangeLog
@@ -14488,7 +14488,7 @@
|
||||
pthread_mutex_trytake() which does sem_trywait() and if successful,
|
||||
does correctly add the mutext to the TCB list. This should
|
||||
eliminated the assertion (2017-03-29).
|
||||
* 6loWPAN: IEEE802.15.4 MAC driver will need a special form of the
|
||||
* 6LoWPAN: IEEE802.15.4 MAC driver will need a special form of the
|
||||
network device structure to manage fragmentation of the large packet
|
||||
into frames (2017-03-29).
|
||||
* wireless/ieee802154: Adds MAC character driver structure.
|
||||
@@ -14544,10 +14544,10 @@
|
||||
Jussi Kivilinna (2017-03-31).
|
||||
* TCP/IPv6: Fix a compile issue when IPv6, but not IPv4 is enabled
|
||||
(2017-03-31).
|
||||
* net/: Fix MULTINIC/MULTILINK selection when 6loWPAN selected
|
||||
* net/: Fix MULTINIC/MULTILINK selection when 6LoWPAN selected
|
||||
(2017-03-31).
|
||||
* net/: Permit net/neighbor to build when IPv6 is defined, but not
|
||||
Ethernet. Needs more work to support 6loWPAN (2017-03-31).
|
||||
Ethernet. Needs more work to support 6LoWPAN (2017-03-31).
|
||||
* stm32f7: Serial fix for dropped data: (1) Revert the inherited dma
|
||||
bug from the stm32. see
|
||||
https://bitbucket.org/nuttx/nuttx/commits/df9ae3c13fc2fff2c21ebdb098c520b11f43280d
|
||||
@@ -14558,7 +14558,7 @@
|
||||
(2017-03-31).
|
||||
* stm32f7: stm32_sdmmc removed stray semicolon. From David Sidrane
|
||||
(2017-03-31).
|
||||
* 6loWPAN: Contiki 6loWPAN port is now complete (but completely
|
||||
* 6LoWPAN: Contiki 6LoWPAN port is now complete (but completely
|
||||
untested) (2017-04-02).
|
||||
* iee802154 loopback: Eliminate dependency on CONFIG_NET_LOOPBACK
|
||||
(2017-04-02).
|
||||
@@ -14572,11 +14572,11 @@
|
||||
* STM32: Add STM32L162VE to chip.h. From Juha Niskanen (2017-04-03).
|
||||
* iee802154 loopback: Eliminate dependency on CONFIG_NET_LOOPBACK
|
||||
(2017-04-02).
|
||||
* sim: Add a configuration for testing 6loWPAN (2017-04-03).
|
||||
* sim: Add a configuration for testing 6LoWPAN (2017-04-03).
|
||||
* wireless/ieee802154: Add initialization logic for loopback driver;
|
||||
configs/sim: Add configuration for testing 6loWPAN; net/sixlowpan:
|
||||
configs/sim: Add configuration for testing 6LoWPAN; net/sixlowpan:
|
||||
Fix for compilation with debug output enabled (2017-04-03).
|
||||
* 6loWPAN: Updates/fixes from initial testing with the IEEE802.15.4
|
||||
* 6LoWPAN: Updates/fixes from initial testing with the IEEE802.15.4
|
||||
loopback driver (2017-04-03).
|
||||
* STM32: Add I2C3 SDA pin mapping for STM32F411. From no1wudi
|
||||
(2017-04-04).
|
||||
@@ -14584,7 +14584,7 @@
|
||||
sensor. From Juha Niskanen (2017-04-04).
|
||||
* STM32: stm32_flash: Add EEPROM writing for STM32L15XX. From Juha
|
||||
Niskanen (2017-04-04).
|
||||
* 6loWPAN: Add option to dump buffers (2017-04-04).
|
||||
* 6LoWPAN: Add option to dump buffers (2017-04-04).
|
||||
* STM32: stm32l15xx_rcc: Add support for using MSI as system clock.
|
||||
From Juha Niskanen (2017-04-05).
|
||||
* STM32: stm32l15xxx_rcc: configure medium performance voltage range
|
||||
@@ -14634,7 +14634,7 @@
|
||||
to detect if RTC has valid time (after reset) or should application
|
||||
attempt to get real time by other means (for example, by launching
|
||||
ntpclient or GPS). From Jussi Kivilinna (2017-04-06).
|
||||
* 6loWPAN: Add network IOCTL support to set the node address
|
||||
* 6LoWPAN: Add network IOCTL support to set the node address
|
||||
(2017-04-06).
|
||||
* EFM32 I2C: Fix timeout calculation. From Masayuki Ishikawa
|
||||
(2017-04-06).
|
||||
@@ -14646,7 +14646,7 @@
|
||||
priority, such that if any writers come in they are given priority
|
||||
for writing. From Mark Schulte (2017-04-07).
|
||||
* pthread rwlock bugfixes. From Mark Schulte (2017-04-07).
|
||||
* 6loWPAN: Add calculation of TCP header size. It is not a constant
|
||||
* 6LoWPAN: Add calculation of TCP header size. It is not a constant
|
||||
(2017-04-07).
|
||||
* Restore TCP_HDRLEN to MSS calculation. Also add to UDP MSS
|
||||
calculation where it never appearred. Add some missing MSS and
|
||||
@@ -14741,7 +14741,7 @@
|
||||
CONFIG_NETDEV_MULTINIC. From Andreas Bihlmaier (2017-04-15).
|
||||
* networking: IPv4 change of last PR should also be applied to
|
||||
corresponding IPv6 logic (2017-04-15).
|
||||
* 6loWPAN: Add some checks for the case where there are multiple
|
||||
* 6LoWPAN: Add some checks for the case where there are multiple
|
||||
network devices and multiple link layer protocols (2017-04-15).
|
||||
* net/: Add IOCTL support for forwarding IEEE802.15.4 MAC and PHY
|
||||
IOCTLs (2017-04-15).
|
||||
@@ -14764,9 +14764,9 @@
|
||||
* photon: Add sdpcm tx basic support. From Simon Piriou (2017-04-16).
|
||||
* photon: Request firmware version and MAC address. From Simon Piriou
|
||||
(2017-04-16).
|
||||
* 6loWPAN network driver: Still only a skeleton but has some added
|
||||
* 6LoWPAN network driver: Still only a skeleton but has some added
|
||||
thought experimentation (2017-04-16).
|
||||
* 6loWPAN: Correct ordering of headers. fragmentation header was
|
||||
* 6LoWPAN: Correct ordering of headers. fragmentation header was
|
||||
coming out before FCF (2017-04-16).
|
||||
* wireless/ieee802154: Continues development on transmit structure.
|
||||
From Anthony Merlino (2017-04-17).
|
||||
@@ -14811,14 +14811,14 @@
|
||||
mac802154_chardevice_s. From Anthony Merlino (2017-04-19).
|
||||
* wireless/ieee802154: Changes radio interface to match MAC callback
|
||||
design. From Anthony Merlino (2017-04-19).
|
||||
* 6loWPAN: Fix a missing source address in header. Correct
|
||||
* 6LoWPAN: Fix a missing source address in header. Correct
|
||||
calculation of payload size (2017-04-19).
|
||||
* SAMV7 EMAC: Add conditional logic to account the fact that the
|
||||
SAMV71 has 6 rather than 3 queues after version 1. From Ian McAfee
|
||||
(2017-04-19).
|
||||
* wireless/ieee802154: Starts structuring transmission completion
|
||||
handling. From Anthony Merlino (2017-04-19).
|
||||
* 6loWPAN: Add an IOCTL to set the IEEE802.15.4 PAN ID (2017-04-19).
|
||||
* 6LoWPAN: Add an IOCTL to set the IEEE802.15.4 PAN ID (2017-04-19).
|
||||
* STM32 L1: stm32l15xx_rcc: Allow board to configure HSE clock in
|
||||
bypass-mode. Allows using MCO output from ST-link chip (on Nucleo
|
||||
and Discovery boards) as HSE input. From Juha Niskanen (2017-04-20).
|
||||
@@ -14852,17 +14852,17 @@
|
||||
Jussi Kivilinna (2017-04-21).
|
||||
* wireless/ieee802154: Simplifies TX completion interface. Documents
|
||||
and cleans up some functions. From Anthony Merlino (2017-04-21).
|
||||
* Remove the 6loWPAN PANID IOCTLs they are redundant (2017-04-21).
|
||||
* 6loWPAN: Remove the PAN ID from the 6loWPAN data structure. This is
|
||||
* Remove the 6LoWPAN PANID IOCTLs they are redundant (2017-04-21).
|
||||
* 6LoWPAN: Remove the PAN ID from the 6LoWPAN data structure. This is
|
||||
owned by the radio driver. Rather, use an IOCTL to obtain the PAN ID
|
||||
from the downstream radio driver (2017-04-21).
|
||||
* photon: Add basic wlan scan function. From Simon Piriou (2017-04-22).
|
||||
* 6loWPAN: Separate MAC-related definitions from sixlowpan.h. Put in
|
||||
* 6LoWPAN: Separate MAC-related definitions from sixlowpan.h. Put in
|
||||
ieee802154.h (2017-04-22).
|
||||
* net/: network drver now retains Ethernet MAC address in a union so
|
||||
that other link layer addresses may be used in a MULTILINK
|
||||
environment (2017-04-22).
|
||||
* 6loWPAN: Add IEEE802.15.4 Rime address to union of link layer
|
||||
* 6LoWPAN: Add IEEE802.15.4 Rime address to union of link layer
|
||||
addresses in the network driver (2017-04-22).
|
||||
* SAM3/4: Fixed configurations for TWI master. Obviously an
|
||||
incomplete port from SAMA5 (2017-04-23).
|
||||
@@ -14945,7 +14945,7 @@
|
||||
Simon Piriou (2017-04-28).
|
||||
* Add all network IOCTLs to include/sys/ioctl.h (2017-04-28).
|
||||
* Add all ieee802.15.4 IOCTLs to include/sys/ioctl.h (2017-04-28).
|
||||
* 6loWPAN: Can't reuse same header on each fragment. DSN needs to
|
||||
* 6LoWPAN: Can't reuse same header on each fragment. DSN needs to
|
||||
increment (2017-04-29).
|
||||
* SPI: Add an instance argument to the SPIDEV definitions (2017-04-29).
|
||||
* STM32F0: Add some protection. There is only one interrupt for
|
||||
@@ -15004,7 +15004,7 @@
|
||||
F7. From Juha Niskanen (2017-05-02).
|
||||
* STM32L4: stm32l4x6xx_pinmap: Update I2C4 and DCMI pins. From Juha
|
||||
Niskanen (2017-05-02).
|
||||
* 6loWPAN: Add basic call path to interface with the MAC layer through
|
||||
* 6LoWPAN: Add basic call path to interface with the MAC layer through
|
||||
the MAC network driver. Logic has not yet been implemented. This is
|
||||
just a structural change in preparation for additional changes
|
||||
(2017-05-02).
|
||||
@@ -15012,11 +15012,11 @@
|
||||
Merlino (2017-05-02).
|
||||
* wireless/ieee802154: Finishes some IOCTL logic for MAC layer. From
|
||||
Anthony Merlino (2017-05-02).
|
||||
* 6loWPAN: Changes to use new MAC interfaces. Incomplete and needs
|
||||
* 6LoWPAN: Changes to use new MAC interfaces. Incomplete and needs
|
||||
some clean-up of dangling, unused definitions (2017-05-03).
|
||||
* wireless/ieee802154: Starts work on setting PIB attributes. From
|
||||
Anthony Merlino (2017-05-03).
|
||||
* 6loWPAN: Fixes hang in loopback test (2017-05-03).
|
||||
* 6LoWPAN: Fixes hang in loopback test (2017-05-03).
|
||||
* drivers/wireless/bcmf: Fix frame not freed when dropped + cleanup.
|
||||
From Simon Piriou (2017-05-03).
|
||||
* STM32L4: stm32l4_i2c: Change wrong macro to CONFIG_I2C_POLLED. From
|
||||
@@ -15040,11 +15040,11 @@
|
||||
* Fix STM32F7 I2C interrupt handler. From Jussi Kivilinna (2017-05-04).
|
||||
* STM32F7 serial: Allow configuring Rx DMA buffer size. From Jussi
|
||||
Kivilinna (2017-05-04).
|
||||
* 6loWPAN: Replace Rime address naming with more consistent
|
||||
* 6LoWPAN: Replace Rime address naming with more consistent
|
||||
short/exended address terminology (2017-05-04).
|
||||
* 6loWPAN: Remove all ieee802.15.4 MAC knowledge from 6loWPAN. Now
|
||||
* 6LoWPAN: Remove all ieee802.15.4 MAC knowledge from 6LoWPAN. Now
|
||||
relies on wires/ieee802154 for all MAC-related operations (2017-05-04).
|
||||
* 6loWPAN: Local address length is fixed by the configuration. The
|
||||
* 6LoWPAN: Local address length is fixed by the configuration. The
|
||||
remote address be with short or extended (2017-05-04).
|
||||
* STM32L4: Separate SYSCFG into product line specific files for
|
||||
clarity. From Juha Niskanen (2017-05-05).
|
||||
@@ -15075,7 +15075,7 @@
|
||||
(2017-05-05).
|
||||
* STM32L4: Add support for many new MCUs from STM32L4X3XX product line
|
||||
and Nucleo-L452 board. From Juha Niskanen (2017-05-05).
|
||||
* 6loWPAN: Use information in struct ieee802154_data_ind_s when
|
||||
* 6LoWPAN: Use information in struct ieee802154_data_ind_s when
|
||||
reassembling a packet (2017-05-05).
|
||||
* ieee 802.15.4: Add a pool-based memory allocator for RX frame
|
||||
meta-data (2017-05-05).
|
||||
@@ -15096,7 +15096,7 @@
|
||||
Hides private data. From Anthony Merlino (2017-05-06).
|
||||
* STM32: Serial Allow configuring Rx DMA buffer size. From David
|
||||
Sidrane (2017-05-06).
|
||||
* 6loWPAN: Minor cleanup and re-verification of all compression modes
|
||||
* 6LoWPAN: Minor cleanup and re-verification of all compression modes
|
||||
after so many recent changes (2017-05-06).
|
||||
* Update the C coding standard document (2017-05-06).
|
||||
* IEEE 802.15.4 network driver. Remove support for multicast address
|
||||
|
||||
@@ -816,7 +816,7 @@
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
<li>IEEE 802.15.4 MAC + 6loWPAN</li>
|
||||
<li>IEEE 802.15.4 MAC + 6LoWPAN</li>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -3998,7 +3998,7 @@ nsh>
|
||||
<p>
|
||||
<b>MikroElektronika Clicker2 for STM32</b>.
|
||||
This is yet another board supported by NuttX that uses the same STM32F407VGT6 MCU as does the STM32F4-Discovery board.
|
||||
This board has been used primarily with the MRF24J40 Click board for the development of IEEE 802.15.4 MAC and 6loWPAN support.
|
||||
This board has been used primarily with the MRF24J40 Click board for the development of IEEE 802.15.4 MAC and 6LoWPAN support.
|
||||
<p>
|
||||
See the <a href="https://shop.mikroe.com/development-boards/starter/clicker-2/stm32f4">Mikroelektronika</a> website for more information about this board and the NuttX board <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/clicker2-stm32/README.txt" target="_blank">README</a> file for further information about the NuttX port.
|
||||
</p>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<h1><big><font color="#3c34ec">
|
||||
<i>NuttX C Coding Standard</i>
|
||||
</font></big></h1>
|
||||
<p>Last Updated: June 11, 2017</p>
|
||||
<p>Last Updated: June 18, 2017</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -2290,6 +2290,14 @@ x++;
|
||||
|
||||
<h2>4.5 <a name="switch"><code>switch</code> Statement</a></h2>
|
||||
|
||||
<p><b>Definitions:</b></p>
|
||||
<ul>
|
||||
<li>
|
||||
<b><i>Case logic</i></b>.
|
||||
By <i>case logic</i> it is mean the <code>case</code> or <code>default</code> and all of the lines of code following the <code>case</code> or <code>default</code> up to the next <code>case</code>, <code>default</code>, or the right brace indicating the end of the switch statement.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p><b>Coding Standard:</b></p>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -2306,17 +2314,22 @@ x++;
|
||||
The <code>default</code> case should always be present and trigger an error if it is reached when it should not be.
|
||||
</li>
|
||||
<li>
|
||||
<b>Case logic in braces</b>.
|
||||
It is preferable that all case logic (except for the <code>break</code>) be enclosed in braces.
|
||||
<b><i>Case logic</i> in braces</b>.
|
||||
It is preferable that all <i>case logic</i> (except for the <code>break</code>) be enclosed in braces.
|
||||
If you need to instantiate local variables in case logic, then that logic must be surrounded with braces.
|
||||
</li>
|
||||
<li>
|
||||
<b><code>break</code> outside of braces</b>.
|
||||
<code>break</code> statements are normally indented by two spaces.
|
||||
When used conditionally with case logic, the placement of the break statement follows normal indentation rules.
|
||||
When used conditionally with <i>case logic</i>, the placement of the break statement follows normal indentation rules.
|
||||
</li>
|
||||
<li>
|
||||
<b>Followed by a single blank line</b>.
|
||||
<b><i>Case logic</i> followed by a single blank line</b>.
|
||||
A single blank line must separate the <i>case logic</i> and any following <code>case</code> or <code>default</code>.
|
||||
The should, however, be no blank lines between the <i>case logic</i> and the closing right brace.
|
||||
</li>
|
||||
<li>
|
||||
<b>Switch followed by a single blank line</b>.
|
||||
The final right brace that closes the <code>switch <value></code> statement must be followed by a single blank line.
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
6loWPAN IPv6 over Low power Wireless Personal Area Networks
|
||||
6LoWPAN IPv6 over Low power Wireless Personal Area Networks
|
||||
ACM Abstract Control Model (USB)
|
||||
ADC Analog to Digital Conversion
|
||||
AIC Advanced Interrupt Controller (Atmel SAM)
|
||||
|
||||
14
ReleaseNotes
14
ReleaseNotes
@@ -13652,8 +13652,8 @@ Additional new features and extended functionality:
|
||||
incomplete and has not been verified.
|
||||
- IEEE 802.15.4 Network Loopback Driver: A simple IEEE 802.15.4 MAC
|
||||
loopback driver was developed. This driver allowed for parallel
|
||||
development of the IEEE 802.15.4 MAC and 6loWPAN.
|
||||
- 6loWPAN: The Contiki 6loWPAN stack has been ported so that works
|
||||
development of the IEEE 802.15.4 MAC and 6LoWPAN.
|
||||
- 6LoWPAN: The Contiki 6LoWPAN stack has been ported so that works
|
||||
within the NuttX networking framework and interfaces with the new
|
||||
IEEE 802.15.4 MAC via the network driver. Live testing with
|
||||
IEEE 802.15.4 radios has not yet been done; all testing has used
|
||||
@@ -13721,7 +13721,7 @@ Additional new features and extended functionality:
|
||||
|
||||
* Simulation
|
||||
|
||||
- configs/sim/sixlowpan: Configuration for testing the 6loWPAN with
|
||||
- configs/sim/sixlowpan: Configuration for testing the 6LoWPAN with
|
||||
the IEEE 802.15.4 loopback network driver.
|
||||
|
||||
* Infineon XMC4xxx:
|
||||
@@ -13926,7 +13926,7 @@ Additional new features and extended functionality:
|
||||
default is +x. No printing of a trace of script commands as they are
|
||||
executed. From David Sidrane.
|
||||
- Print expanded variables if -x. From David Sidrane.
|
||||
- ifconfig command: Extend ifconfig to support 6loWPAN. Adapt to
|
||||
- ifconfig command: Extend ifconfig to support 6LoWPAN. Adapt to
|
||||
some changes in configuration variable usage.
|
||||
- Network initialization: If IEEE802.11 selected use wlan0 instead of
|
||||
eth0 for network device name.
|
||||
@@ -13949,11 +13949,11 @@ Additional new features and extended functionality:
|
||||
cleanup handlers. From Juha Niskanen.
|
||||
- examples/usrsocktest: Add application for USRSOCK testing. From
|
||||
Jussi Kivilinna.
|
||||
- examples/nettest: Adapt for use in testing 6loWPAN.
|
||||
- examples/nettest: Adapt for use in testing 6LoWPAN.
|
||||
- examples/nettest: If doing loopback, but not using the official
|
||||
loopback device, then use the server should use the configured client
|
||||
IP address.
|
||||
- examples/udpblaster: Several fixes to work with 6loWPAN.
|
||||
- examples/udpblaster: Several fixes to work with 6LoWPAN.
|
||||
- examples/udpblaster: Add logic to bind the local UDP socket to a
|
||||
well-known address.
|
||||
- examples/configdata: Add stacksize and priority. From Juha Niskanen.
|
||||
@@ -13962,7 +13962,7 @@ Additional new features and extended functionality:
|
||||
|
||||
- netutils/netlib: Add IEEE 802.11 wireless IOCTL wrappers.
|
||||
- netutils/netlib: Add a helper function to convert a string to a
|
||||
6loWPAN node address.
|
||||
6LoWPAN node address.
|
||||
- netlib and NSH: Add logic to get/set the IEEE802.15.4 PAN ID.
|
||||
- netutils/dhcpc: Make the network device name a configuration
|
||||
option. Was hardcoded to eth0 but may, instead, need to be wlan0.
|
||||
|
||||
296
TODO
296
TODO
@@ -1,4 +1,4 @@
|
||||
NuttX TODO List (Last updated June 14, 2017)
|
||||
NuttX TODO List (Last updated June 18, 2017)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This file summarizes known NuttX bugs, limitations, inconsistencies with
|
||||
@@ -9,22 +9,22 @@ issues related to each board port.
|
||||
|
||||
nuttx/:
|
||||
|
||||
(11) Task/Scheduler (sched/)
|
||||
(12) Task/Scheduler (sched/)
|
||||
(1) SMP
|
||||
(1) Memory Management (mm/)
|
||||
(0) Power Management (drivers/pm)
|
||||
(3) Signals (sched/signal, arch/)
|
||||
(3) pthreads (sched/pthread)
|
||||
(4) pthreads (sched/pthread)
|
||||
(0) Message Queues (sched/mqueue)
|
||||
(8) Kernel/Protected Build
|
||||
(3) C++ Support
|
||||
(6) Binary loaders (binfmt/)
|
||||
(14) Network (net/, drivers/net)
|
||||
(16) Network (net/, drivers/net)
|
||||
(4) USB (drivers/usbdev, drivers/usbhost)
|
||||
(0) Other drivers (drivers/)
|
||||
(12) Libraries (libc/, libm/)
|
||||
(13) Libraries (libc/, libm/)
|
||||
(10) File system/Generic drivers (fs/, drivers/)
|
||||
(9) Graphics Subsystem (graphics/)
|
||||
(10) Graphics Subsystem (graphics/)
|
||||
(3) Build system / Toolchains
|
||||
(3) Linux/Cywgin simulation (arch/sim)
|
||||
(4) ARM (arch/arm/)
|
||||
@@ -34,6 +34,7 @@ apps/ and other Add-Ons:
|
||||
(2) Network Utilities (apps/netutils/)
|
||||
(1) NuttShell (NSH) (apps/nshlib)
|
||||
(1) System libraries apps/system (apps/system)
|
||||
(1) Modbus (apps/modbus)
|
||||
(1) Pascal add-on (pcode/)
|
||||
(4) Other Applications & Tests (apps/examples/)
|
||||
|
||||
@@ -234,32 +235,65 @@ o Task/Scheduler (sched/)
|
||||
could be improved and made a little more efficient with this
|
||||
change.
|
||||
|
||||
Title: INAPPROPRIATE USE OF sched_lock() BY pthreads
|
||||
Description: In implementation of standard pthread functions, the non-
|
||||
standard, NuttX function sched_lock() is used. This is very
|
||||
strong sense it disables pre-emption for all threads in all
|
||||
task groups. I believe it is only really necessary in most
|
||||
cases to lock threads in the task group with a new non-
|
||||
standard interface, say pthread_lock().
|
||||
Task: IDLE THREAD TCB SETUP
|
||||
Description: There are issues with setting IDLE thread stacks:
|
||||
|
||||
This is because the OS resources used by a thread such as
|
||||
mutexes, condition variable, barriers, etc. are only
|
||||
meaningful from within the task group. So, in order to
|
||||
performance exclusive operations on these resources, it is
|
||||
only necessary to block other threads executing within the
|
||||
task group.
|
||||
1. One problem is stack-related data in the IDLE threads TCB.
|
||||
A solution might be to standardize the use of g_idle_topstack.
|
||||
That you could add initialization like this in os_start:
|
||||
|
||||
This is an easy change: pthread_lock() and pthread_unlock()
|
||||
would simply operate on a semaphore retained in the task
|
||||
group structure. I am, however, hesitant to make this change:
|
||||
I the flat build model, there is nothing that prevents people
|
||||
from accessing the inter-thread controls from threads in
|
||||
differnt task groups. Making this change, while correct,
|
||||
might introduce subtle bugs in code by people who are not
|
||||
using NuttX correctly.
|
||||
Status: Open
|
||||
Priority: Low. This change would improve real-time performance of the
|
||||
OS but is not otherwise required.
|
||||
@@ -344,6 +347,11 @@ void os_start(void)
|
||||
g_idleargv[1] = NULL;
|
||||
g_idletcb.argv = g_idleargv;
|
||||
|
||||
+ /* Set the IDLE task stack size */
|
||||
+
|
||||
+ g_idletcb.cmn.adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
+ g_idletcb.cmn.stack_alloc_ptr = (void *)(g_idle_topstack - CONFIG_IDLETHREAD_STACKSIZE);
|
||||
+
|
||||
/* Then add the idle task's TCB to the head of the ready to run list */
|
||||
|
||||
dq_addfirst((FAR dq_entry_t *)&g_idletcb, (FAR dq_queue_t *)&g_readytorun);
|
||||
|
||||
The g_idle_topstack variable is available for almost all architectures:
|
||||
|
||||
$ find . -name *.h | xargs grep g_idle_top
|
||||
./arm/src/common/up_internal.h:EXTERN const uint32_t g_idle_topstack;
|
||||
./avr/src/avr/avr.h:extern uint16_t g_idle_topstack;
|
||||
./avr/src/avr32/avr32.h:extern uint32_t g_idle_topstack;
|
||||
./hc/src/common/up_internal.h:extern uint16_t g_idle_topstack;
|
||||
./mips/src/common/up_internal.h:extern uint32_t g_idle_topstack;
|
||||
./misoc/src/lm32/lm32.h:extern uint32_t g_idle_topstack;
|
||||
./renesas/src/common/up_internal.h:extern uint32_t g_idle_topstack;
|
||||
./renesas/src/m16c/chip.h:extern uint32_t g_idle_topstack; /* Start of the heap */
|
||||
./risc-v/src/common/up_internal.h:EXTERN uint32_t g_idle_topstack;
|
||||
./x86/src/common/up_internal.h:extern uint32_t g_idle_topstack;
|
||||
|
||||
That omits there architectures: sh1, sim, xtensa, z16, z80,
|
||||
ez80, and z8. All would have to support this common
|
||||
globlal variable.
|
||||
|
||||
Also, the stack itself may be 8-, 16-, or 32-bits wide,
|
||||
depending upon the architecture.
|
||||
|
||||
2. Another problem is colorizing that stack to use with
|
||||
stack usage monitoring logic. There is logic in some
|
||||
start functions to do this in a function called go_os_start.
|
||||
It is available in these architectures:
|
||||
|
||||
./arm/src/efm32/efm32_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/kinetis/kinetis_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/sam34/sam_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/samv7/sam_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/stm32/stm32_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/stm32f7/stm32_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/stm32l4/stm32l4_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/tms570/tms570_boot.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
./arm/src/xmc4/xmc4_start.c:static void go_os_start(void *pv, unsigned int nbytes)
|
||||
|
||||
But no others.
|
||||
Status: Open
|
||||
Priority: Low, only needed for more complete debug.
|
||||
|
||||
o SMP
|
||||
^^^
|
||||
@@ -534,6 +568,33 @@ o pthreads (sched/pthreads)
|
||||
Priority: Medium-low. Priority may be higher if system call overheade becomes
|
||||
an issue.
|
||||
|
||||
Title: INAPPROPRIATE USE OF sched_lock() BY pthreads
|
||||
Description: In implementation of standard pthread functions, the non-
|
||||
standard, NuttX function sched_lock() is used. This is very
|
||||
strong sense it disables pre-emption for all threads in all
|
||||
task groups. I believe it is only really necessary in most
|
||||
cases to lock threads in the task group with a new non-
|
||||
standard interface, say pthread_lock().
|
||||
|
||||
This is because the OS resources used by a thread such as
|
||||
mutexes, condition variable, barriers, etc. are only
|
||||
meaningful from within the task group. So, in order to
|
||||
performance exclusive operations on these resources, it is
|
||||
only necessary to block other threads executing within the
|
||||
task group.
|
||||
|
||||
This is an easy change: pthread_lock() and pthread_unlock()
|
||||
would simply operate on a semaphore retained in the task
|
||||
group structure. I am, however, hesitant to make this change:
|
||||
I the flat build model, there is nothing that prevents people
|
||||
from accessing the inter-thread controls from threads in
|
||||
differnt task groups. Making this change, while correct,
|
||||
might introduce subtle bugs in code by people who are not
|
||||
using NuttX correctly.
|
||||
Status: Open
|
||||
Priority: Low. This change would improve real-time performance of the
|
||||
OS but is not otherwise required.
|
||||
|
||||
o Message Queues (sched/mqueue)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1171,6 +1232,64 @@ o Network (net/, drivers/net)
|
||||
deal with a list of devices. That would be a huge effect and
|
||||
certainly doesn't dount as a "simple solution".
|
||||
|
||||
Title: ICMPv6 FOR 6LoWPAN
|
||||
Description: The current ICMPv6 and neighbor-related logic only works with
|
||||
Ethernet MAC. For 6LoWPAN, a new more conservative IPv6
|
||||
neigbor discovery is provided by RFC 6775. This RFC needs to
|
||||
be supported in order to support ping6 on a 6LoWPAN network.
|
||||
If RFC 6775 were implemented, then arbitrary IPv6 addresses,
|
||||
including addresses from DHCPv6 could be used.
|
||||
can
|
||||
|
||||
UPDATE: With IPv6 neighbor discovery, any IPv6 address may
|
||||
be associated with any short or extended address. In fact,
|
||||
that is the whole purpose of the neighbor discover logic: It
|
||||
plays the same role as ARP in IPv4; it ultimately just manages
|
||||
a neighbor table that, like the arp table, provides the
|
||||
mapping between IP addresses and node addresses.
|
||||
|
||||
The NuttX, Contiki-based 6LoWPAN implementation circumvented
|
||||
the need for the neighbor discovery logic by using only MAC-
|
||||
based addressing, i.e., the lower two or eight bytes of the
|
||||
IP address are the node address.
|
||||
|
||||
Most of the 6LoWPAN compression algorithms exploit this to
|
||||
compress the IPv6 address to nothing but a bit indicating
|
||||
that the IP address derives from the node address. So I
|
||||
think IPv6 neighbor discover is useless in the current
|
||||
implementation.
|
||||
|
||||
If we want to use IPv6 neighbor discovery, we could dispense
|
||||
with the all MAC based addressing. But if we want to retain
|
||||
the more compact MAC-based addressing, then we don't need
|
||||
IPv6 neighbor discovery.
|
||||
|
||||
So, the full neighbor discovery logic is not currently useful,
|
||||
but it would still be nice to have enough in place to support
|
||||
ping6. Full neighbor support would probably be necessary if we
|
||||
wanted to route 6LoWPAN frames outside of the WPAN.
|
||||
|
||||
Status: Open
|
||||
Priority: Low for now. I don't plan on implementing this. It would
|
||||
only be relevant if we were to decide to abandon the use of
|
||||
MAC-based addressing in the 6LoWPAN implementation.
|
||||
|
||||
Title: ETHERNET LOCAL BROADCAST DOES NOT WORK
|
||||
|
||||
Description: In case of "local broadcast" the system still send ARP
|
||||
request to the destination, but it shouldn't, it should
|
||||
broadcast. For Example, the system has network with IP
|
||||
10.0.0.88, netmask of 255.255.255.0, it should send
|
||||
messages for 10.0.0.255 as broadcast, and not send ARP
|
||||
for 10.0.0.255
|
||||
|
||||
For more easier networking, the next line should have give
|
||||
me the broadcast address of the network, but it doesn't:
|
||||
|
||||
ioctl(_socket_fd, SIOCGIFBRDADDR, &bc_addr);
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
o USB (drivers/usbdev, drivers/usbhost)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1532,6 +1651,64 @@ o Libraries (libc/, libm/)
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Title: FORMATTING FIXED WIDTH INTEGERS
|
||||
Description: Formats like this: lib_vsprintf(_, "%6.6u", 0) do not work.
|
||||
There is no support for the precision/width option with
|
||||
integer types. The format is simply is ignored and so can
|
||||
even cause crashes.
|
||||
|
||||
For example:
|
||||
|
||||
int hello_main(int argc, char *argv[])
|
||||
{
|
||||
printf("Hello, World!!\n");
|
||||
printf("%3.3u %3.3u %3.3u %3.3u %3.3u\n", 9, 99, 999, 9999, 99999);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Generates this incorrect output:
|
||||
|
||||
|
||||
NuttShell (NSH) NuttX-7.20
|
||||
nsh> hello
|
||||
Hello, World!!
|
||||
9 99 999 9999 99999
|
||||
nsh>
|
||||
|
||||
That output, of course, should have been:
|
||||
|
||||
9 99 999 999 999
|
||||
|
||||
The period and the precision value were being ignored (if
|
||||
floating point was disabled). In that case, parsing of the
|
||||
variable arguments could get out of sync. But a side
|
||||
effect of the referenced change is that precision value is
|
||||
now always parsed (but still incorrectly ignored for the
|
||||
case of integer formats).
|
||||
|
||||
The fix would not be too difficult but would involve change
|
||||
several functions. It would involve clipping the size of the
|
||||
number string. For example:
|
||||
|
||||
/* Get the width of the output */
|
||||
|
||||
uwidth = getusize(FMT_CHAR, flags, n);
|
||||
if (trunc > 0 && uwidth > trunc)
|
||||
{
|
||||
uwidth = trunc;
|
||||
}
|
||||
|
||||
Then limiting the length of the output string to uwidth.
|
||||
This would probably mean passing an additional parameter to
|
||||
the many *toascii() functions like:
|
||||
|
||||
/* Output the number */
|
||||
|
||||
utoascii(obj, FMT_CHAR, flags, (unsigned int)n, uwidth);
|
||||
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
o File system / Generic drivers (fs/, drivers/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1830,6 +2007,16 @@ o Graphics Subsystem (graphics/)
|
||||
the single user mode, it will be yanked out from under your
|
||||
feet in the not-so-distant future.
|
||||
|
||||
Title: WIDE-FOUNT SUPPORT
|
||||
Description: Wide fonts are not currently supported by the NuttX graphics sub-
|
||||
system. There is some discussion here:
|
||||
|
||||
https://groups.yahoo.com/neo/groups/nuttx/conversations/topics/3507
|
||||
http://www.nuttx.org/doku.php?id=wiki:graphics:wide-fonts
|
||||
|
||||
Status: Open
|
||||
Priority: Low for many, but I imagine higher in countries that use wide fonts
|
||||
|
||||
o Build system
|
||||
^^^^^^^^^^^^
|
||||
|
||||
@@ -1887,6 +2074,30 @@ o Build system
|
||||
see that the .a archive file has the newer time stamp and those .o
|
||||
file will never be added to the archive until the directory is cleaned
|
||||
or some other dependency changes.
|
||||
|
||||
UPDATE: There is another way that Control-C can break dependencies:
|
||||
If you control-c out of the make during the apps/ part of the build,
|
||||
the archive at apps/libapps.a is deleted. You can see this in the
|
||||
make outout, for example:
|
||||
|
||||
CC: ieee802154_getsaddr.c
|
||||
make[2]: *** [Makefile:104: ieee802154_getsaddr.o] Interrupt
|
||||
make: *** Deleting file '../apps/libapps.a'
|
||||
|
||||
When you rebuild the system, the first file archived will recreate
|
||||
libapps.a and set the timestamp to the current time. Then, none of
|
||||
the other object files will be added to the archive because they are
|
||||
all older.
|
||||
|
||||
The typical symptom of such an issue is a link time error like:
|
||||
|
||||
LD: nuttx libsched.a(os_bringup.o): In function `os_bringup':
|
||||
os_bringup.c:(.text+0x34): undefined reference to `nsh_main'
|
||||
|
||||
The work-around for now is:
|
||||
|
||||
$ make apps_distclean
|
||||
|
||||
Status Open
|
||||
Priority: Medium-High. It is a rare event that control-C happens at just the
|
||||
point in time. However, when it does occur the resulting code may
|
||||
@@ -1926,6 +2137,7 @@ o Build system
|
||||
The .archive file would have to be removed on 'make clean' and would
|
||||
also need to appear in .gitignore files.
|
||||
|
||||
|
||||
o Other drivers (drivers/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -2151,6 +2363,30 @@ o System libraries apps/system (apps/system)
|
||||
Priority: Low (unless you are using mixed C-buffered I/O with readline and
|
||||
fgetc, for example).
|
||||
|
||||
o Modbus (apps/modbus)
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Title: MODBUS NOT USABLE WITH USB SERIAL
|
||||
Description: Modbus can be used with USB serial, however, if the USB
|
||||
serial connectiont is lost, Modbus will hang in an infinite
|
||||
loop.
|
||||
|
||||
This is a problem in the handling of select() and read()
|
||||
and could probabaly resolved by studying the Modbus error
|
||||
handling.
|
||||
|
||||
A more USB-friendly solution would be to: (1) Re-connect and
|
||||
(2) re-open the serial drviers. That is what is done is NSH.
|
||||
When the serial USB device is removed, this terminates the
|
||||
session and NSH will then try to re-open the USB device. See
|
||||
the function nsh_waitusbready() in the file
|
||||
apps/nshlib/nsh_usbconsole.c. When the USB serial is
|
||||
reconnected the open() in the function will succeed and a new
|
||||
session will be started.
|
||||
Status: Open
|
||||
Priority: Low. This is really an enhancement request: Modbus was never
|
||||
designed to work with removable serial devices.
|
||||
|
||||
o Pascal Add-On (pcode/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -254,7 +254,8 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429)
|
||||
#if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \
|
||||
defined(CONFIG_STM32_STM32F469)
|
||||
# define STM32_FLASH_OPTCR1_OFFSET 0x0018
|
||||
#endif
|
||||
|
||||
@@ -287,7 +288,8 @@
|
||||
# elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
|
||||
# define STM32_FLASH_OPTCR (STM32_FLASHIF_BASE+STM32_FLASH_OPTCR_OFFSET)
|
||||
# endif
|
||||
# if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429)
|
||||
# if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \
|
||||
defined(CONFIG_STM32_STM32F469)
|
||||
# define STM32_FLASH_OPTCR1 (STM32_FLASHIF_BASE+STM32_FLASH_OPTCR1_OFFSET)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
#define STM32_HRTIM_CMN_ICR_OFFSET 0x000C /* HRTIM Interrupt Clear Register */
|
||||
#define STM32_HRTIM_CMN_IER_OFFSET 0x0010 /* HRTIM Interrupt Enable Register */
|
||||
#define STM32_HRTIM_CMN_OENR_OFFSET 0x0014 /* HRTIM Output Enable Register */
|
||||
#define STM32_HRTIM_CMN_DISR_OFFSET 0x0018 /* HRTIM Output Disable Register */
|
||||
#define STM32_HRTIM_CMN_ODISR_OFFSET 0x0018 /* HRTIM Output Disable Register */
|
||||
#define STM32_HRTIM_CMN_ODSR_OFFSET 0x001C /* HRTIM Output Disable Status Register */
|
||||
#define STM32_HRTIM_CMN_BMCR_OFFSET 0x0020 /* HRTIM Burst Mode Control Register */
|
||||
#define STM32_HRTIM_CMN_BMTRGR_OFFSET 0x0024 /* HRTIM Burst Mode Trigger Register */
|
||||
@@ -132,79 +132,6 @@
|
||||
#define STM32_HRTIM_CMN_BDTEUPR_OFFSET 0x006C /* HRTIM Timer E Update Register */
|
||||
#define STM32_HRTIM_CMN_BDMADR_OFFSET 0x0070 /* HRTIM DMA Data Register */
|
||||
|
||||
/* Register Addresses *******************************************************************************/
|
||||
|
||||
/* HRTIM1 Timer A */
|
||||
/* remove ? */
|
||||
|
||||
#define STM32_HRTIM1_TIMERA_CR (STM32_HRTIM_TIM_CR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_ISR (STM32_HRTIM_TIM_ISR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_ICR (STM32_HRTIM_TIM_ICR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_DIER (STM32_HRTIM_TIM_DIER_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CNTR (STM32_HRTIM_TIM_CNTR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_PER (STM32_HRTIM_TIM_PER_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_REP (STM32_HRTIM_TIM_REP_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CMP1R (STM32_HRTIM_TIM_CMP1R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CMP1CR (STM32_HRTIM_TIM_CMP1CR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CMP2R (STM32_HRTIM_TIM_CMP2R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CMP3R (STM32_HRTIM_TIM_CMP3R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CMP4R (STM32_HRTIM_TIM_CMP4R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CPT1R (STM32_HRTIM_TIM_CMPT1R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CPT2R (STM32_HRTIM_TIM_CMPT2R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_DTR (STM32_HRTIM_TIM_DTR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_SET1R (STM32_HRTIM_TIM_SET1R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_RST1R (STM32_HRTIM_TIM_RST1R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_SET2R (STM32_HRTIM_TIM_SET2R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_RST2R (STM32_HRTIM_TIM_RST2R_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_EEFR1 (STM32_HRTIM_TIM_EEFR1_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_EEFR2 (STM32_HRTIM_TIM_EEFR2_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_RSTR (STM32_HRTIM_TIM_RSTR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CHPR (STM32_HRTIM_TIM_CHPR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CPT1CR (STM32_HRTIM_TIM_CPT1CR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_CPT2CR (STM32_HRTIM_TIM_CPT2CR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_OUTR (STM32_HRTIM_TIM_OUTR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
#define STM32_HRTIM1_TIMERA_FLTR (STM32_HRTIM_TIM_FLTR_OFFSET+STM32_HRTIM1_TIMERA_BASE)
|
||||
|
||||
/* HRTIM1 Timer B */
|
||||
|
||||
/* HRTIM1 Timer C */
|
||||
|
||||
/* HRTIM1 Timer D */
|
||||
|
||||
/* HRTIM1 Timer E */
|
||||
|
||||
/* HRTIM1 Common Registers */
|
||||
|
||||
#define STM32_HRTIM_CMN_CR1 (STM32_HRTIM_CMN_CR1_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_CR2 (STM32_HRTIM_CMN_CR2_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_ISR (STM32_HRTIM_CMN_ISR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_ICR (STM32_HRTIM_CMN_ICR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_IER (STM32_HRTIM_CMN_IER_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_OENR (STM32_HRTIM_CMN_OENR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_DISR (STM32_HRTIM_CMN_DISR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_ODSR (STM32_HRTIM_CMN_ODSR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BMCR (STM32_HRTIM_CMN_BMCR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BMTGR (STM32_HRTIM_CMN_BMTGR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BMCMPR (STM32_HRTIM_CMN_MBCMPR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BMPER (STM32_HRTIM_CMN_BMPER_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_EECR1 (STM32_HRTIM_CMN_EECR1_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_EECR2 (STM32_HRTIM_CMN_EECR2_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_EECR3 (STM32_HRTIM_CMN_EECR3_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_ADC1R (STM32_HRTIM_CMN_ADC1R_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_ADC2R (STM32_HRTIM_CMN_ADC2R_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_ADC3R (STM32_HRTIM_CMN_ADC3R_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_ADC4R (STM32_HRTIM_CMN_ADC4R_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_DLLCR (STM32_HRTIM_CMN_DLLCR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_FLTINR1 (STM32_HRTIM_CMN_FTLINR1_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_FLTINR2 (STM32_HRTIM_CMN_FLTINR2_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BDMUPDR (STM32_HRTIM_CMN_BDMUPDR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BDTAUPR (STM32_HRTIM_CMN_BDTAUPR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BDTBUPR (STM32_HRTIM_CMN_BDTBUR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BDTCUPR (STM32_HRTIM_CMN_BDTCUPR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BDTDUPR (STM32_HRTIM_CMN_BDTDUPR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BDTEUPR (STM32_HRTIM_CMN_BDTEUPR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
#define STM32_HRTIM_CMN_BDMADR (STM32_HRTIM_CMN_BDMADR_OFFSET+STM32_HRTIM1_CMN_BASE)
|
||||
|
||||
/* Register Bitfield Definitions ****************************************************/
|
||||
|
||||
/* Control Register Bits Common to Master Timer and Timer A-E */
|
||||
@@ -1136,11 +1063,12 @@
|
||||
|
||||
/* Timer X Fault Register */
|
||||
|
||||
#define HRTIM_TIMFLT_FLT1EN (1 << 0) /* Bit 0 */
|
||||
#define HRTIM_TIMFLT_FLT2EN (1 << 1) /* Bit 1 */
|
||||
#define HRTIM_TIMFLT_FLT3EN (1 << 2) /* Bit 2 */
|
||||
#define HRTIM_TIMFLT_FLT4EN (1 << 3) /* Bit 3 */
|
||||
#define HRTIM_TIMFLT_FLT5EN (1 << 4) /* Bit 4 */
|
||||
#define HRTIM_TIMFLT_FLT1EN (1 << 0) /* Bit 0: Fault1 enable */
|
||||
#define HRTIM_TIMFLT_FLT2EN (1 << 1) /* Bit 1: Fault 2 enable */
|
||||
#define HRTIM_TIMFLT_FLT3EN (1 << 2) /* Bit 2: Fault 3 enable*/
|
||||
#define HRTIM_TIMFLT_FLT4EN (1 << 3) /* Bit 3: Fault 4 enable */
|
||||
#define HRTIM_TIMFLT_FLT5EN (1 << 4) /* Bit 4: Fault 5 enable */
|
||||
#define HRTIM_TIMFLT_FLTLCK (1 << 31) /* Bit 31: Fault sources lock*/
|
||||
|
||||
/* Common Control Register 1 */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -67,6 +67,7 @@
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
|
||||
#include "cache.h"
|
||||
#include "chip.h"
|
||||
#include "stm32_rcc.h"
|
||||
#include "stm32_tim.h"
|
||||
@@ -1131,6 +1132,9 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg)
|
||||
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
|
||||
int i;
|
||||
|
||||
arch_invalidate_dcache((uintptr_t)priv->dmabuffer,
|
||||
(uintptr_t)priv->dmabuffer + sizeof(priv->dmabuffer));
|
||||
|
||||
/* Verify that the upper-half driver has bound its callback functions */
|
||||
|
||||
if (priv->cb != NULL)
|
||||
@@ -1149,6 +1153,7 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Restart DMA for the next conversion series */
|
||||
|
||||
adc_modifyreg(priv, STM32_ADC_DMAREG_OFFSET, ADC_DMAREG_DMA, 0);
|
||||
@@ -1347,7 +1352,7 @@ static void adc_reset(FAR struct adc_dev_s *dev)
|
||||
adc_getreg(priv, STM32_ADC_SR_OFFSET),
|
||||
adc_getreg(priv, STM32_ADC_CR1_OFFSET),
|
||||
adc_getreg(priv, STM32_ADC_CR2_OFFSET));
|
||||
|
||||
|
||||
ainfo("SQR1: 0x%08x SQR2: 0x%08x SQR3: 0x%08x\n",
|
||||
adc_getreg(priv, STM32_ADC_SQR1_OFFSET),
|
||||
adc_getreg(priv, STM32_ADC_SQR2_OFFSET),
|
||||
|
||||
@@ -78,7 +78,7 @@ Board Features
|
||||
This cannot integrate cleanly with the NuttX network stack. A
|
||||
USERSOCK option was recently added that would permit implementation
|
||||
of the Inventek support in an applications. But that would then
|
||||
preclude the 6loWPAN integration into IPv6.
|
||||
preclude the 6LoWPAN integration into IPv6.
|
||||
|
||||
2. The board uses Bluetooth® V4.1 module (SPBTLE-RF), which has built-in
|
||||
BLE stack. Similar with wifi, you only use simple AT command to talk
|
||||
|
||||
@@ -365,7 +365,7 @@ Configurations
|
||||
nsh> i8 /dev/ieee0 startpan
|
||||
nsh> i8 acceptassoc
|
||||
|
||||
2. Assocate and endpoint device with the WPAN. On the endpoint
|
||||
2. Assocate an endpoint device with the WPAN. On the endpoint
|
||||
device:
|
||||
|
||||
nsh> i8 /dev/ieee0 assoc
|
||||
@@ -374,7 +374,7 @@ Configurations
|
||||
|
||||
This is another version of nsh that is very similar to the mrf24j40-mac
|
||||
configuration but is focused on testing the IEEE 802.15.4 MAC
|
||||
integration with the 6loWPAN network stack. It derives directly from the
|
||||
integration with the 6LoWPAN network stack. It derives directly from the
|
||||
mrf24j40-mac and all NOTES provided there apply. Additional differences
|
||||
are summarized below:
|
||||
|
||||
@@ -426,16 +426,33 @@ Configurations
|
||||
the system has crashed because (a) it will be unresponsive and (b)
|
||||
the LD2 will be blinking at about 2Hz.
|
||||
|
||||
4. IPv6 networking is enabled with TCP/IP, UDP, 6loWPAN, and NSH
|
||||
4. IPv6 networking is enabled with TCP/IP, UDP, 6LoWPAN, and NSH
|
||||
Telnet support.
|
||||
|
||||
5. Configuration instructions: Basic PAN configuration is the same as
|
||||
for the ieee802154-mac configuration with the exception that after
|
||||
the PAN has been configured with the i8sak utility, you must
|
||||
explicity bring the network up:
|
||||
explicity bring the network up on each node:
|
||||
|
||||
nsh> ifup wpan0
|
||||
|
||||
6. examples/udp is enabled. This will allow two MRF24J40 nodes to
|
||||
exchange UDP packets. Basic instructions:
|
||||
|
||||
On the server node:
|
||||
|
||||
nsh> ifconfig wpan0
|
||||
nsh> udpserver &
|
||||
|
||||
The ifconfig command will show the IP address of the server. Then on
|
||||
the client node use this IP address to start the client:
|
||||
|
||||
nsh> udpserver <server-ip> &
|
||||
|
||||
Where <server-ip> is the IP address of the server that you got above.
|
||||
NOTE: There is no way to stop the UDP test once it has been started
|
||||
other than by resetting the board.
|
||||
|
||||
nsh:
|
||||
|
||||
Configures the NuttShell (nsh) located at examples/nsh. This
|
||||
|
||||
@@ -810,7 +810,8 @@ CONFIG_NETDEV_TELNET=y
|
||||
CONFIG_TELNET_RXBUFFER_SIZE=256
|
||||
CONFIG_TELNET_TXBUFFER_SIZE=256
|
||||
# CONFIG_NETDEV_MULTINIC is not set
|
||||
# CONFIG_ARCH_HAVE_NETDEV_STATISTICS is not set
|
||||
CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y
|
||||
CONFIG_NETDEV_STATISTICS=y
|
||||
CONFIG_NETDEV_LATEINIT=y
|
||||
|
||||
#
|
||||
@@ -1136,12 +1137,15 @@ CONFIG_IOB_THROTTLE=8
|
||||
CONFIG_WIRELESS=y
|
||||
CONFIG_WIRELESS_IEEE802154=y
|
||||
CONFIG_IEEE802154_DEFAULT_EADDR=0x00fade00deadbeef
|
||||
CONFIG_IEEE802154_MAC_DEV=y
|
||||
CONFIG_MAC802154_HPWORK=y
|
||||
CONFIG_IEEE802154_NTXDESC=3
|
||||
CONFIG_IEEE802154_IND_PREALLOC=20
|
||||
CONFIG_IEEE802154_IND_IRQRESERVE=10
|
||||
# CONFIG_IEEE802154_NETDEV is not set
|
||||
CONFIG_IEEE802154_MACDEV=y
|
||||
CONFIG_IEEE802154_MACDEV_RECVRPRIO=0
|
||||
CONFIG_IEEE802154_NETDEV=y
|
||||
CONFIG_IEEE802154_NETDEV_RECVRPRIO=1
|
||||
CONFIG_IEEE802154_NETDEV_HPWORK=y
|
||||
# CONFIG_IEEE802154_LOOPBACK is not set
|
||||
|
||||
#
|
||||
@@ -1348,7 +1352,28 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
|
||||
# CONFIG_EXAMPLES_TELNETD is not set
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
|
||||
# CONFIG_EXAMPLES_UDP is not set
|
||||
CONFIG_EXAMPLES_UDP=y
|
||||
# CONFIG_EXAMPLES_UDP_SERVER1 is not set
|
||||
CONFIG_EXAMPLES_UDP_PRIORITY1=100
|
||||
CONFIG_EXAMPLES_UDP_STACKSIZE1=2048
|
||||
CONFIG_EXAMPLES_UDP_TARGET2=y
|
||||
CONFIG_EXAMPLES_UDP_PRIORITY2=100
|
||||
CONFIG_EXAMPLES_UDP_STACKSIZE2=2048
|
||||
CONFIG_EXAMPLES_UDP_DEVNAME="wpan0"
|
||||
# CONFIG_EXAMPLES_UDP_NETINIT is not set
|
||||
CONFIG_EXAMPLES_UDP_IPv6=y
|
||||
|
||||
#
|
||||
# Server IPv6 address
|
||||
#
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_1=0xfe80
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_2=0x0000
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_3=0x0000
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_4=0x0000
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_5=0x0000
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_6=0x00ff
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_7=0xfe00
|
||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_8=0x0d00
|
||||
# CONFIG_EXAMPLES_UDPBLASTER is not set
|
||||
# CONFIG_EXAMPLES_USBSERIAL is not set
|
||||
# CONFIG_EXAMPLES_WATCHDOG is not set
|
||||
@@ -1446,7 +1471,7 @@ CONFIG_NSH_DISABLE_GET=y
|
||||
# CONFIG_NSH_DISABLE_HELP is not set
|
||||
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_IFCONFIG is not set
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
# CONFIG_NSH_DISABLE_IFUPDOWN is not set
|
||||
# CONFIG_NSH_DISABLE_KILL is not set
|
||||
# CONFIG_NSH_DISABLE_LOSETUP is not set
|
||||
CONFIG_NSH_DISABLE_LOSMART=y
|
||||
@@ -1507,50 +1532,9 @@ CONFIG_NSH_ARCHINIT=y
|
||||
#
|
||||
CONFIG_NSH_NETINIT=y
|
||||
CONFIG_NSH_NETLOCAL=y
|
||||
|
||||
#
|
||||
# IP Address Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Target IPv6 address
|
||||
#
|
||||
CONFIG_NSH_IPv6ADDR_1=0xfc00
|
||||
CONFIG_NSH_IPv6ADDR_2=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_3=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_4=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_5=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_6=0x00ff
|
||||
CONFIG_NSH_IPv6ADDR_7=0xfe00
|
||||
CONFIG_NSH_IPv6ADDR_8=0xa9cd
|
||||
|
||||
#
|
||||
# Router IPv6 address
|
||||
#
|
||||
CONFIG_NSH_DRIPv6ADDR_1=0xfc00
|
||||
CONFIG_NSH_DRIPv6ADDR_2=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_3=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_4=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_5=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_6=0x00ff
|
||||
CONFIG_NSH_DRIPv6ADDR_7=0xfe00
|
||||
CONFIG_NSH_DRIPv6ADDR_8=0x1034
|
||||
|
||||
#
|
||||
# IPv6 Network mask
|
||||
#
|
||||
CONFIG_NSH_IPv6NETMASK_1=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_2=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_3=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_4=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_5=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_6=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_7=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_8=0x0000
|
||||
CONFIG_NSH_NOMAC=y
|
||||
CONFIG_NSH_SWMAC=y
|
||||
CONFIG_NSH_MACADDR=0xabcd
|
||||
CONFIG_NSH_PANID=0xface
|
||||
CONFIG_NSH_MACADDR=0x00fade00deadbeef
|
||||
CONFIG_NSH_MAX_ROUNDTRIP=20
|
||||
|
||||
#
|
||||
|
||||
@@ -393,6 +393,7 @@ CONFIG_STM32_HAVE_I2C2=y
|
||||
CONFIG_STM32_HAVE_I2C3=y
|
||||
CONFIG_STM32_HAVE_SPI2=y
|
||||
CONFIG_STM32_HAVE_SPI3=y
|
||||
CONFIG_STM32_HAVE_I2S3=y
|
||||
# CONFIG_STM32_HAVE_SPI4 is not set
|
||||
# CONFIG_STM32_HAVE_SPI5 is not set
|
||||
# CONFIG_STM32_HAVE_SPI6 is not set
|
||||
@@ -431,6 +432,7 @@ CONFIG_STM32_PWR=y
|
||||
# CONFIG_STM32_SPI1 is not set
|
||||
# CONFIG_STM32_SPI2 is not set
|
||||
CONFIG_STM32_SPI3=y
|
||||
# CONFIG_STM32_I2S3 is not set
|
||||
CONFIG_STM32_SYSCFG=y
|
||||
# CONFIG_STM32_TIM1 is not set
|
||||
# CONFIG_STM32_TIM2 is not set
|
||||
@@ -968,6 +970,7 @@ CONFIG_MM_IOB=y
|
||||
CONFIG_IOB_NBUFFERS=8
|
||||
CONFIG_IOB_BUFSIZE=196
|
||||
CONFIG_IOB_NCHAINS=0
|
||||
CONFIG_IOB_THROTTLE=0
|
||||
|
||||
#
|
||||
# Audio Support
|
||||
@@ -980,11 +983,12 @@ CONFIG_IOB_NCHAINS=0
|
||||
CONFIG_WIRELESS=y
|
||||
CONFIG_WIRELESS_IEEE802154=y
|
||||
CONFIG_IEEE802154_DEFAULT_EADDR=0x00fade00deadbeef
|
||||
CONFIG_IEEE802154_MAC_DEV=y
|
||||
CONFIG_MAC802154_HPWORK=y
|
||||
CONFIG_IEEE802154_NTXDESC=3
|
||||
CONFIG_IEEE802154_IND_PREALLOC=20
|
||||
CONFIG_IEEE802154_IND_IRQRESERVE=10
|
||||
CONFIG_IEEE802154_MACDEV=y
|
||||
CONFIG_IEEE802154_MACDEV_RECVRPRIO=0
|
||||
|
||||
#
|
||||
# Binary Loader
|
||||
@@ -1162,10 +1166,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
CONFIG_EXAMPLES_NSH=y
|
||||
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXFFS is not set
|
||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXLINES is not set
|
||||
# CONFIG_EXAMPLES_NXTERM is not set
|
||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||
|
||||
@@ -256,7 +256,7 @@ static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IEEE802154_NETDEV
|
||||
/* Use the IEEE802.15.4 MAC interface instance to create a 6loWPAN
|
||||
/* Use the IEEE802.15.4 MAC interface instance to create a 6LoWPAN
|
||||
* network interface by wrapping the MAC intrface instance in a
|
||||
* network device driver via mac802154dev_register().
|
||||
*/
|
||||
@@ -270,7 +270,7 @@ static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IEEE802154_MAC_DEV
|
||||
#ifdef CONFIG_IEEE802154_MACDEV
|
||||
/* If want to call these APIs from userspace, you have to wrap the MAC
|
||||
* interface in a character device viamac802154dev_register().
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,7 @@ CONFIG_BUILD_FLAT=y
|
||||
# CONFIG_MOTOROLA_SREC is not set
|
||||
CONFIG_RAW_BINARY=y
|
||||
# CONFIG_UBOOT_UIMAGE is not set
|
||||
# CONFIG_DFU_BINARY is not set
|
||||
|
||||
#
|
||||
# Customize Header Files
|
||||
@@ -123,7 +124,6 @@ CONFIG_ARCH_ARM926EJS=y
|
||||
# CONFIG_ARCH_CORTEXR7F is not set
|
||||
CONFIG_ARCH_FAMILY="arm"
|
||||
CONFIG_ARCH_CHIP="dm320"
|
||||
# CONFIG_ARCH_TOOLCHAIN_IAR is not set
|
||||
# CONFIG_ARCH_HAVE_FPU is not set
|
||||
# CONFIG_ARCH_HAVE_DPFPU is not set
|
||||
# CONFIG_ARCH_HAVE_TRUSTZONE is not set
|
||||
@@ -149,6 +149,8 @@ CONFIG_ARM_TOOLCHAIN_CODESOURCERYL=y
|
||||
#
|
||||
CONFIG_DM320_UART0=y
|
||||
CONFIG_DM320_UART1=y
|
||||
# CONFIG_ARCH_TOOLCHAIN_IAR is not set
|
||||
# CONFIG_ARCH_TOOLCHAIN_GNU is not set
|
||||
|
||||
#
|
||||
# Architecture Options
|
||||
@@ -169,6 +171,7 @@ CONFIG_ARCH_HAVE_MMU=y
|
||||
# CONFIG_ARCH_HAVE_EXTCLK is not set
|
||||
# CONFIG_ARCH_HAVE_POWEROFF is not set
|
||||
# CONFIG_ARCH_HAVE_RESET is not set
|
||||
# CONFIG_ARCH_HAVE_RTC_SUBSECONDS is not set
|
||||
CONFIG_ARCH_USE_MMU=y
|
||||
# CONFIG_PAGING is not set
|
||||
# CONFIG_ARCH_STACKDUMP is not set
|
||||
@@ -335,14 +338,6 @@ CONFIG_DEV_NULL=y
|
||||
#
|
||||
# Buffering
|
||||
#
|
||||
|
||||
#
|
||||
# Common I/O Buffer Support
|
||||
#
|
||||
CONFIG_MM_IOB=y
|
||||
CONFIG_IOB_NBUFFERS=8
|
||||
CONFIG_IOB_BUFSIZE=196
|
||||
CONFIG_IOB_NCHAINS=8
|
||||
# CONFIG_DRVR_WRITEBUFFER is not set
|
||||
# CONFIG_DRVR_READAHEAD is not set
|
||||
# CONFIG_RAMDISK is not set
|
||||
@@ -504,7 +499,9 @@ CONFIG_UART1_2STOP=0
|
||||
# System Logging
|
||||
#
|
||||
# CONFIG_ARCH_SYSLOG is not set
|
||||
CONFIG_SYSLOG_WRITE=y
|
||||
# CONFIG_RAMLOG is not set
|
||||
# CONFIG_SYSLOG_BUFFER is not set
|
||||
# CONFIG_SYSLOG_INTBUFFER is not set
|
||||
# CONFIG_SYSLOG_TIMESTAMP is not set
|
||||
CONFIG_SYSLOG_SERIAL_CONSOLE=y
|
||||
@@ -653,6 +650,15 @@ CONFIG_MM_REGIONS=1
|
||||
# CONFIG_GRAN is not set
|
||||
# CONFIG_MM_PGALLOC is not set
|
||||
|
||||
#
|
||||
# Common I/O Buffer Support
|
||||
#
|
||||
CONFIG_MM_IOB=y
|
||||
CONFIG_IOB_NBUFFERS=8
|
||||
CONFIG_IOB_BUFSIZE=196
|
||||
CONFIG_IOB_NCHAINS=8
|
||||
CONFIG_IOB_THROTTLE=0
|
||||
|
||||
#
|
||||
# Audio Support
|
||||
#
|
||||
@@ -661,6 +667,7 @@ CONFIG_MM_REGIONS=1
|
||||
#
|
||||
# Wireless Support
|
||||
#
|
||||
# CONFIG_WIRELESS is not set
|
||||
|
||||
#
|
||||
# Binary Loader
|
||||
@@ -837,7 +844,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
|
||||
CONFIG_EXAMPLES_UDP=y
|
||||
# CONFIG_EXAMPLES_UDP_SERVER is not set
|
||||
# CONFIG_EXAMPLES_UDP_SERVER1 is not set
|
||||
CONFIG_EXAMPLES_UDP_PRIORITY1=100
|
||||
CONFIG_EXAMPLES_UDP_STACKSIZE1=2048
|
||||
# CONFIG_EXAMPLES_UDP_TARGET2 is not set
|
||||
CONFIG_EXAMPLES_UDP_DEVNAME="eth0"
|
||||
CONFIG_EXAMPLES_UDP_NETINIT=y
|
||||
CONFIG_EXAMPLES_UDP_IPv4=y
|
||||
|
||||
#
|
||||
@@ -916,10 +928,12 @@ CONFIG_NETUTILS_NETLIB=y
|
||||
#
|
||||
# CONFIG_SYSTEM_CLE is not set
|
||||
# CONFIG_SYSTEM_CUTERM is not set
|
||||
# CONFIG_SYSTEM_DHCPC is not set
|
||||
# CONFIG_SYSTEM_FREE is not set
|
||||
# CONFIG_SYSTEM_HEX2BIN is not set
|
||||
# CONFIG_SYSTEM_HEXED is not set
|
||||
# CONFIG_SYSTEM_INSTALL is not set
|
||||
# CONFIG_SYSTEM_NTPC is not set
|
||||
# CONFIG_SYSTEM_RAMTEST is not set
|
||||
# CONFIG_READLINE_HAVE_EXTMATCH is not set
|
||||
# CONFIG_SYSTEM_READLINE is not set
|
||||
@@ -932,3 +946,10 @@ CONFIG_NETUTILS_NETLIB=y
|
||||
#
|
||||
# Wireless Libraries and NSH Add-Ons
|
||||
#
|
||||
|
||||
#
|
||||
# IEEE 802.15.4 applications
|
||||
#
|
||||
# CONFIG_IEEE802154_LIBMAC is not set
|
||||
# CONFIG_IEEE802154_LIBUTILS is not set
|
||||
# CONFIG_IEEE802154_I8SAK is not set
|
||||
|
||||
@@ -804,12 +804,12 @@ pashello
|
||||
sixlowpan
|
||||
|
||||
This configuration was intended only for unit-level testing of the
|
||||
6loWPAN stack. It enables networking with 6loWPAN support and uses
|
||||
6LoWPAN stack. It enables networking with 6LoWPAN support and uses
|
||||
only a IEEE802.15.4 MAC loopback network device to supported testing.
|
||||
|
||||
This configuration includes apps/examples/nettest and apps/examples/udpblaster.
|
||||
Neither are truly functional. The only intent of this configuration
|
||||
is to verify that the 6loWPAN stack correctly encodes IEEE802.15.4
|
||||
is to verify that the 6LoWPAN stack correctly encodes IEEE802.15.4
|
||||
packets on output to the loopback device and correct decodes the
|
||||
returned packet.
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ CONFIG_BUILD_FLAT=y
|
||||
# CONFIG_MOTOROLA_SREC is not set
|
||||
CONFIG_RAW_BINARY=y
|
||||
# CONFIG_UBOOT_UIMAGE is not set
|
||||
# CONFIG_DFU_BINARY is not set
|
||||
|
||||
#
|
||||
# Customize Header Files
|
||||
@@ -88,6 +89,8 @@ CONFIG_SIM_X8664_MICROSOFT=y
|
||||
# CONFIG_SIM_FRAMEBUFFER is not set
|
||||
# CONFIG_SIM_SPIFLASH is not set
|
||||
# CONFIG_SIM_QSPIFLASH is not set
|
||||
# CONFIG_ARCH_TOOLCHAIN_IAR is not set
|
||||
# CONFIG_ARCH_TOOLCHAIN_GNU is not set
|
||||
|
||||
#
|
||||
# Architecture Options
|
||||
@@ -108,6 +111,7 @@ CONFIG_ARCH_HAVE_MULTICPU=y
|
||||
# CONFIG_ARCH_HAVE_EXTCLK is not set
|
||||
CONFIG_ARCH_HAVE_POWEROFF=y
|
||||
# CONFIG_ARCH_HAVE_RESET is not set
|
||||
# CONFIG_ARCH_HAVE_RTC_SUBSECONDS is not set
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
# CONFIG_ENDIAN_BIG is not set
|
||||
# CONFIG_ARCH_IDLE_CUSTOM is not set
|
||||
@@ -294,15 +298,6 @@ CONFIG_DEV_NULL=y
|
||||
#
|
||||
# Buffering
|
||||
#
|
||||
|
||||
#
|
||||
# Common I/O Buffer Support
|
||||
#
|
||||
CONFIG_MM_IOB=y
|
||||
CONFIG_IOB_NBUFFERS=36
|
||||
CONFIG_IOB_BUFSIZE=196
|
||||
CONFIG_IOB_NCHAINS=8
|
||||
CONFIG_IOB_THROTTLE=8
|
||||
# CONFIG_DRVR_WRITEBUFFER is not set
|
||||
# CONFIG_DRVR_READAHEAD is not set
|
||||
# CONFIG_RAMDISK is not set
|
||||
@@ -481,14 +476,21 @@ CONFIG_STANDARD_SERIAL=y
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_USBMISC is not set
|
||||
# CONFIG_HAVE_USBTRACE is not set
|
||||
# CONFIG_DRIVERS_WIRELESS is not set
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
# CONFIG_WL_CC1101 is not set
|
||||
# CONFIG_WL_CC3000 is not set
|
||||
# CONFIG_DRIVERS_IEEE802154 is not set
|
||||
# CONFIG_DRIVERS_IEEE80211 is not set
|
||||
# CONFIG_WL_NRF24L01 is not set
|
||||
# CONFIG_DRIVERS_CONTACTLESS is not set
|
||||
|
||||
#
|
||||
# System Logging
|
||||
#
|
||||
# CONFIG_ARCH_SYSLOG is not set
|
||||
CONFIG_SYSLOG_WRITE=y
|
||||
# CONFIG_RAMLOG is not set
|
||||
# CONFIG_SYSLOG_BUFFER is not set
|
||||
# CONFIG_SYSLOG_INTBUFFER is not set
|
||||
# CONFIG_SYSLOG_TIMESTAMP is not set
|
||||
CONFIG_SYSLOG_SERIAL_CONSOLE=y
|
||||
@@ -527,6 +529,7 @@ CONFIG_NET_6LOWPAN=y
|
||||
#
|
||||
CONFIG_NETDEV_IOCTL=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
# CONFIG_NETDEV_WIRELESS_IOCTL is not set
|
||||
|
||||
#
|
||||
# Internet Protocol Selection
|
||||
@@ -687,6 +690,15 @@ CONFIG_MM_REGIONS=1
|
||||
# CONFIG_ARCH_HAVE_HEAP2 is not set
|
||||
# CONFIG_GRAN is not set
|
||||
|
||||
#
|
||||
# Common I/O Buffer Support
|
||||
#
|
||||
CONFIG_MM_IOB=y
|
||||
CONFIG_IOB_NBUFFERS=36
|
||||
CONFIG_IOB_BUFSIZE=196
|
||||
CONFIG_IOB_NCHAINS=8
|
||||
CONFIG_IOB_THROTTLE=8
|
||||
|
||||
#
|
||||
# Audio Support
|
||||
#
|
||||
@@ -697,6 +709,13 @@ CONFIG_MM_REGIONS=1
|
||||
#
|
||||
CONFIG_WIRELESS=y
|
||||
CONFIG_WIRELESS_IEEE802154=y
|
||||
CONFIG_IEEE802154_DEFAULT_EADDR=0x00fade00deadbeef
|
||||
CONFIG_MAC802154_HPWORK=y
|
||||
CONFIG_IEEE802154_NTXDESC=3
|
||||
CONFIG_IEEE802154_IND_PREALLOC=20
|
||||
CONFIG_IEEE802154_IND_IRQRESERVE=10
|
||||
# CONFIG_IEEE802154_MACDEV is not set
|
||||
# CONFIG_IEEE802154_NETDEV is not set
|
||||
CONFIG_IEEE802154_LOOPBACK=y
|
||||
CONFIG_IEEE802154_LOOPBACK_HPWORK=y
|
||||
|
||||
@@ -897,6 +916,7 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_5=0x0000
|
||||
CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_6=0x00ff
|
||||
CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_7=0xfe00
|
||||
CONFIG_EXAMPLES_NETTEST_CLIENTIPv6ADDR_8=0x1034
|
||||
# CONFIG_EXAMPLES_NRF24L01TERM is not set
|
||||
CONFIG_EXAMPLES_NSH=y
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
@@ -1117,52 +1137,12 @@ CONFIG_NSH_ARCHINIT=y
|
||||
# Networking Configuration
|
||||
#
|
||||
CONFIG_NSH_NETINIT=y
|
||||
# CONFIG_NSH_NETLOCAL is not set
|
||||
# CONFIG_NSH_NETINIT_THREAD is not set
|
||||
|
||||
#
|
||||
# IP Address Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Target IPv6 address
|
||||
#
|
||||
CONFIG_NSH_IPv6ADDR_1=0xfe80
|
||||
CONFIG_NSH_IPv6ADDR_2=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_3=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_4=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_5=0x0000
|
||||
CONFIG_NSH_IPv6ADDR_6=0x00ff
|
||||
CONFIG_NSH_IPv6ADDR_7=0xfe00
|
||||
CONFIG_NSH_IPv6ADDR_8=0xa9cd
|
||||
|
||||
#
|
||||
# Router IPv6 address
|
||||
#
|
||||
CONFIG_NSH_DRIPv6ADDR_1=0xfe80
|
||||
CONFIG_NSH_DRIPv6ADDR_2=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_3=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_4=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_5=0x0000
|
||||
CONFIG_NSH_DRIPv6ADDR_6=0x00ff
|
||||
CONFIG_NSH_DRIPv6ADDR_7=0xfe00
|
||||
CONFIG_NSH_DRIPv6ADDR_8=0x1034
|
||||
|
||||
#
|
||||
# IPv6 Network mask
|
||||
#
|
||||
CONFIG_NSH_IPv6NETMASK_1=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_2=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_3=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_4=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_5=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_6=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_7=0xffff
|
||||
CONFIG_NSH_IPv6NETMASK_8=0x0000
|
||||
# CONFIG_NSH_DNS is not set
|
||||
CONFIG_NSH_NOMAC=y
|
||||
CONFIG_NSH_SWMAC=y
|
||||
CONFIG_NSH_MACADDR=0xabcd
|
||||
CONFIG_NSH_PANID=0xface
|
||||
CONFIG_NSH_MACADDR=0x00fade00deadbeef
|
||||
CONFIG_NSH_MAX_ROUNDTRIP=20
|
||||
# CONFIG_NSH_LOGIN is not set
|
||||
# CONFIG_NSH_CONSOLE_LOGIN is not set
|
||||
@@ -1195,6 +1175,7 @@ CONFIG_I2CTOOL_DEFFREQ=400000
|
||||
# CONFIG_SYSTEM_INSTALL is not set
|
||||
# CONFIG_SYSTEM_MDIO is not set
|
||||
# CONFIG_SYSTEM_NETDB is not set
|
||||
# CONFIG_SYSTEM_NTPC is not set
|
||||
# CONFIG_SYSTEM_RAMTEST is not set
|
||||
CONFIG_READLINE_HAVE_EXTMATCH=y
|
||||
CONFIG_SYSTEM_READLINE=y
|
||||
@@ -1211,3 +1192,12 @@ CONFIG_READLINE_ECHO=y
|
||||
#
|
||||
# Wireless Libraries and NSH Add-Ons
|
||||
#
|
||||
|
||||
#
|
||||
# IEEE 802.15.4 applications
|
||||
#
|
||||
CONFIG_IEEE802154_LIBMAC=y
|
||||
# CONFIG_IEEE802154_LIBUTILS is not set
|
||||
# CONFIG_IEEE802154_I8SAK is not set
|
||||
# CONFIG_WIRELESS_IWPAN is not set
|
||||
# CONFIG_WIRELESS_WAPI is not set
|
||||
|
||||
@@ -911,7 +911,7 @@ static void usbmsc_lununinitialize(struct usbmsc_lun_s *lun)
|
||||
(void)close_blockdriver(lun->inode);
|
||||
}
|
||||
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s *));
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -1492,7 +1492,7 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath,
|
||||
|
||||
/* Initialize the LUN structure */
|
||||
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s *));
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s));
|
||||
|
||||
/* Allocate an I/O buffer big enough to hold one hardware sector. SCSI commands
|
||||
* are processed one at a time so all LUNs may share a single I/O buffer. The
|
||||
|
||||
@@ -98,7 +98,7 @@ config USBHOST_MSC
|
||||
default n
|
||||
depends on !BULK_DISABLE
|
||||
---help---
|
||||
Enable support for the keyboard class driver. This also depends on
|
||||
Enable support for the mass storage class driver. This also depends on
|
||||
NFILE_DESCRIPTORS > 0 && SCHED_WORKQUEUE=y
|
||||
|
||||
config USBHOST_CDCACM
|
||||
|
||||
@@ -443,7 +443,7 @@ void bcmf_wl_scan_event_handler(FAR struct bcmf_dev_s *priv,
|
||||
uint8_t *ie_buffer;
|
||||
unsigned int ie_offset;
|
||||
unsigned int check_offset;
|
||||
|
||||
|
||||
result_size = BCMF_SCAN_RESULT_SIZE - priv->scan_result_size;
|
||||
bss_info_len = bss->length;
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ struct at86rf23x_dev_s
|
||||
FAR struct spi_dev_s *spi; /* Saved SPI interface instance */
|
||||
struct work_s irqwork; /* Interrupt continuation work queue support */
|
||||
FAR const struct at86rf23x_lower_s *lower; /* Low-level MCU-specific support */
|
||||
uint16_t panid; /* PAN identifier, FFFF = not set */
|
||||
uint8_t panid[2]; /* PAN identifier, FFFF = not set */
|
||||
uint16_t saddr; /* Short address, FFFF = not set */
|
||||
uint8_t eaddr[8]; /* Extended address, FFFFFFFFFFFFFFFF = not set */
|
||||
uint8_t channel; /* 11 to 26 for the 2.4 GHz band */
|
||||
|
||||
@@ -208,32 +208,18 @@ static inline void mrf24j40_norm_trigger(FAR struct mrf24j40_radio_s *dev);
|
||||
|
||||
static int mrf24j40_setchannel(FAR struct mrf24j40_radio_s *dev,
|
||||
uint8_t chan);
|
||||
static int mrf24j40_getchannel(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint8_t *chan);
|
||||
static int mrf24j40_setpanid(FAR struct mrf24j40_radio_s *dev,
|
||||
uint16_t panid);
|
||||
static int mrf24j40_getpanid(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint16_t *panid);
|
||||
FAR const uint8_t *panid);
|
||||
static int mrf24j40_setsaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
uint16_t saddr);
|
||||
static int mrf24j40_getsaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint16_t *saddr);
|
||||
FAR const uint8_t *saddr);
|
||||
static int mrf24j40_seteaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR const uint8_t *eaddr);
|
||||
static int mrf24j40_geteaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint8_t *eaddr);
|
||||
static int mrf24j40_setdevmode(FAR struct mrf24j40_radio_s *dev,
|
||||
uint8_t mode);
|
||||
static int mrf24j40_getdevmode(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint8_t *mode);
|
||||
static int mrf24j40_settxpower(FAR struct mrf24j40_radio_s *dev,
|
||||
int32_t txpwr);
|
||||
static int mrf24j40_gettxpower(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR int32_t *txpwr);
|
||||
static int mrf24j40_setcca(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
static int mrf24j40_getcca(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR struct ieee802154_cca_s *cca);
|
||||
static int mrf24j40_energydetect(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint8_t *energy);
|
||||
static void mrf24j40_mactimer(FAR struct mrf24j40_radio_s *dev, int numsymbols);
|
||||
@@ -964,22 +950,6 @@ static int mrf24j40_setchannel(FAR struct mrf24j40_radio_s *dev, uint8_t chan)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_getchannel
|
||||
*
|
||||
* Description:
|
||||
* Get the channel the device is operating on.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_getchannel(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint8_t *chan)
|
||||
{
|
||||
*chan = dev->channel;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_setpanid
|
||||
*
|
||||
@@ -989,29 +959,13 @@ static int mrf24j40_getchannel(FAR struct mrf24j40_radio_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_setpanid(FAR struct mrf24j40_radio_s *dev,
|
||||
uint16_t panid)
|
||||
FAR const uint8_t *panid)
|
||||
{
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_PANIDH, (uint8_t)(panid>>8));
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_PANIDL, (uint8_t)(panid&0xFF));
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_PANIDL, panid[0]);
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_PANIDH, panid[1]);
|
||||
|
||||
dev->addr.panid = panid;
|
||||
wlinfo("%04X\n", (unsigned)panid);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_getpanid
|
||||
*
|
||||
* Description:
|
||||
* Define the current PAN ID the device is operating on.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_getpanid(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint16_t *panid)
|
||||
{
|
||||
*panid = dev->addr.panid;
|
||||
IEEE802154_PANIDCOPY(dev->addr.panid, panid);
|
||||
wlinfo("%02X:%02X\n", panid[1], panid[0]);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -1027,29 +981,14 @@ static int mrf24j40_getpanid(FAR struct mrf24j40_radio_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_setsaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
uint16_t saddr)
|
||||
FAR const uint8_t *saddr)
|
||||
{
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_SADRH, (uint8_t)(saddr>>8));
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_SADRL, (uint8_t)(saddr&0xFF));
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_SADRL, saddr[0]);
|
||||
mrf24j40_setreg(dev->spi, MRF24J40_SADRH, saddr[1]);
|
||||
|
||||
dev->addr.saddr = saddr;
|
||||
wlinfo("%04X\n", (unsigned)saddr);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_getsaddr
|
||||
*
|
||||
* Description:
|
||||
* Define the current short address the device is using.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_getsaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint16_t *saddr)
|
||||
{
|
||||
*saddr = dev->addr.saddr;
|
||||
IEEE802154_SADDRCOPY(dev->addr.saddr, saddr);
|
||||
|
||||
wlinfo("%02X:%02X\n", saddr[1], saddr[0]);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1076,22 +1015,6 @@ static int mrf24j40_seteaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_geteaddr
|
||||
*
|
||||
* Description:
|
||||
* Define the current extended address the device is using.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_geteaddr(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint8_t *eaddr)
|
||||
{
|
||||
memcpy(eaddr, dev->addr.eaddr, 8);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_setdevmode
|
||||
*
|
||||
@@ -1142,21 +1065,6 @@ static int mrf24j40_setdevmode(FAR struct mrf24j40_radio_s *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_setdevmode
|
||||
*
|
||||
* Description:
|
||||
* Return the current device mode
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_getdevmode(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR uint8_t *mode)
|
||||
{
|
||||
*mode = dev->devmode;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_settxpower
|
||||
*
|
||||
@@ -1241,21 +1149,6 @@ static int mrf24j40_settxpower(FAR struct mrf24j40_radio_s *dev,
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_gettxpower
|
||||
*
|
||||
* Description:
|
||||
* Return the actual transmit power, in mBm.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_gettxpower(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR int32_t *txpwr)
|
||||
{
|
||||
*txpwr = dev->txpower;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_setcca
|
||||
*
|
||||
@@ -1300,21 +1193,6 @@ static int mrf24j40_setcca(FAR struct mrf24j40_radio_s *dev,
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_getcca
|
||||
*
|
||||
* Description:
|
||||
* Return the Clear Channel Assessement method.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mrf24j40_getcca(FAR struct mrf24j40_radio_s *dev,
|
||||
FAR struct ieee802154_cca_s *cca)
|
||||
{
|
||||
memcpy(cca, &dev->cca, sizeof(struct ieee802154_cca_s));
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: mrf24j40_regdump
|
||||
*
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
/* There is no link layer header with SLIP */
|
||||
|
||||
# ifndef CONFIG_NET_IPv6
|
||||
# error 6loWPAN requires IPv support
|
||||
# error 6LoWPAN requires IPv support
|
||||
# endif
|
||||
|
||||
# define NET_LL_HDRLEN(d) 0
|
||||
@@ -620,7 +620,7 @@
|
||||
# define NET_DEV_RCVWNDO(d) CONFIG_NET_ETH_TCP_RECVWNDO
|
||||
|
||||
#elif defined(CONFIG_NET_6LOWPAN)
|
||||
/* Only 6loWPAN.. use the configured 6loWPAN receive window size */
|
||||
/* Only 6LoWPAN.. use the configured 6LoWPAN receive window size */
|
||||
|
||||
# define NET_DEV_RCVWNDO(d) CONFIG_NET_6LOWPAN_TCP_RECVWNDO
|
||||
|
||||
|
||||
153
include/nuttx/net/rfc6775.h
Normal file
153
include/nuttx/net/rfc6775.h
Normal file
@@ -0,0 +1,153 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/net/rfc6775.h
|
||||
* Definitions for 6LoWPAN Neighbor Discovery
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Reference: RFC6775, Neighbor Discovery Optimization for IPv6 over Low-
|
||||
* Power Wireless Personal Area Networks (6LoWPANs), Internet
|
||||
* Engineering Task Force (IETF), November 2012
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_NET_RFC6775_H
|
||||
#define __INCLUDE_NUTTX_NET_RFC6775_H
|
||||
|
||||
/* Acronyms (in addition to those defined in context below:
|
||||
*
|
||||
* 6LN - 6LoWPAN Node
|
||||
* 6LR - 6LoWPAN Router
|
||||
* 6LBR - 6LoWPAN Border Router
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 4.2 Bit definitions for 6CO resccid field */
|
||||
|
||||
#define RESCCID_CID_SHIFT (0) /* Bits 0-3: Context identifier */
|
||||
#define RESCCID_CID_MASK (7 << RESCCID_CID_SHIFT)
|
||||
#define RESCCID_C (1 << 4) /* Bit 4: Compression Flag */
|
||||
/* Bits 5-7: Reserved */
|
||||
|
||||
/* 9 Protocol Constants */
|
||||
|
||||
/* 6LBR Constants: */
|
||||
|
||||
#define MIN_CONTEXT_CHANGE_DELAY 300 /* Seconds */
|
||||
|
||||
/* 6LR Constants: */
|
||||
|
||||
#define MAX_RTR_ADVERTISEMENTS 3 /* Transmissions */
|
||||
#define MIN_DELAY_BETWEEN_RAS 10 /* Seconds */
|
||||
#define MAX_RA_DELAY_TIME 2 /* Seconds */
|
||||
#define TENTATIVE_NCE_LIFETIME 20 /* Seconds */
|
||||
|
||||
/* Router Constants: */
|
||||
|
||||
#define MULTIHOP_HOPLIMI 64
|
||||
|
||||
/* Host Constants: */
|
||||
|
||||
#define RTR_SOLICITATION_INTERVAL 10 /* Seconds */
|
||||
#define MAX_RTR_SOLICITATIONS 3 /* Transmissions */
|
||||
#define MAX_RTR_SOLICITATION_INTERVAL 60 /* Seconds */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Table 1. alues for status field */
|
||||
|
||||
enum sixlowpan_status_e
|
||||
{
|
||||
SIXLOWPAN_SUCCESS = 0, /* Success */
|
||||
SIXLOWPAN_DUPLICATE = 1, /* Duplicate address */
|
||||
SIXLOWPAN_FULL = 2, /* Neighbor cache full */
|
||||
SIXLOWPAN_ALLOCATED = 3 /* 3-255: Allocated using standard action (RFC5226 */
|
||||
};
|
||||
|
||||
/* 4.1 Source Link-Layer Address Option (SLLAO) */
|
||||
|
||||
struct sixlowpan_sllao_s
|
||||
{
|
||||
uint8_t type; /* Byte 0: Type = 33 */
|
||||
uint8_t length; /* Byte 1: Length in units of 8 bytes = 2 */
|
||||
uint8_t status; /* Byte 2: Status of NS message. See enum sixlowpan_status_e */
|
||||
uint8_t reserved[3]; /* Bytes 3-5: Reserved */
|
||||
uint8_t lifetime[2]; /* Bytes 6-7: Registration lifetime */
|
||||
uint8_t eui64[8]; /* Bytes 8-15: EUI-64 identifier assigned to interface */
|
||||
};
|
||||
|
||||
/* 4.2 6LoWPAN Context Option (6CO) */
|
||||
|
||||
struct sixlowpan_6co_s
|
||||
{
|
||||
uint8_t type; /* Byte 0: Type = 34 */
|
||||
uint8_t length; /* Byte 1: Length in units of 8 bytes = 2 or 3 */
|
||||
uint8_t ctxlen; /* Byte 2: Context length = 0-128 bits */
|
||||
uint8_t resccid; /* Byte 3: See RESCCID_* bit definitions */
|
||||
uint8_t reserved[2]; /* Bytes 4-6: Reserved */
|
||||
uint8_t lifetime[2]; /* Bytes 6-7: Valid lifetime */
|
||||
uint8_t prefix[1]; /* Bytes 8-15 or 8-23: Context Prefix */
|
||||
};
|
||||
|
||||
#define SIXLOWPAN_6CO_LEN(b) ((b > 64) ? 16 : 8)
|
||||
#define SIZEOF_SIXLOWPAN_6CO_S(b) (sizeof(struct sixlowpan_6co_s) + CMPV6_6CO_LEN(b) - 1)
|
||||
|
||||
/* 4.3 Authoritative Border Router Option (ABRO) */
|
||||
|
||||
struct sixlowpan_abro_s
|
||||
{
|
||||
uint8_t type; /* Byte 0: Type = 35 */
|
||||
uint8_t length; /* Byte 1: Length in units of 8 bytes = 3 */
|
||||
uint8_t verlo[2]; /* Bytes 2-3: Version low */
|
||||
uint8_t verhi[2]; /* Bytes 4-5: Version high */
|
||||
uint8_t lifetime[2]; /* Bytes 6-7: Valid lifetime */
|
||||
uint8_t ipv6[16]; /* Bytes 8-23: IPv6 address of the 6LBR orign of version */
|
||||
};
|
||||
|
||||
/* 4.4 Duplicate Address Messages (DAD for both DAR and DAC) */
|
||||
|
||||
struct sixlowpan_dad_s
|
||||
{
|
||||
uint8_t type; /* Byte 0: Type = 157 (DAR) or 158 (DAC) */
|
||||
uint8_t code; /* Byte 1: Code */
|
||||
uint8_t chksum[2]; /* Bytes 2-3: Checksum */
|
||||
uint8_t status; /* Byte 4: Status of DAR. See enum sixlowpan_status_e */
|
||||
uint8_t reserved; /* Byte 5: Reserved */
|
||||
uint8_t lifetime[2]; /* Bytes 6-7: Registration lifetime */
|
||||
uint8_t eui64[8]; /* Bytes 8-15: EUI-64 identifier registered address */
|
||||
uint8_t ipv6[16]; /* Bytes 16-31: Registered address */
|
||||
};
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_NET_RFC6775_H */
|
||||
@@ -481,7 +481,7 @@ struct ieee802154_driver_s
|
||||
* Name: sixlowpan_input
|
||||
*
|
||||
* Description:
|
||||
* Process an incoming 6loWPAN frame.
|
||||
* Process an incoming 6LoWPAN frame.
|
||||
*
|
||||
* This function is called when the device driver has received an
|
||||
* IEEE802.15.4 frame from the network. The frame from the device
|
||||
|
||||
@@ -56,12 +56,8 @@
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* IEEE 802.15.4 Radio Character Driver IOCTL commands ******************************/
|
||||
/* None defined */
|
||||
|
||||
/* IEEE 802.15.4 MAC Character Driver IOCTL commands ********************************/
|
||||
|
||||
|
||||
#define MAC802154IOC_NOTIFY_REGISTER _WLCIOC(IEEE802154_FIRST)
|
||||
#define MAC802154IOC_GET_EVENT _WLCIOC(IEEE802154_FIRST+1)
|
||||
#define MAC802154IOC_ENABLE_EVENTS _WLCIOC(IEEE802154_FIRST+2)
|
||||
|
||||
@@ -61,6 +61,42 @@
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* IEEE 802.15.4 address macros */
|
||||
/* Copy a an IEEE 802.15.4 address */
|
||||
|
||||
#define IEEE802154_ANYADDRCOPY(dest,src,len) \
|
||||
memcpy(dest, src, len)
|
||||
|
||||
#define IEEE802154_PANIDCOPY(dest,src) \
|
||||
IEEE802154_ANYADDRCOPY(dest,src,IEEE802154_PANIDSIZE)
|
||||
|
||||
#define IEEE802154_SADDRCOPY(dest,src) \
|
||||
IEEE802154_ANYADDRCOPY(dest,src,IEEE802154_SADDRSIZE)
|
||||
|
||||
#define IEEE802154_EADDRCOPY(dest,src) \
|
||||
IEEE802154_ANYADDRCOPY(dest,src,IEEE802154_EADDRSIZE)
|
||||
|
||||
/* Compare two IEEE 802.15.4 addresses */
|
||||
|
||||
#define IEEE802154_ANYADDRCMP(addr1,addr2,len) \
|
||||
(memcmp(addr1, addr2, len) == 0)
|
||||
|
||||
#define IEEE802154_PANIDCMP(addr1,addr2) \
|
||||
IEEE802154_ANYADDRCMP(addr1,addr2,IEEE802154_PANIDSIZE)
|
||||
|
||||
#define IEEE802154_SADDRCMP(addr1,addr2) \
|
||||
IEEE802154_ANYADDRCMP(addr1,addr2,IEEE802154_SADDRSIZE)
|
||||
|
||||
#define IEEE802154_EADDRCMP(addr1,addr2) \
|
||||
IEEE802154_ANYADDRCMP(addr1,addr2,IEEE802154_EADDRSIZE)
|
||||
|
||||
/* Some addresses */
|
||||
|
||||
#define IEEE802154_PANID_UNSPEC ((uint8_t[]){0xFF,0xFF})
|
||||
#define IEEE802154_SADDR_UNSPEC ((uint8_t[]){0xFF,0xFF})
|
||||
#define IEEE802154_SADDR_BCAST ((uint8_t[]){0xFE,0xFF})
|
||||
#define IEEE802154_EADDR_UNSPEC ((uint8_t[]){0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF})
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
/* None at the moment */
|
||||
|
||||
@@ -102,13 +138,6 @@
|
||||
|
||||
/* IEEE 802.15.4 MAC Interface **********************************************/
|
||||
|
||||
/* Some addresses */
|
||||
|
||||
#define IEEE802154_PAN_UNSPEC (uint16_t)0xFFFF
|
||||
#define IEEE802154_SADDR_UNSPEC (uint16_t)0xFFFF
|
||||
#define IEEE802154_SADDR_BCAST (uint16_t)0xFFFE
|
||||
#define IEEE802154_EADDR_UNSPEC (uint8_t[]){0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}
|
||||
|
||||
/* Frame control field masks, 2 bytes
|
||||
* Seee IEEE 802.15.4/2011 5.2.1.1 page 57
|
||||
*/
|
||||
@@ -241,10 +270,11 @@ enum ieee802154_status_e
|
||||
static const char *IEEE802154_STATUS_STRING[] =
|
||||
{
|
||||
"Success",
|
||||
"Out of capacity",
|
||||
"Denied",
|
||||
"Failure",
|
||||
"Beacon loss",
|
||||
"Channel access failure",
|
||||
"Denied",
|
||||
"Disable TRX failure",
|
||||
"Failed security check",
|
||||
"Frame too long",
|
||||
@@ -255,7 +285,6 @@ static const char *IEEE802154_STATUS_STRING[] =
|
||||
"No beacon",
|
||||
"No data",
|
||||
"No short address",
|
||||
"Out of cap",
|
||||
"PAN ID conflict",
|
||||
"Realignment",
|
||||
"Transaction expired",
|
||||
@@ -398,7 +427,9 @@ enum ieee802154_devmode_e
|
||||
IEEE802154_DEVMODE_PANCOORD
|
||||
};
|
||||
|
||||
#define IEEE802154_EADDR_LEN 8
|
||||
#define IEEE802154_PANIDSIZE 2
|
||||
#define IEEE802154_SADDRSIZE 2
|
||||
#define IEEE802154_EADDRSIZE 8
|
||||
|
||||
/* IEEE 802.15.4 Device address
|
||||
* The addresses in ieee802154 have several formats:
|
||||
@@ -424,10 +455,9 @@ struct ieee802154_addr_s
|
||||
|
||||
enum ieee802154_addrmode_e mode;
|
||||
|
||||
uint16_t panid; /* PAN identifier, can be
|
||||
* IEEE802154_PAN_UNSPEC */
|
||||
uint16_t saddr; /* short address */
|
||||
uint8_t eaddr[IEEE802154_EADDR_LEN]; /* extended address */
|
||||
uint8_t panid[IEEE802154_PANIDSIZE]; /* PAN identifier */
|
||||
uint8_t saddr[IEEE802154_SADDRSIZE]; /* short address */
|
||||
uint8_t eaddr[IEEE802154_EADDRSIZE]; /* extended address */
|
||||
};
|
||||
|
||||
#define IEEE802154_ADDRSTRLEN 22 /* (2*2+1+8*2, PPPP/EEEEEEEEEEEEEEEE) */
|
||||
@@ -540,12 +570,12 @@ struct ieee802154_cca_s
|
||||
|
||||
union ieee802154_macattr_u
|
||||
{
|
||||
uint8_t eaddr[IEEE802154_EADDR_LEN];
|
||||
uint16_t saddr;
|
||||
uint16_t panid;
|
||||
uint8_t eaddr[IEEE802154_EADDRSIZE];
|
||||
uint8_t saddr[IEEE802154_SADDRSIZE];
|
||||
uint8_t panid[IEEE802154_PANIDSIZE];
|
||||
|
||||
uint8_t coord_eaddr[IEEE802154_EADDR_LEN];
|
||||
uint16_t coord_saddr;
|
||||
uint8_t coord_eaddr[IEEE802154_EADDRSIZE];
|
||||
uint8_t coord_saddr[IEEE802154_SADDRSIZE];
|
||||
|
||||
enum ieee802154_devmode_e devmode;
|
||||
|
||||
@@ -845,7 +875,7 @@ struct ieee802154_assoc_ind_s
|
||||
{
|
||||
/* Address of device requesting association. Always in extended mode */
|
||||
|
||||
uint8_t devaddr[IEEE802154_EADDR_LEN];
|
||||
uint8_t devaddr[IEEE802154_EADDRSIZE];
|
||||
|
||||
/* Capabilities of associating device */
|
||||
|
||||
@@ -870,11 +900,11 @@ struct ieee802154_assoc_resp_s
|
||||
{
|
||||
/* Address of device requesting association. Always in extended mode */
|
||||
|
||||
uint8_t devaddr[8];
|
||||
uint8_t devaddr[IEEE802154_EADDRSIZE];
|
||||
|
||||
/* Address assigned to the device. 0xFFFF if failure */
|
||||
|
||||
uint16_t assocsaddr;
|
||||
uint8_t assocsaddr[IEEE802154_SADDRSIZE];
|
||||
|
||||
/* Status of association attempt */
|
||||
|
||||
@@ -903,7 +933,7 @@ struct ieee802154_assoc_conf_s
|
||||
* unsuccessful.
|
||||
*/
|
||||
|
||||
uint16_t saddr;
|
||||
uint8_t saddr[IEEE802154_SADDRSIZE];
|
||||
|
||||
/* Status of association attempt */
|
||||
|
||||
@@ -1287,7 +1317,7 @@ struct ieee802154_set_req_s
|
||||
|
||||
struct ieee802154_start_req_s
|
||||
{
|
||||
uint16_t panid;
|
||||
uint8_t panid[IEEE802154_PANIDSIZE];
|
||||
uint8_t chnum;
|
||||
uint8_t chpage;
|
||||
|
||||
@@ -1571,7 +1601,7 @@ int mac802154dev_register(MACHANDLE mac, int minor);
|
||||
*
|
||||
* Description:
|
||||
* Register a network driver to access the IEEE 802.15.4 MAC layer from
|
||||
* a socket using 6loWPAN
|
||||
* a socket using 6LoWPAN
|
||||
*
|
||||
* Input Parameters:
|
||||
* mac - Pointer to the mac layer struct to be registered.
|
||||
|
||||
@@ -95,14 +95,14 @@ systime_t g_polltime;
|
||||
*
|
||||
* 1. TCP socket output. For the case of TCP output to an
|
||||
* IEEE802.15.4, the TCP output is caught in the socket
|
||||
* send()/sendto() logic and and redirected to 6loWPAN logic.
|
||||
* send()/sendto() logic and and redirected to 6LoWPAN logic.
|
||||
* 2. TCP output from the TCP state machine. That will occur
|
||||
* during TCP packet processing by the TCP state meachine.
|
||||
* 3. TCP output resulting from TX or timer polling
|
||||
*
|
||||
* Cases 2 is handled here. Logic here detected if (1) an attempt
|
||||
* to return with d_len > 0 and (2) that the device is an
|
||||
* IEEE802.15.4 MAC network driver. Under those conditions, 6loWPAN
|
||||
* IEEE802.15.4 MAC network driver. Under those conditions, 6LoWPAN
|
||||
* logic will be called to create the IEEE80215.4 frames.
|
||||
*
|
||||
* Assumptions:
|
||||
@@ -127,13 +127,13 @@ static void devif_packet_conversion(FAR struct net_driver_s *dev,
|
||||
FAR struct ipv6_hdr_s *ipv6 = (FAR struct ipv6_hdr_s *)dev->d_buf;
|
||||
|
||||
/* This packet came from a response to TCP polling and is directed
|
||||
* to an IEEE802.15.4 device using 6loWPAN. Verify that the outgoing
|
||||
* to an IEEE802.15.4 device using 6LoWPAN. Verify that the outgoing
|
||||
* packet is IPv6 with TCP protocol.
|
||||
*/
|
||||
|
||||
if (ipv6->vtc == IPv6_VERSION && ipv6->proto == IP_PROTO_TCP)
|
||||
{
|
||||
/* Let 6loWPAN convert IPv6 TCP output into IEEE802.15.4 frames. */
|
||||
/* Let 6LoWPAN convert IPv6 TCP output into IEEE802.15.4 frames. */
|
||||
|
||||
sixlowpan_tcp_send(dev);
|
||||
}
|
||||
|
||||
@@ -265,14 +265,14 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
*
|
||||
* 1. TCP socket output. For the case of TCP output to an
|
||||
* IEEE802.15.4, the TCP output is caught in the socket
|
||||
* send()/sendto() logic and and redirected to 6loWPAN logic.
|
||||
* send()/sendto() logic and and redirected to 6LoWPAN logic.
|
||||
* 2. TCP output from the TCP state machine. That will occur
|
||||
* during TCP packet processing by the TCP state meachine.
|
||||
* 3. TCP output resulting from TX or timer polling
|
||||
*
|
||||
* Cases 2 is handled here. Logic here detected if (1) an attempt
|
||||
* to return with d_len > 0 and (2) that the device is an
|
||||
* IEEE802.15.4 MAC network driver. Under those conditions, 6loWPAN
|
||||
* IEEE802.15.4 MAC network driver. Under those conditions, 6LoWPAN
|
||||
* logic will be called to create the IEEE80215.4 frames.
|
||||
*/
|
||||
|
||||
@@ -284,7 +284,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
if (dev->d_len > 0)
|
||||
#endif
|
||||
{
|
||||
/* Let 6loWPAN handle the TCP output */
|
||||
/* Let 6LoWPAN handle the TCP output */
|
||||
|
||||
sixlowpan_tcp_send(dev);
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ void net_setup(void)
|
||||
neighbor_initialize();
|
||||
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
/* Initialize 6loWPAN data structures */
|
||||
/* Initialize 6LoWPAN data structures */
|
||||
|
||||
sixlowpan_initialize();
|
||||
#endif
|
||||
|
||||
@@ -736,7 +736,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
|
||||
}
|
||||
break;
|
||||
|
||||
/* MAC address operations only make sense if Ethernet or 6loWPAN are
|
||||
/* MAC address operations only make sense if Ethernet or 6LoWPAN are
|
||||
* supported.
|
||||
*/
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile)
|
||||
{
|
||||
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||
len += snprintf(&netfile->line[len], NET_LINELEN - len,
|
||||
"%s\tLink encap:6loWPAN HWaddr "
|
||||
"%s\tLink encap:6LoWPAN HWaddr "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
dev->d_ifname,
|
||||
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1],
|
||||
@@ -168,7 +168,7 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile)
|
||||
dev->d_mac.ieee802154.u8[6], dev->d_mac.ieee802154.u8[7]);
|
||||
#else
|
||||
len += snprintf(&netfile->line[len], NET_LINELEN - len,
|
||||
"%s\tLink encap:6loWPAN HWaddr %02x:%02x",
|
||||
"%s\tLink encap:6LoWPAN HWaddr %02x:%02x",
|
||||
dev->d_ifname,
|
||||
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1]);
|
||||
#endif
|
||||
@@ -221,7 +221,7 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile)
|
||||
#elif defined(CONFIG_NET_6LOWPAN)
|
||||
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||
len += snprintf(&netfile->line[len], NET_LINELEN - len,
|
||||
"%s\tLink encap:6loWPAN HWaddr "
|
||||
"%s\tLink encap:6LoWPAN HWaddr "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x at %s\n",
|
||||
dev->d_ifname,
|
||||
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1],
|
||||
@@ -231,7 +231,7 @@ static int netprocfs_linklayer(FAR struct netprocfs_file_s *netfile)
|
||||
status);
|
||||
#else
|
||||
len += snprintf(&netfile->line[len], NET_LINELEN - len,
|
||||
"%s\tLink encap:6loWPAN HWaddr %02x:%02x at %s\n",
|
||||
"%s\tLink encap:6LoWPAN HWaddr %02x:%02x at %s\n",
|
||||
dev->d_ifname,
|
||||
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1],
|
||||
status);
|
||||
|
||||
@@ -7,7 +7,7 @@ menu "6LoWPAN Configuration"
|
||||
depends on NET_6LOWPAN
|
||||
|
||||
config NET_6LOWPAN_FRAG
|
||||
bool "6loWPAN Fragmentation"
|
||||
bool "6LoWPAN Fragmentation"
|
||||
default y
|
||||
---help---
|
||||
CONFIG_NET_6LOWPAN_FRAG specifies if 6lowpan fragmentation should be
|
||||
@@ -22,7 +22,7 @@ config NET_6LOWPAN_FRAMELEN
|
||||
setting should never be smaller than 127.
|
||||
|
||||
choice
|
||||
prompt "6loWPAN Compression"
|
||||
prompt "6LoWPAN Compression"
|
||||
default NET_6LOWPAN_COMPRESSION_HC06
|
||||
|
||||
config NET_6LOWPAN_COMPRESSION_IPv6
|
||||
@@ -33,16 +33,16 @@ config NET_6LOWPAN_COMPRESSION_IPv6
|
||||
the IPv6 dispatch byte before the packet.
|
||||
|
||||
config NET_6LOWPAN_COMPRESSION_HC1
|
||||
bool "6loWPAN HC1"
|
||||
bool "6LoWPAN HC1"
|
||||
---help---
|
||||
Compress IP/UDP header using HC1 and HC_UDP
|
||||
|
||||
config NET_6LOWPAN_COMPRESSION_HC06
|
||||
bool "6loWPAN HC06"
|
||||
bool "6LoWPAN HC06"
|
||||
---help---
|
||||
Compress IP/UDP header using HC06 compression
|
||||
|
||||
endchoice # 6loWPAN Compression
|
||||
endchoice # 6LoWPAN Compression
|
||||
|
||||
config NET_6LOWPAN_COMPRESSION_THRESHOLD
|
||||
int "Lower compression threshold"
|
||||
@@ -196,7 +196,7 @@ config NET_6LOWPAN_DUMPBUFFER
|
||||
depends on DEBUG_NET_INFO
|
||||
---help---
|
||||
Enable dumping of all packet and frame buffers coming into and out
|
||||
of the 6loWPAN logic. This will generate a large volume of data if
|
||||
of the 6LoWPAN logic. This will generate a large volume of data if
|
||||
selected.
|
||||
|
||||
endmenu # 6LoWPAN Configuration
|
||||
|
||||
@@ -1,4 +1,60 @@
|
||||
Optimal 6loWPAN Configuration
|
||||
6LoWPAN Addressing
|
||||
------------------
|
||||
|
||||
The current 6LoWPAN implementation uses only link local, MAC-based
|
||||
addressing addressing (as discussed in more detail below). Thus if you know
|
||||
the node addressing, then you know the IPv6 address (and vice-versa).
|
||||
|
||||
As a configuration option, the 6LoWPAN implementation will use either the
|
||||
node's 2-byte short address or 8-byte extended address as the MAC address
|
||||
that the IPv6 address is based on. This is determined by the configuration
|
||||
setting CONFIG_NET_6LOWPAN_EXTENDEDADDR. By default, the 2-byte short
|
||||
address is used for the IEEE802.15.4 MAC device's link layer address. If
|
||||
this option is selected, then an 8-byte extended address will be used,
|
||||
instead.
|
||||
|
||||
All nodes operating on a network have unique, 8-byte extended address,
|
||||
that was assigned before the network is configured. 6LoWPAN will use
|
||||
either the extended address for direct communication within the PAN or
|
||||
the short 2-byte address. The short 2-byte address, however, is allocated
|
||||
by the PAN coordinator when the device associated. If short addresses are
|
||||
used, the network cannot be brought up until is is associated.
|
||||
|
||||
Node addressing is modified through IOCTL calls from application logic.
|
||||
The network must be in the DOWN state when ever the node addressing is
|
||||
modified. The modified node addresses will have no effect on the reported
|
||||
IPv6 address until the network is brought to the UP state. The new IPv6
|
||||
MAC-based addresses are only instantiated when the network transitions
|
||||
from the DOWN to UP state.
|
||||
|
||||
IPv6 Neighbor Discovery
|
||||
-----------------------
|
||||
|
||||
IPv6 Neighbor Discovery is not supported. The current ICMPv6 and neighbor-
|
||||
related logic only works with Ethernet MAC. For 6LoWPAN, a new more
|
||||
conservative IPv6 neigbor discovery is provided by RFC 6775 which is not
|
||||
currently supported. With IPv6 neighbor discovery, any IPv6 address may be
|
||||
associated with any short or extended address. In fact, that is the whole
|
||||
purpose of the neighbor discover logic: It plays the same role as ARP in
|
||||
IPv4; it ultimately just manages a neighbor table that, like the arp table,
|
||||
provides the mapping between IP addresses and node addresses.
|
||||
|
||||
The NuttX, Contiki-based 6LoWPAN implementation circumvents the need for
|
||||
the neighbor discovery logic by using only MAC-based addressing, i.e., the
|
||||
lower two or eight bytes of the IP address are the node address.
|
||||
|
||||
Most of the 6LoWPAN compression algorithms exploit this kind of addressing
|
||||
to compress the IPv6 address to nothing but a single bit indicating that the
|
||||
IP address derives from the node address. In this use case, IPv6 neighbor
|
||||
discover is not useful: If we want to use IPv6 neighbor discovery, we could
|
||||
dispense with the all MAC based addressing. But if we want to retain the
|
||||
more compact MAC-based addressing, then we don't need IPv6 neighbor discovery.
|
||||
|
||||
However, it would still be nice to have enough in place to support ping6.
|
||||
Full neighbor support would be necessary if we wanted to route 6LoWPAN frames
|
||||
outside of the WPAN.
|
||||
|
||||
Optimal 6LoWPAN Configuration
|
||||
-----------------------------
|
||||
|
||||
1. Link local IP addresses:
|
||||
|
||||
@@ -63,9 +63,9 @@ struct sockaddr; /* Forward reference */
|
||||
* Description:
|
||||
* sixlowpan_initialize() is called during OS initialization at power-up
|
||||
* reset. It is called from the common net_setup() function.
|
||||
* sixlowpan_initialize() configures 6loWPAN networking data structures.
|
||||
* sixlowpan_initialize() configures 6LoWPAN networking data structures.
|
||||
* It is called prior to platform-specific driver initialization so that
|
||||
* the 6loWPAN networking subsystem is prepared to deal with network
|
||||
* the 6LoWPAN networking subsystem is prepared to deal with network
|
||||
* driver initialization actions.
|
||||
*
|
||||
* Input Parameters:
|
||||
|
||||
@@ -313,8 +313,7 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
|
||||
* PAN IDs are the same.
|
||||
*/
|
||||
|
||||
pktmeta.dpanid = 0xffff;
|
||||
(void)sixlowpan_src_panid(ieee, &pktmeta.dpanid);
|
||||
(void)sixlowpan_src_panid(ieee, pktmeta.dpanid);
|
||||
|
||||
/* Based on the collected attributes and addresses, construct the MAC meta
|
||||
* data structure that we need to interface with the IEEE802.15.4 MAC (we
|
||||
|
||||
@@ -198,7 +198,8 @@ int sixlowpan_meta_data(FAR struct ieee802154_driver_s *ieee,
|
||||
/* Broadcast requires short address mode. */
|
||||
|
||||
meta->destaddr.mode = IEEE802154_ADDRMODE_SHORT;
|
||||
meta->destaddr.saddr = 0;
|
||||
meta->destaddr.saddr[0] = 0;
|
||||
meta->destaddr.saddr[1] = 0;
|
||||
}
|
||||
else if (pktmeta->dextended != 0)
|
||||
{
|
||||
@@ -215,7 +216,7 @@ int sixlowpan_meta_data(FAR struct ieee802154_driver_s *ieee,
|
||||
sixlowpan_saddrcopy(&meta->destaddr.saddr, pktmeta->dest.saddr.u8);
|
||||
}
|
||||
|
||||
meta->destaddr.panid = pktmeta->dpanid;
|
||||
IEEE802154_SADDRCOPY(meta->destaddr.panid, pktmeta->dpanid);
|
||||
|
||||
/* Handle associated with MSDU. Will increment once per packet, not
|
||||
* necesarily per frame: The same MSDU handle will be used for each
|
||||
|
||||
@@ -366,7 +366,7 @@ static void uncompress_addr(FAR net_ipv6addr_t ipaddr, uint8_t const prefix[],
|
||||
* reset. It is called from the common sixlowpan_initialize() function.
|
||||
* sixlowpan_hc06_initialize() configures HC06 networking data structures.
|
||||
* It is called prior to platform-specific driver initialization so that
|
||||
* the 6loWPAN networking subsystem is prepared to deal with network
|
||||
* the 6LoWPAN networking subsystem is prepared to deal with network
|
||||
* driver initialization actions.
|
||||
*
|
||||
* Input Parameters:
|
||||
|
||||
@@ -54,9 +54,9 @@
|
||||
* Description:
|
||||
* sixlowpan_initialize() is called during OS initialization at power-up
|
||||
* reset. It is called from the common net_setup() function.
|
||||
* sixlowpan_initialize() configures 6loWPAN networking data structures.
|
||||
* sixlowpan_initialize() configures 6LoWPAN networking data structures.
|
||||
* It is called prior to platform-specific driver initialization so that
|
||||
* the 6loWPAN networking subsystem is prepared to deal with network
|
||||
* the 6LoWPAN networking subsystem is prepared to deal with network
|
||||
* driver initialization actions.
|
||||
*
|
||||
* Input Parameters:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
* net/sixlowpan/sixlowpan_input.c
|
||||
* 6loWPAN implementation (RFC4944 and draft-ietf-6loWPAN-hc-06)
|
||||
* 6LoWPAN implementation (RFC4944 and draft-ietf-6LoWPAN-hc-06)
|
||||
*
|
||||
* Copyright (C) 2017, Gregory Nutt, all rights reserved
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -272,10 +272,10 @@ static void sixlowpan_uncompress_ipv6hdr(FAR uint8_t *fptr, FAR uint8_t *bptr)
|
||||
* Name: sixlowpan_frame_process
|
||||
*
|
||||
* Description:
|
||||
* Process an incoming 6loWPAN frame in 'iob'.
|
||||
* Process an incoming 6LoWPAN frame in 'iob'.
|
||||
*
|
||||
* If its a FRAG1 or a non-fragmented frame we first uncompress the IP
|
||||
* header. The 6loWPAN payload and possibly the uncompressed IP header
|
||||
* header. The 6LoWPAN payload and possibly the uncompressed IP header
|
||||
* are then copied into d_buf. An indication is returned if the packet
|
||||
* in d_buf is complete (i.e., non-fragmented frame or and the last
|
||||
* FRAGN frame).
|
||||
@@ -436,7 +436,7 @@ static int sixlowpan_frame_process(FAR struct ieee802154_driver_s *ieee,
|
||||
|
||||
else if (fragsize == 0)
|
||||
{
|
||||
nwarn("WARNING: Dropping zero-length 6loWPAN fragment\n");
|
||||
nwarn("WARNING: Dropping zero-length 6LoWPAN fragment\n");
|
||||
return INPUT_PARTIAL;
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ static int sixlowpan_frame_process(FAR struct ieee802154_driver_s *ieee,
|
||||
* being reassembled or the packet is not a fragment.
|
||||
*/
|
||||
|
||||
nwarn("WARNING: Dropping 6loWPAN packet that is not a fragment of "
|
||||
nwarn("WARNING: Dropping 6LoWPAN packet that is not a fragment of "
|
||||
"the packet currently being reassembled\n");
|
||||
return INPUT_PARTIAL;
|
||||
}
|
||||
@@ -487,7 +487,7 @@ static int sixlowpan_frame_process(FAR struct ieee802154_driver_s *ieee,
|
||||
|
||||
if (!isfirstfrag)
|
||||
{
|
||||
nwarn("WARNING: FRAGN 6loWPAN fragment while not reassembling\n");
|
||||
nwarn("WARNING: FRAGN 6LoWPAN fragment while not reassembling\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -708,7 +708,7 @@ static int sixlowpan_dispatch(FAR struct ieee802154_driver_s *ieee)
|
||||
* Name: sixlowpan_input
|
||||
*
|
||||
* Description:
|
||||
* Process an incoming 6loWPAN frame.
|
||||
* Process an incoming 6LoWPAN frame.
|
||||
*
|
||||
* This function is called when the device driver has received an
|
||||
* IEEE802.15.4 frame from the network. The frame from the device
|
||||
|
||||
@@ -169,7 +169,7 @@ struct ipv6icmp_hdr_s
|
||||
/* In order to provide a customizable IEEE 802.15.4 MAC header, a structure
|
||||
* of meta data is passed to the MAC network driver, struct
|
||||
* ieee802154_frame_meta_s. Many of the settings in this meta data are
|
||||
* fixed, deterimined by the 6loWPAN configuration. Other settings depend
|
||||
* fixed, deterimined by the 6LoWPAN configuration. Other settings depend
|
||||
* on the protocol used in the current packet or on chacteristics of the
|
||||
* destination node.
|
||||
*
|
||||
@@ -180,12 +180,12 @@ struct ipv6icmp_hdr_s
|
||||
|
||||
struct packet_metadata_s
|
||||
{
|
||||
uint8_t sextended : 1; /* Extended source address */
|
||||
uint8_t dextended : 1; /* Extended destination address */
|
||||
uint8_t xmits; /* Max MAC transmisstion */
|
||||
uint16_t dpanid; /* Destination PAN ID */
|
||||
union sixlowpan_anyaddr_u source; /* Source IEEE 802.15.4 address */
|
||||
union sixlowpan_anyaddr_u dest; /* Destination IEEE 802.15.4 address */
|
||||
uint8_t sextended : 1; /* Extended source address */
|
||||
uint8_t dextended : 1; /* Extended destination address */
|
||||
uint8_t xmits; /* Max MAC transmisstion */
|
||||
uint8_t dpanid[IEEE802154_PANIDSIZE]; /* Destination PAN ID */
|
||||
union sixlowpan_anyaddr_u source; /* Source IEEE 802.15.4 address */
|
||||
union sixlowpan_anyaddr_u dest; /* Destination IEEE 802.15.4 address */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@@ -382,7 +382,7 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
|
||||
* reset. It is called from the common sixlowpan_initialize() function.
|
||||
* sixlowpan_hc06_initialize() configures HC06 networking data structures.
|
||||
* It is called prior to platform-specific driver initialization so that
|
||||
* the 6loWPAN networking subsystem is prepared to deal with network
|
||||
* the 6LoWPAN networking subsystem is prepared to deal with network
|
||||
* driver initialization actions.
|
||||
*
|
||||
* Input Parameters:
|
||||
@@ -592,6 +592,6 @@ bool sixlowpan_ismacbased(const net_ipv6addr_t ipaddr,
|
||||
****************************************************************************/
|
||||
|
||||
int sixlowpan_src_panid(FAR struct ieee802154_driver_s *ieee,
|
||||
FAR uint16_t *panid);
|
||||
FAR uint8_t *panid);
|
||||
#endif /* CONFIG_NET_6LOWPAN */
|
||||
#endif /* _NET_SIXLOWPAN_SIXLOWPAN_INTERNAL_H */
|
||||
|
||||
@@ -325,7 +325,7 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf,
|
||||
|
||||
sixlowpan_addrfromip(conn->u.ipv6.raddr, &destmac);
|
||||
|
||||
/* If routable, then call sixlowpan_send() to format and send the 6loWPAN
|
||||
/* If routable, then call sixlowpan_send() to format and send the 6LoWPAN
|
||||
* packet.
|
||||
*/
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ ssize_t psock_6lowpan_udp_sendto(FAR struct socket *psock,
|
||||
|
||||
sixlowpan_addrfromip(to6->sin6_addr.in6_u.u6_addr16, &destmac);
|
||||
|
||||
/* If routable, then call sixlowpan_send() to format and send the 6loWPAN
|
||||
/* If routable, then call sixlowpan_send() to format and send the 6LoWPAN
|
||||
* packet.
|
||||
*/
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ bool sixlowpan_ismacbased(const net_ipv6addr_t ipaddr,
|
||||
****************************************************************************/
|
||||
|
||||
int sixlowpan_src_panid(FAR struct ieee802154_driver_s *ieee,
|
||||
FAR uint16_t *panid)
|
||||
FAR uint8_t *panid)
|
||||
{
|
||||
FAR struct net_driver_s *dev = &ieee->i_dev;
|
||||
struct ieee802154_netmac_s arg;
|
||||
@@ -204,7 +204,7 @@ int sixlowpan_src_panid(FAR struct ieee802154_driver_s *ieee,
|
||||
return ret;
|
||||
}
|
||||
|
||||
*panid = arg.u.getreq.attrval.mac.panid;
|
||||
IEEE802154_PANIDCOPY(panid, arg.u.getreq.attrval.mac.panid);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,15 @@ int ipv4_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
net_lock();
|
||||
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
/* Find the device matching the IPv4 address in the connection structure */
|
||||
/* Find the device matching the IPv4 address in the connection structure.
|
||||
* NOTE: listening sockets have no ripaddr. Work around is to use the
|
||||
* lipaddr when ripaddr is not available.
|
||||
*/
|
||||
`
|
||||
if (ripaddr == 0)
|
||||
{
|
||||
ripaddr = lipaddr;
|
||||
}
|
||||
|
||||
dev = netdev_findby_ipv4addr(lipaddr, ripaddr);
|
||||
#else
|
||||
@@ -279,7 +287,15 @@ int ipv6_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
net_lock();
|
||||
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
/* Find the device matching the IPv6 address in the connection structure */
|
||||
/* Find the device matching the IPv6 address in the connection structure.
|
||||
* NOTE: listening sockets have no ripaddr. Work around is to use the
|
||||
* lipaddr when ripaddr is not available.
|
||||
*/
|
||||
|
||||
if (net_ipv6addr_cmp(ripaddr, g_ipv6_allzeroaddr))
|
||||
{
|
||||
ripaddr = lipaddr;
|
||||
}
|
||||
|
||||
dev = netdev_findby_ipv6addr(*lipaddr, *ripaddr);
|
||||
#else
|
||||
|
||||
@@ -151,7 +151,12 @@ int psock_listen(FAR struct socket *psock, int backlog)
|
||||
* accept() is called and enables poll()/select() logic.
|
||||
*/
|
||||
|
||||
tcp_listen(conn);
|
||||
errcode = tcp_listen(conn);
|
||||
if (errcode < 0)
|
||||
{
|
||||
errcode = -errcode;
|
||||
goto errout;
|
||||
}
|
||||
#else
|
||||
errcode = EOPNOTSUPP;
|
||||
goto errout;
|
||||
|
||||
@@ -162,7 +162,7 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
/* Try 6loWPAN TCP packet send */
|
||||
/* Try 6LoWPAN TCP packet send */
|
||||
|
||||
ret = psock_6lowpan_tcp_send(psock, buf, len);
|
||||
|
||||
@@ -205,7 +205,7 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
|
||||
#endif
|
||||
{
|
||||
#if defined(CONFIG_NET_6LOWPAN)
|
||||
/* Try 6loWPAN UDP packet send */
|
||||
/* Try 6LoWPAN UDP packet send */
|
||||
|
||||
ret = psock_6lowpan_udp_send(psock, buf, len);
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf,
|
||||
#endif
|
||||
{
|
||||
#if defined(CONFIG_NET_6LOWPAN)
|
||||
/* Try 6loWPAN UDP packet sendto() */
|
||||
/* Try 6LoWPAN UDP packet sendto() */
|
||||
|
||||
nsent = psock_6lowpan_udp_sendto(psock, buf, len, flags, to, tolen);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user