Commit Graph

29 Commits

Author SHA1 Message Date
turon 3576322262 Added platform/toolchain.h toolchain abstraction layer via macros. (#107)
* Added platform/toolchain.h toolchain abstraction layer via macros:
   OT_TOOL_PACKED_BEGIN
   OT_TOOL_PACKED_END
   OT_TOOL_DEPRECATED(symbol)

* Make pretty.  Rekick travis-ci.

* Added doxygen.  Resolved review comments.

* Fixed doxygen sample for OT_TOOL_PACKED to include type name.

* Renamed OT_TOOL_PACKED_FIELD to simplify code searches for usage. Fixed all nested instances to use new naming.

* Fixed OT_TOOL_PACKED_FIELD renaming in doxygen.

* Make pretty.

* Documentation clarifications.

* Moved example into overview section.

* Fixed sdcc comment.

* Revised sdcc comment.

* Fix code style in toolchain packed doxygen example.

* Fixed example.  Moved toolchain test to better match code style.

* Added test for OT_TOOL_PACKED_FIELD.

* Added support for clang.  Just routes to gcc __attributes__.  Verified by running unit test through clang on macos.
2016-06-11 21:35:52 -07:00
Jonathan Hui e03396282e Make building cli, ncp, and examples optional. (#132)
By default, only core is built.  Added the following configure options:
--enable-cli
--enable-ncp
--with-examples=TARGET
2016-06-11 10:32:05 -07:00
Charles Ackerman 0a65eca0ab Update README.md (#123) 2016-06-09 18:03:27 -07:00
Jonathan Hui 6c310bf6bf Add simple command prompt '>'. (#117) 2016-06-08 09:20:36 -07:00
Jonathan Hui 32361a6a2a Updates to fully support and test a standalone library install. (#108) 2016-06-03 12:05:57 -07:00
Jonathan Hui b865607619 Remove posix radio driver's dependency on internal library code. (#105) 2016-06-02 20:05:00 -07:00
Jonathan Hui c3009d0361 Move example apps to C-only API. (#99) 2016-06-02 18:38:27 -07:00
Marcin K Szczodrak ef9de65117 reorg apps and platforms (#89) 2016-06-01 16:01:22 -07:00
Lu Wang 4131e571b8 add enable/disable radio promiscuous mode method and simulated posix … (#84)
* add enable/disable radio promiscuous mode method and simulated posix radio that supports promiscuous mode

* fix code style
2016-05-31 10:13:50 -07:00
Jonathan Hui e2a85d62e3 Require radio driver to provide transmit and receive buffers. (#87)
Some radio chips have memory-mapped regions for transmit and receive buffers.
This change allows the radio driver to pass those buffers, when available,
directly to upper layers and avoid unnecessary copies.
2016-05-27 14:17:48 -07:00
Marcin K Szczodrak cc2e961f4b node id and compilation fixes (#85) 2016-05-27 13:30:35 -07:00
Jonathan Hui 7d2e4a0267 Change API to require all calls be from the same context. (#78)
* Remove atomic driver and all uses of otPlatAtomic* in OpenThread.
* Change posix example to only use a single thread of execution.
2016-05-27 09:16:04 -07:00
Jonathan Hui 25f1fe5a21 Expose LQI from radio up through Thread stack. (#70)
* Add an LQI field to the radio packet structure.
* Add an LQI field to the ThreadMessageInfo.
* Add an LQI field to the scan result.
* Print LQI value in CLI scan result.
2016-05-26 15:08:11 -07:00
Lu Wang 96adf87cd0 add otPlatRadioGetCaps method to check radio capabilities (#53)
add doxygen for otRadioCaps

remove tmp file
2016-05-20 23:20:05 -07:00
Robert Quattlebaum 12a7060a85 ncp: Network Control Processor (NCP) implementation (#31) (#45)
In addition to the "SoC/CLI" implementation that is already included,
OpenThread needs a Network Control Processor (NCP) implementation to
facilitate applications where the Host Controller is logically
separate from the controller that implements the Thread stack (Which
is the NCP). This task also necessitates the definition of the
protocol that the Host Controller and the NCP use to communicate with
each other.

This commit represents a functional starting point for both of these.
The initial name of the line protocol is "Spinel" (Named after the
[gemstone][1]). The long-term goal is to standardize the Spinel
protocol to be the official line protocol for host-to-NCP comunication
for Thread.

A [draft of the Spinel protocol document][2] is included in this
commit. At this point everything is subject to change, but as-is the
protocol has been demonstrated to work fairly well.

The NCP implementation in the has been tested and is working well
enough for basic connectivity, but it is far from complete. A Host
implementation is not yet provided in the tree, but will eventually be
included. A separate host implementation for Linux has been written
and is anticipated to be released as a separate project over the next
few weeks.

[1]: https://en.wikipedia.org/wiki/Spinel
[2]: https://github.com/openthread/openthread/blob/feature/ncp-spinel/src/ncp/PROTOCOL.md#spinel-host-controller-interface
2016-05-19 17:46:16 -07:00
Jonathan Hui d1b0fed201 Add code style formatting (pretty) and checker (pretty-check) targets. (#52)
* Add 'pretty' target to reformat sources to be compliant with code style.
* Add 'pretty-check' target to check if sources are compliant with code style.
* Update travis-ci script to use 'pretty-check' and enforce code style.
* The 'pretty' and 'pretty-check' targets rely on the 'astyle' tool.
2016-05-19 15:46:29 -07:00
Robert Quattlebaum 059763bfcc travis: Update travis to do a make distcheck instead of just make check (#46)
* travis: Do a `make distcheck` instead of just `make check`

Doing a `make distcheck` instead of just a `make check` ensures that
the build system is sane and that the results from `make dist` have
everything needed.

* build-system: Fixes for `make distcheck`

This commit fixes the `distcheck` target by addressing the following
issues:

 *  Repaired ability to perform builds when the build directory is not
    the source directory.
 *  Addressed an issue with the tarball name that occurs the very
    first time `make` is run.
2016-05-19 13:34:40 -07:00
Jonathan Hui c8908cf687 Fix 'make dist'. (#40)
* Include header files for distribution.
* Include tests scripts for distribution.
* Include docs for distribution.
2016-05-16 21:41:38 -07:00
Jonathan Hui 52f94d21c3 Update code style to match rest of repo. (#38) 2016-05-16 19:45:33 -07:00
Jonathan Hui c459db422b Remove unused variables. (#35) 2016-05-16 13:33:13 -07:00
Robert Quattlebaum 4c560dc94e For upstream/serial and logging fixes (#28)
* posix: logging: Use `stderr` instead of `stdout` for debug logging.

* posix: serial: Restore socket `termios` settings for `stdin` and `stdout` at exit.
2016-05-13 16:29:38 -07:00
Jonathan Hui 1f24fa44fa Add active scan to API and CLI. (#27)
* Add active scan functions and definitions to core C api.
* Add active scan command to CLI.
* Add emulation of PHY channel isolation.
2016-05-13 15:14:04 -07:00
Jonathan Hui baa8994190 Re-enable termio settings. (#25) 2016-05-13 09:33:35 -07:00
Marcin K Szczodrak 99870fae01 adjust license text width (#22) 2016-05-12 22:39:11 -07:00
Jonathan Hui 2e3f3b9c01 Add note about using default parameter settings. (#20) 2016-05-11 21:49:12 -07:00
Jonathan Hui 3c6d23d7ba Fix README to match CLI example output (#10) 2016-05-11 16:18:11 -07:00
Wei Wang 337571aebb fix unused stack variable and code cleanup (#13)
LGTM.  Thanks, @weivincewang !
2016-05-11 15:45:40 -07:00
Jonathan Hui dd9d6e6517 Fix typo in README.md (#1)
The returned 'state' value for Node 2 should be 'router' instead of 'leader'.
2016-05-11 11:36:47 -07:00
Jonathan Hui 4f9945c533 Initial commit 2016-05-10 22:49:53 -07:00