Commit Graph

40 Commits

Author SHA1 Message Date
graham sanderson
c8ccefb972 Add Bluetooth support
Co-authored-by: Peter Harper <77111776+peterharperuk@users.noreply.github.com>
2023-02-10 18:27:23 -06:00
Graham Sanderson
18b97fcba0
add new pcio_I2c_slave library (#1205)
* add (slightly modified) pico_i2c_slave library from https://github.com/vmilea/pico_i2c_slave
* introduce VTABLE_FIRST_IRQ constant
2023-02-07 07:47:01 -06:00
Graham Sanderson
cc169ddd68
stdio hardening + new mutex API (#1224)
* * Harden stdio_usb and stdio in general against deadlocks which could otherwise result from doing printfs from within IRQs
* Add a test for the above
* Add mutex_try_enter_block_until API.
* Make best_effort_wfe_or_timeout not use alarms if called from within IRQ
2023-02-06 16:27:39 -06:00
Graham Sanderson
2a9c59925a
remove duplicate pico_rand inclusion in kitchen_sink (#1206) 2023-01-27 16:37:47 -06:00
Graham Sanderson
1bd9de95de
add pico_rand to kitchen_sink (#1204) 2023-01-27 10:59:59 -06:00
andygpz11
b70f984f2a
Add pico_rand library (#1111)
Add a general purpose random number generator via pico_rand library. which tries to use as much real entropy as possible mixed into a PRNG

Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
2023-01-26 13:25:27 -06:00
Graham Sanderson
605e21ae6f
pairing heap free link list gets orphaned when fully depleted (#1120) (#1121)
add some more asserts, and fix test case for debug which was broken by all the assserts slowing it down
2022-12-08 11:14:53 -06:00
Graham Sanderson
b0294d6bf4
fix build without mbedtls submodule initialized, and fix deoptimized debug build (#1067) 2022-10-17 11:34:10 -05:00
Peter Harper
719d5e41a2
Add mbedtls to pico-sdk (#894)
* Add mbedtls as a submodule

Checked out on branch mbedtls-2.28

* Add mbedtls to pico-sdk

Link your code to pico_lwip_mbedtls and pico_mbedtls.
See tls_client example in pico-examples

Fixes https://github.com/raspberrypi/pico-sdk/issues/893
2022-10-16 16:41:21 -05:00
graham sanderson
5e9a5e827b Add Pico W and lwIP support 2022-06-30 00:46:13 -05:00
Earle F. Philhower, III
4c49427bf3
Fix auto_init_recursive_mutex definition for C++ (#875)
Co-authored-by: Graham Sanderson <graham.sanderson@gmail.com>
2022-06-20 12:47:46 -05:00
Graham Sanderson
672e48e9e9
Add sem_try_acquire(). Fixes #846 (#856)
Co-authored-by: Geoff Simmons <geoff@uplex.de>
2022-06-08 13:23:36 -05:00
Graham Sanderson
159d552150
Fix bug in irq_remove_shared_handler and add test #823 (#825)
* Fix bug in irq_remove_shared_handler and add test #823

* Add comments to irq_handler_chain.S

Co-authored-by: Luke Wren <wren6991@gmail.com>
2022-05-16 13:44:15 -05:00
Graham Sanderson
04c68c554b
cleanup pico_stdlib_test. add actual check for __builtin bitops (#821) 2022-05-10 13:56:48 -05:00
Graham Sanderson
9c616da1e5
fix bug in pico_float_test (#817) 2022-05-10 12:58:55 -05:00
Andrew Scheller
b7e82b638a
Fix function-names reported by hardware_pwm_test (#736) 2022-03-22 17:49:17 -05:00
Graham Sanderson
0562089fab
fixup __forceinline for cpp code and add kitchen_sink cpp test (#670)
* fix __force_inline for different GCC versions in cpp mode (the affected versions are different from c mode), and build kitchsink.c as a cpp file too for testing
* silly bug in host platform.h
2021-12-08 12:05:49 -06:00
Graham Sanderson
d7358e4ed8
update generated struct headers to fix collision (#641)
* update generated struct headers to fix collision and include all headers in kitchen_sink test
2021-11-01 08:06:34 -05:00
Andrew Scheller
cc1e2e8758
Small typo in kitchen_sink (#642) 2021-10-30 08:29:26 -05:00
Graham Sanderson
83cd1da1ef
fix build if TinyUSB not present (#631) 2021-10-25 08:56:25 -05:00
Graham Sanderson
0ccd0db163
Update to TinyUSB 0.12.0 (#622)
Update kitchent_sink compilation test to include TinyUSB to catch warnings
Fix warnings in stdio_usb and stdio_semihosting caught by above
2021-10-25 08:33:42 -05:00
graham sanderson
44feae4caf set DIVISOR for each use of h/w divider 2021-06-29 10:55:14 +01:00
Graham Sanderson
574fdee37b
Fixup divider save_restore for floating point too; improve tests (#405)
- The divider state needs to be saved for __aeabi_ddiv, __aeabi_fdiv, __aeabi_dtan and __aeabi_ftan or they won't work in interrupts *(probably not used much youd hope), or on an RTOS context switch
 - Refactored code out for the integer and floating point cases
 - Improved the floating point 'tests' in passing to check more return values against GCC implementations
 - Added floating point usage to the IRQ nesting test case
2021-05-13 07:38:42 -05:00
Graham Sanderson
b05d863428
Add basic CMSIS core headers (#384)
Adds a new cmsis_core INTERFACE library, which provides the basic CMSIS macros/definitions, and RP2040.h and system_RP2040.h
By default the isr_ methods in the vector table are renamed to their CMSIS versions, but this can be overridden by defining PICO_CMSIS_RENAME_EXCEPTIONS=0
2021-05-11 10:47:13 -05:00
Graham Sanderson
53f1915a6b
Add hardware_exception for setting exception handlers at runtime (#380) 2021-05-05 11:45:39 -05:00
Graham Sanderson
6796faf0d5
add PICO_DIVIDER_DISABLE_INTERRUPTS flag which makes PICO_DIVIDER disable interrupts around division rather than using co-operative guards to protect nested use (i.e. within IRQ/exception). Use of this flag can simplify porting of RTOSes but with a different performance profile (#372) 2021-05-04 07:48:07 -05:00
Graham Sanderson
92f948c123
Make kitchen_sink check param assertions, and include all headers - fix sign-compare warnings (#316) 2021-04-06 20:50:26 -05:00
Graham Sanderson
fe3408b286
Small fixes (#260)
* pico_stdio_usb: be more explicit about includes, fix warning (#257)

* pico_base: NDEBUG backwards for absolute_time_t (#255)

* pico_util: missing extern C in queue.h (#249)

* build: remove -march which was masking -mcpu, now SVC available (#253)
2021-03-17 18:05:48 +00:00
Graham Sanderson
d36b1ca8ae
hardware_timer: fix race condition whem a new timer being added becomes missed thus obviating the need for an IRQ but there is an IRQ already pending for another timer (#243) 2021-03-10 12:04:04 -06:00
Andrew Scheller
2b1dbfa3d2 Fix SDK to build cleanly if PICO_DEFAULT_UART isn't defined (#223) 2021-03-04 21:22:48 -06:00
graham sanderson
684986aae6 fix the represntation of at_the_end_of_time to be 63 one bits rather than 32 2021-03-04 21:22:48 -06:00
graham sanderson
503bc8b385 Fixup another level of compiler warnings, add _U() definition 2021-03-04 21:22:48 -06:00
graham sanderson
f16af45f9e b0 sincos shim was incorrect, causing crash 2021-03-04 21:22:48 -06:00
Luke Wren
d492b72c29 Add pico_bootsel_via_double_reset library, fix #87 (#137)
* Add pico_bootsel_via_double_reset library, fix #87

* pico_bootsel_via_double_reset: remove unnecessary library guard, fix subdirectory ordering

* Fix C type used as PICO_CONFIG type
2021-03-04 21:22:48 -06:00
Graham Sanderson
6f94f6a3d7 Add -Wuninitialized -Wunused -Wcast-align to warnings checked by kitchen_sink (and fixup warnings) (#125) 2021-03-04 21:22:48 -06:00
Luke Wren
2a243a33e2 Fix -Wsign-compare warnings 2021-03-04 21:22:47 -06:00
Brian Swetland
a362925eda Clean up various C source and headers to appease -Wstrict-prototypes
In C, func() is a function taking an unspecified number of arguments,
vs func(void) a function taking no arguments. In C++ both forms indicate
"no arguments."

Update these headers to use the (void) form, which is correct in both
languages and avoids complaints when -Wstrict-prototypes is specified.
2021-03-04 21:22:47 -06:00
graham sanderson
dd09c4ea4a add pico_unique_id to kitchen_sink app 2021-03-04 21:22:47 -06:00
Andrew Scheller
5e5a1e1b26 Fix typo ;-) 2021-03-04 21:22:47 -06:00
graham sanderson
26653ea81e Initial Release 2021-01-20 10:44:27 -06:00