Christopher Haster
4984077d07
Adopt Callback class in hal
2016-05-13 19:07:45 -05:00
Christopher Haster
bf498de127
Add backward compatiblity for FunctionPointer class using Callback
...
effectively:
typedef Callback<R(A)> FunctionPointerArg1<R,A>
typedef Callback<R()> FunctionPointerArg1<R,void>
typedef Callback<R()> FunctionPointer
typedef Callback<R()> event_callback_t
2016-05-13 19:07:45 -05:00
Christopher Haster
8b330ae8a6
Add callback tests
2016-05-13 19:07:45 -05:00
Christopher Haster
8e42a32d00
Add Callback, an improved FunctionPointer class
...
- Adopt C++11 style template arguments, requires rename to Callback
- Add constructor for C style callback functions
- Add constructor for Callbacks
- Add static function for passing to C style callbacks
2016-05-13 19:07:45 -05:00
Christopher Haster
83f65c0d3a
Add rudimentary support for server side
...
mirrored from:
https://developer.mbed.org/teams/NetworkSocketAPI/code/LWIPInterface/
2016-05-13 11:41:20 -05:00
Christopher Haster
9e415df196
Match changes to NSAPI in LWIPInterface
...
mirrored from:
https://developer.mbed.org/teams/NetworkSocketAPI/code/LWIPInterface/
2016-05-13 11:41:19 -05:00
Christopher Haster
4684173778
Match changes to NSAPI in ESP8266Interface
...
mirrored from:
https://developer.mbed.org/teams/components/code/ESP8266Interface/
2016-05-13 11:41:18 -05:00
Christopher Haster
7d9b5e6f76
Small bug fixes
...
mirrored from:
https://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/
- Fix bug with SocketAddress init per @c1728p9
- Fix issue with not passing interface through accept call
- Fix port issue in SocketAddress constructor
2016-05-13 11:41:17 -05:00
Christopher Haster
8304124a63
Add NSAPI_ERROR_PARAMETER
...
per @c1728p9
2016-05-13 11:41:16 -05:00
Christopher Haster
bcab0fcef5
Added WFI to save power in temporary polling implementation
2016-05-13 11:41:15 -05:00
Christopher Haster
5475dd0404
Consolidate set_timeout/set_blocking behaviour
...
- Avoids ambiguity when both are used
- Matches Python behaviour
2016-05-13 11:41:14 -05:00
Christopher Haster
d17fa4faad
Separate Stack/Interface concept into two distinct classes
2016-05-13 11:41:13 -05:00
Christopher Haster
49ba2be3a7
Add standardized stack options
2016-05-13 11:41:11 -05:00
Christopher Haster
893dfec7e6
Added workaround for bug in newlib sscanf
...
https://bugs.launchpad.net/gcc-arm-embedded/+bug/1399224
2016-05-13 11:41:10 -05:00
Russ Butler
57de57efc5
Update libraries to match the latest NSAPI
...
Update the library references for mbed-client-classic and
sal-iface-6lowpan-morpheus-private.
2016-05-13 11:41:09 -05:00
Christopher Haster
f4526e5b73
Fix race condition in socket close
2016-05-13 11:41:08 -05:00
Christopher Haster
16929af278
Rename Interface -> Stack
...
NetworkInterface -> NetworkStack
EthernetInterface -> EthernetStack
WiFiInterface -> WiFiStack
CellularInterface -> CellularStack
MeshInterface -> MeshStack
2016-05-13 11:41:07 -05:00
Christopher Haster
55f7d29fc3
Revised documentation for Interface classes
2016-05-13 11:41:06 -05:00
Christopher Haster
d43f8706d3
Revisited documentation for Socket API
2016-05-13 11:41:05 -05:00
Christopher Haster
eab6d775ac
Removed is_connected function
...
- Not supported by TCP/UDP protocols
- Uncommon and less useful with proper error handling
2016-05-13 11:41:04 -05:00
Christopher Haster
50a9143478
Revisited documentation for NetworkInterface specific methods
2016-05-13 11:41:03 -05:00
Christopher Haster
59549cb4df
Standardized comment style
2016-05-13 11:41:02 -05:00
Christopher Haster
e762b04f64
Added support for shortened form ipv6 addresses
...
supported:
1.2.3.4
1:2:3:4:5:6:7:8
1:2::7:8
::
currently not supported:
1:2:3:4:5:6:1.2.3.4
2016-05-13 11:41:01 -05:00
Christopher Haster
525c7b361c
Revised stack specific configurations
...
Adds the following functions for direct configuration of interface
- (set|get)stackopt
- (set|get)sockopt
2016-05-13 11:41:00 -05:00
Christopher Haster
c4506dc1c0
Move bind to Socket
...
Bind can operate on any IP socket and is not specific to a protocol
2016-05-13 11:40:59 -05:00
Russ Butler
fa45131245
Fix ipv6 addr in SocketAddress
...
Correctly set and return the ipv6 address.
2016-05-13 11:40:58 -05:00
Christopher Haster
141b245dfc
Added better support for SocketAddress/string addresses/ports
2016-05-13 11:40:57 -05:00
Christopher Haster
d488f02f5e
Move to SocketAddress in gethostbyname
2016-05-13 11:40:55 -05:00
Christopher Haster
62bb777c1f
Added support for storing bytes directly in SocketAddress
...
Bytes are stored by default, however enough space is allocated in
a SocketAddress to generate the string representation if necessary.
Currently there is no support for shortened addresses
2016-05-13 11:40:54 -05:00
Christopher Haster
455f023949
Renamed NetworkInterface create/destroy methods to match Socket methods
...
- socket_create -> socket_open
- socket_destroy -> socket_close
2016-05-13 11:40:53 -05:00
Christopher Haster
c33d246fa6
Move to single state-change interrupt
...
Pros
- Easier to implement
- More similar to SIGIO in BDS sockets
Cons
- Less information, but this information had a high risk of being
faulty/spurious
2016-05-13 11:40:52 -05:00
Christopher Haster
c3eec0322b
Remove shutdown parameter from close call
...
Pros
- Simplifies interface
- Easier base implementation
Cons
- May need shutdown functionality, in this case shutdown
can be added as another function in the future
2016-05-13 11:40:51 -05:00
Christopher Haster
71efccb1e8
Add open call as alternative to passing NetworkInterface at construction
...
Pros
- Allows memory to be statically allocated
- Avoids issues with Thread creation before entering main
- Matches existing APIs such as FunctionPointer and Ticker
Cons
- Does not enforce passing a NetworkInterface
2016-05-13 11:40:50 -05:00
Christopher Haster
106e459a64
Adopt mbed style doxygen comments
...
per @0xc0170
2016-05-13 11:40:49 -05:00
Christopher Haster
f0f7972a64
Move to asynch lwip sockets based on armmbed/sal-stack-lwip
...
Move the backend of LWIPInterface from the LWIP socket API to the
asynch UDP/TCP APIs used in https://github.com/armmbed/sal-stack-lwip .
Provides asynchronous functionality for the LWIPInterface.
2016-05-13 11:40:48 -05:00
Simon Hughes
194da2ce3c
Adding configuration-store and flash-abstraction components for configuration-store integration.
2016-05-13 15:59:46 +01:00
Anna Bridge
cd4172a80b
Merge branch 'master' of https://github.com/ARMmbed/mbed-os
2016-05-13 14:27:05 +01:00
Anna Bridge
878ce59fa3
Updated utest ticker scheduler to use the c++ Timeout class rather than
...
the C based function calls directly into ticker.
Added a software based backtrace functionality, plus utest instrumentation
using that functionality.
2016-05-13 14:09:55 +01:00
Bogdan Marinescu
451b8c3a22
Merge pull request #79 from geky/thread-lifetime
...
Add lifetime management to rtos::Thread
2016-05-12 18:16:42 +03:00
Niklas Hauser
8a37762866
Smaller Thread class with clearer error messages.
2016-05-10 16:07:39 +01:00
Sam Grove
9c38f2aa63
Merge pull request #85 from bridadan/build-tests-fix
...
Fixing build issues for tests
2016-05-10 09:31:29 -05:00
Brian Daniels
4ae7d54830
Fixing build issues for tests.
...
Build artifacts from previous builds were polluting the current build. Now
shared sources are built as a library, then tests are built into their own
folder.
2016-05-10 14:53:35 +01:00
Bogdan Marinescu
904ea446eb
Merge pull request #84 from screamerbg/compile-response-files
...
Response files for includes, de-duplicate includes and more
2016-05-10 12:05:16 +03:00
Mihail Stoyanov
7e3b69ec13
Add dot to include response file name, which follows the naming convention with .link_totals.txt and .link_files.txt
2016-05-09 19:08:56 +01:00
Mihail Stoyanov
d33f890fdd
Minor code cleanup
2016-05-09 19:08:56 +01:00
Mihail Stoyanov
7e11174a00
Calculate md5 of all include paths in compile_sources() and remove calculation from <toolchaon>get_compile_options(), thus significantly reduce repetitive md5 calculations
...
Unify handling of the include response file in mbedToolchain::get_inc_file()
Sanitize obsolete no-longer needed methods
2016-05-09 19:08:56 +01:00
Mihail Stoyanov
f01e1363d1
De-duplicate the include paths. Without this all compiles are passed include paths twice
2016-05-09 19:08:56 +01:00
Mihail Stoyanov
868942a148
Build system response files for all macros and includes. This also allows developers to check the response file after/during compile for the list of all macros and includes being used.
2016-05-09 19:08:56 +01:00
Mihail Stoyanov
ecb9651873
Unified command-line handling of defines and includes with response files for all toolchains (ARM, GCC, IAR)
...
Capture system/OS error during command execution and report the command
Report command before executing it in default_cmd()
2016-05-09 19:08:56 +01:00
Mihail Stoyanov
2be0385f73
Response files for includes during assemble() and compile()
...
Moved unified compile to toolchains to enable specific toolchain support for response files
2016-05-09 19:08:55 +01:00