Commit Graph

409 Commits

Author SHA1 Message Date
7e90980118 Add explanatory note on 7-bit I2C addresses (#520) 2021-07-19 12:02:19 +01:00
ae6e574f53 Improve wording of comments in irq.h (#509) 2021-07-15 09:32:45 +01:00
5e05469373 bug in sleep_until on host mode for macOS (#502) 2021-07-06 12:19:39 -05:00
dc4342f0f6 Update usb regs to fix https://github.com/raspberrypi/pico-feedback/issues/172 2021-07-06 17:02:33 +01:00
35b4965054 make sure PICO_DEFAULT_BOOT_STAGE2_FILE is defined in parent CMake file (#491) 2021-07-06 16:56:17 +01:00
e02c6b327d Allow one of float/double to have 'none' impl but not the other - previously caused a link error 2021-07-06 16:24:46 +01:00
f4ab723eb5 compile failure with PICO_STDOUT_MUTEX=0 2021-07-06 16:06:52 +01:00
cefe5c5b2a Better support for PICO_DISABLE_SHARED_IRQ_HANDLERS (#496)
* use PICO_DISABLE_SHARED_IRQ_HANDLERS exclusively as config for no shared handler support (rather than also PICO_MAX_SHARED_IRQ_HANDLERS == 0)
additionally make irq_add_shared_irq_handler() call irq_set_exclusive_handler() so that single usage of an IRQ still works

* Comment typo

Co-authored-by: Luke Wren <wren6991@gmail.com>
2021-06-29 11:55:35 -05:00
edcb65c916 Enable I2C FIFO full hold in slave mode (stretch clock when RX full), fixes #456 (#494) 2021-06-29 11:55:01 -05:00
f16ccfa1ff Small comment typos 2021-06-29 10:57:21 +01:00
44feae4caf set DIVISOR for each use of h/w divider 2021-06-29 10:55:14 +01:00
61b7cbdc54 Using ' inline __always_inline' also for GNUC 7. (#484)
Per the discussion at https://www.raspberrypi.org/forums/viewtopic.php?f=145&t=313961
2021-06-28 16:07:48 -05:00
1f1c6162cd Header info string updates for PIO DBG_PADx and XOSC STARTUP (#478) 2021-06-04 10:39:00 -05:00
979045dc12 removed CMSIS from SDK doxygen 2021-06-03 16:46:19 -05:00
d42e6a9d10 include pico.h so that uint is defined (#475) 2021-06-03 15:22:28 -05:00
fdf695b8d8 remove incorrect default from PICO_PANIC_FUNCTION PICO_CONFIG entry 2021-06-03 10:42:31 -05:00
45a1e08265 fix sem_acquire_block_until function name 2021-06-03 10:36:48 -05:00
c44e62defd Added board definition (#471) 2021-06-03 10:24:12 -05:00
bba0420c76 Add gpio_set_irqover to match inover/outover/oeover (fixes #265) (#470) 2021-06-03 08:37:06 -05:00
eeb6b501ff fix qtpy rp2040 uart rx rev B (#466)
also add static check for USB DPRAM
2021-06-02 14:00:29 -05:00
5afa3636d6 Small API additions and minor fixes (#406)
* Add missing DREQ_s

* store actual clock frequency in clock_configure (fixes #368)

* use dma DREQ values defined in dreqs/dma.h

* Fix hw_is_claimed, and add xxx_is_claimed APIs

* Add some PIO irq helper methods

* Add DMA channel IRQ status getter and clear methods

* Implement the correct PIO IRQ status/clear methods (good to have methods here as the h/w interrupt registers are super confusing)

* fix pico_multicore dependencies

* add missing wrapper func __aeabi_f2d

* Further DMA/PIO IRQ API cleanup (and review fixes)

* add PICO_INT64_OPS_IN_RAM flag
2021-06-02 13:12:27 -05:00
91e9327ff1 Add PICO_PANIC_FUNCTION define to allow replacement of the default panic function (#463) 2021-06-02 13:04:38 -05:00
b3e1d2d8b8 Add usb device dpram to svd file. Fixes #351 (#465) 2021-06-02 13:04:27 -05:00
561502c2da Move to Tinyusb 0.10.0 (still with RP patches) (#462)
Most build related items have moved into <tinyusb>/hw/bsp/rp2040/family.cmake which is now the source of truth

force merging as same code save submodule was already reviewed
2021-06-02 13:04:08 -05:00
496ff66d19 Make PICO_CONFIG descriptions unique 2021-06-02 16:14:11 +01:00
66c54d807b fix PICO_CONFIG entry 2021-06-02 16:14:11 +01:00
27c1a89b3d review fixes 2021-06-02 16:14:11 +01:00
895bad790e Add some spin lock related doxygen 2021-06-02 16:14:11 +01:00
30041d8513 Add hardware_gpio accessors for Schmitt, slew rate, drive strength (fixes #290) (#464) 2021-06-01 14:25:11 -05:00
d026118499 Allow lengthening xosc startup delay with a compile option (#457) 2021-06-01 14:24:40 -05:00
42cbdcb13a added spi_get_baudrate() + some consistency changes (#395)
* added spi_get_baudrate()
2021-06-01 11:12:15 -05:00
1996a21e3a dma_channel_transfer_[from/to]_buffer_now: added const volatile to read_addr and volatile to write_addr (#449) 2021-05-27 12:12:39 -05:00
e0872a32cc Add missing board detection macros (#448)
* add board detection macros for Sparkfun & RPi Pico / VGA Board
2021-05-27 11:55:38 -05:00
5ad072af5b Add function to get the currently selected channel (#451)
This is most useful in combination with round-robin sampling to avoid
having to track it manually.
2021-05-27 07:25:40 -05:00
6994a3858d -some typo fixes (#408)
-small consistency changes
2021-05-24 16:56:56 -05:00
2eb76bb058 - interp_ fixes (#428)
* - fix interp_claim_lane (in case of interp1 and lane==1 bit was 0b11 instead of 0b1000)
- added missing function interp_unclaim_lane_mask

* - interp_hw_save_t are not I/O registers
2021-05-24 16:56:11 -05:00
b8dc054eba queue: make data pointers const in queue_try_add and queue_add_blocking (#423)
The only operation done on the data pointer is to pass it into the second
argument of memcpy, which is `const void *`
2021-05-24 16:52:49 -05:00
cc8b2156fb Define void operator delete[](void *p, std::size_t n) in new_delete.cpp (#430) 2021-05-24 16:47:29 -05:00
048fcdefd6 Prevent warnings about some unused parameters in pico_stdio_usb when building with -Wextra (#431)
* Fix warnings about some unused parameters in pico_stdio_usb

* Use `__unused` for the unused parameter in tud_descriptor_configuration_cb

* Remove redundant inclusions of `pico/platform.h`

This header is included by the other library headers (via `pico.h`)
2021-05-24 16:42:28 -05:00
80356a4f02 Define __STRING for other compilers than MSVC in the host platform.h file (#434) 2021-05-24 16:40:29 -05:00
d79dd219ce Implement uart_write_blocking and uart_read_blocking for host (#438) 2021-05-24 16:37:31 -05:00
94b83315d9 Update host multicore.h to match multicore.h in rp2_common (#439) 2021-05-24 16:35:11 -05:00
777ccb8e56 Fix function-name misspelling (#443)
If "init tty" is `_inittty` then "reset tty" ought to be `_resettty`
2021-05-24 16:34:23 -05:00
17ee1a877d Add support for Arduino Nano RP2040 Connect (#425)
* Add support for Arduino Nano RP2040 Connect

* Add support for at25sf128a flash

Derived from W25Q080 code, QE bit is set via a single command
2021-05-24 16:32:56 -05:00
b2832b3acb Fix wrong format string in alarm_pool_dump_key (#437)
Fixes the following warning when building for host

```
[...]/pico-sdk/src/common/pico_time/time.c: In function 'alarm_pool_dump_key':
[...]/pico-sdk/src/common/pico_time/time.c:282:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=]
     printf("%ld", to_us_since_boot(get_entry(pool, id)->target));
             ~~^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             %I64d
```
2021-05-24 16:32:31 -05:00
060123dc8d Optional feature to get the max level that has ever been held by a queue (#444)
I'm using this in my program to get a better idea of how many entries I
need to allocate to avoid blocking or losing data, and to debug performance
issues.
2021-05-24 16:31:30 -05:00
596d08ea62 Add missing cast to uint32_t in hw_divider_u32_quotient for host (#436)
Fixes the following warning:

```
[...]/pico-sdk/src/host/hardware_divider/include/hardware/divider.h:81:26: warning: operand of ?: changes signedness from 'int' to 'uint32_t' {aka 'unsigned int'} due to unsignedness of other operand [-Wsign-compare]
     return b ? (a / b) : -1;
                          ^~
```
2021-05-23 08:21:09 -05:00
5384b6b4d3 add comment about using clk_gpout0 enable bit (Fixes #413) 2021-05-17 09:12:41 +01:00
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
c6c4eeb122 add timeout_us/until to mutex/sem blocking methods (#402) 2021-05-12 16:32:45 -05:00