Implement a mechanism to set the maximum string length used in
tud_descriptor_string_cb() by defining USBD_DESC_STR_MAX. If
USBD_DESC_STR_MAX is not defined, the behavior remains unchanged and the
previous default value of 20 is used. A compile time error is produced
if USBD_DESC_STR_MAX is higher than 127 since the length of the string
plus header is returned in a single byte as (2 * len + 2). Similarly, a
compile time error is generated if the length is defined as less than 17
in order to ensure that there is enough room for the 16-character serial
number plus header.
Change from Infineon to fix the BT buffer corruption which occurs when
making heavy use of BT and WIFI at the same time.
Update cyw43-driver (Includes fix for BT+Wifi buffer corruption issue)
The process for reading VBUS and VSYS on Pico and Pico W is different.
It's hard to write code that compiles for both devices.
Add some configuration to the board files.
Fixes#1222
* Allow pre-processor overrides for Clock/PLL setup
* Use `_KHZ` rather than `_MHZ` for `XOSC_` `SYS_CLOCK_` etc definitions (`_MHZ` versions are provided for compatibility when `_KHZ` is a multiple of 1000)
Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
Bluetooth needs a tempoarary buffer to load firmware. Micropython won't
work safely with malloc and free so allow these calls to be changed by
using cyw43_malloc / cyw43_free macros.
* switch all .S files to unified asm, and use a new macro `pico_default_asm_setup` to setup compiler to help porting to other compilers. Also some minor tweaks:
* switch some code to use more recent helper methods (e.g. busy_wait_at_least_n_cycles)
* add documentation to host divider header (I had this ages ago and never promoted)
* fixup erroneous docs about 32p32 values in all divider headers
* fix some compiler warnings
* rename recently added `unified_asm` macro to `pico_default_asm`
This was changed to use the same algorithm as MP.
This function is used to set the wifi mac if OTP is unset (which
shouldn't ever be the case). But if it does occur, changing the mac
might cause issues, so lets play safe and revert the change.
* Fix various non-GCC warnings (no effect on GCC)
* Reduce use of typeof since non GCC compilers may not support it
* Introduce PICO_C_COMPILER_IS_GNU, PICO_C_COMPILER_IS_CLANG, PICO_C_COMPILER_IS_IAR to CMake as if (CMAKE_C_COMPILER_ID STREQUAL "xxx") is a bit verbose
* Use "unified_asm" macro for all inline asm (it is "volatile __asm" on GNU with a .syntex unified)
* Use NOLOAD instead of COPY in linker scripts (arguably more correct anyway)
* Use the same style for setting _etext in all 4 linker scripts (to the beginning of .data). Clang aligns .data on a 16 byte boundary. Note ideally we'd
add a new symbol __data_source, however that would break backwards compatibility with existing user linker scripts
* Use "a" for .stack, .heap sections because clang complains otherwise, and they are explicitly NOLOAD anyway
* Avoid duplicating __sev, __wfe, __wfi which Clang sometimes seems to provide as built-ins
* Add missing kitchen_sink_blocked_ram binary
* Allow build with LLVM Embedded Toolchain Form ARM v 14.0.0 (unsupported atm)
If you just want to link to pico_btstack_flash_bank_headers to include
the header file you also have to link to pico_btstack_base_headers.
ENABLE_CLASSIC and ENABLE_BLE are used in header files so should be
added by the headers library
Fixes#1271