Add common device descriptor for USB class devices.
The common descriptor allows easy configuration of Manufacturer,
Product, SerialNumber strings and PID/VID.
It also allows future support for composite devices.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add Mass Storage Class header. The header is based on mass_storage.h,
has been cleaned up and extended by the Class and Protocol Codes.
mass_storage.h will be removed after mass_storage.c has been reworked.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
1. After calling sendto(), the packet will be unreferenced.
Call coap_pending_cycle() to make sure the packet is referenced until
we got the response from the peer or retransmission timeout.
2. In retransmit_request(), we rearrange the order to avoid the issue.
3. Remove IPv4 configuration for source code is expecting IPv6
4. Correct a typo in README.rst
5. Initialize the interface w/ IPv6 address
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
When testing against etsi_coaptest.sh, test cases TD_COAP_BLOCK_03/04
will get stuck. This is because these testcases send out a blockwise
transfer but with an empty payload. Although this should be a legit
request, large-update/create handlers did not check "MORE" flag in
block1 option and always return an error when request comes with empty
payload.
Corrected as below
1. Initialize coap_block_context when first block arrives.
(SIZE1 option is not always available. In the case that SIZE1 is
unavailable, the zoap_block_context will be re-initialized each time
a new block has arrived)
2. Check "MORE" flag of block1 option. If it's the last block, then
an empty payload should be allowed.
3. Response w/ 2.04 CHANGED when the last block has arrived for
large-update
4. Response w/ 2.02 CREATE when the last block has arrived for
large-create
5. Remove adding block2 option to the response since we are not sending
back any data to the caller
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Some chips are smart enough to handle the ACK request flag on
transmitted frames, so it's unneccessary for the L2 to wait for it.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is both required in L2's radio part as well as it might be useful
on some ieee802154 radio drivers.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Finally removing set_ieee_addr, set_short_addr and set_pan_id which have
been replaced by set_filter.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
set_ieee_addr, set_short_addr and set_pan_id are now unused by L2, so
removing their exposure through the radio API.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
These are now fully replaced by set_filter() thus removing their usage
by the L2 layer.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
If the hw supports filtering, L2 will apply the ieee address, short
address or PAN ID filters.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will replace the current mandatory set_ieee_addr, set_short_addr
and set_pan_id functions, which are only valid if the hardware is
supporting filtering. Which is not the case on some chips.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Using radio's get_capabilities, it is possible to know if the driver can
get CSMA work handed-over.
For now, up to device drivers to use
CONFIG_NET_L2_IEEE802154_RADIO_CSMA_CA_* parameters.
Let's see if it will be interesting at some point to enable runtime
modification of these parameters.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Further support will need work per-driver basis, as soon as the L2 will
be able to make usage of such support.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will be useful to know various generic hardware aspects that can be
used relevantly by the L2 layer.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that lqi and rssi are embedded into net_pkt, there is no need for
that function.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Instead of having dedicated function on the radio api level for 15.4,
let's just add the relevant values to the net_pkt structure (if only
IEEE802154 is enabled). It's simpler and make the values relevantly
tied to the received packet.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fixed a missing reset of FC feature on HCI reset. This
feature provided a simple connection handle based event
exclusions, but this is no longer needed with the
support for controller to host flow control. This feature
should be removed in the future.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add support for flashing targets compatible with esp32.sh.
Only tested by comparing commands that would be run.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Add support for flashing targets compatible with bossa-flash.sh.
This is something of a bug-for-bug reimplementation, as the existing
flashing script makes some potentially unsafe assumptions.
Only tested by comparing commands that would be run.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Add support for flashing targets compatible with pyocd.sh.
Tested on 96b_nitrogen, nrf52_blenano2, and frdm_k64f, with and
without PYOCD_BOARD_ID. Additionally, frdm_k64f was tested with
PYOCD_DAPARG_ARG='limit_packets=True'.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Zephyr board flashing and debugging is done via shell scripts. It
would improve the CMake transition to remove the shell dependency.
Add zephyr_flash_debug.py to allow phasing out the shell scripts.
This takes two arguments:
- a command (eventually flash, debug, and debugserver, but just flash
for now)
- the path to the corresponding shell script
zephyr_flash_debug.py runs the command in pure Python if it
knows how. Otherwise, it falls back on the shell script. In
this patch, it always falls back. Subsequent patches add support
for existing flash backends.
Invoke zephyr_flash_debug.py from the Makefile flash target, but only
if USE_ZEPHYR_FLASH_DEBUG_SHELL is empty. This lets users keep existing
behavior in case of issues, and can be removed later once the Python
script is more widely tested.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
A connection might have gotten disconnected by the time that an ACL
buffer is free up, in which case there is no need to send a HCI
command for it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is subject to the constraint that such system calls must have a
return value which is "u64_t" or "s64_t".
So far all the relevant kernel calls just have zero or one arguments,
we can later add more _syscall_ret64_invokeN() APIs as needed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
User threads aren't trusted and shouldn't be able to alter the
scheduling assumptions of the system by making thread priorities more
favorable.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We now have macros which should significantly reduce the amount of
boilerplate involved with defining system call handlers.
- Macros which define the proper prototype based on number of arguments
- "SIMPLE" variants which create handlers that don't need anything
other than object verification
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
- Dumping error messages split from _k_object_validate(), to avoid spam
in test cases that are expected to have failure result.
- _k_object_find() prototype moved to syscall_handler.h
- Clean up k_object_access() implementation to avoid double object
lookup and use single validation function
- Added comments, minor whitespace changes
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
When a peer master performed a PHY update procedure with no
change, the state machine was not released. This blocked
any future local initiation of the procedure and also
leading to termination of connection with reason LMP
response timeout.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>