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
This commit is contained in:
Graham Sanderson
2021-06-02 13:12:27 -05:00
committed by GitHub
parent 91e9327ff1
commit 5afa3636d6
21 changed files with 368 additions and 36 deletions

View File

@ -144,6 +144,15 @@ void hardware_alarm_claim(uint alarm_num);
*/
void hardware_alarm_unclaim(uint alarm_num);
/*! \brief Determine if a hardware alarm has been claimed
* \ingroup hardware_timer
*
* \param alarm_num the hardware alarm number
* \return true if claimed, false otherwise
* \see hardware_alarm_claim
*/
bool hardware_alarm_is_claimed(uint alarm_num);
/*! \brief Enable/Disable a callback for a hardware timer on this core
* \ingroup hardware_timer
*

View File

@ -28,6 +28,11 @@ void hardware_alarm_unclaim(uint alarm_num) {
hw_claim_clear(&claimed, alarm_num);
}
bool hardware_alarm_is_claimed(uint alarm_num) {
check_hardware_alarm_num_param(alarm_num);
return hw_is_claimed(&claimed, alarm_num);
}
/// tag::time_us_64[]
uint64_t time_us_64() {
// Need to make sure that the upper 32 bits of the timer