Skip to content

Commit 45be1df

Browse files
committed
Fix docs for clock_gpio_init etc for RP2350
You can also use gpios 13 and 15 on RP2350
1 parent 72c5458 commit 45be1df

File tree

1 file changed

+36
-3
lines changed
  • src/rp2_common/hardware_clocks/include/hardware

1 file changed

+36
-3
lines changed

src/rp2_common/hardware_clocks/include/hardware/clocks.h

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,18 @@ void clocks_enable_resus(resus_callback_t resus_callback);
399399
/*! \brief Output an optionally divided clock to the specified gpio pin.
400400
* \ingroup hardware_clocks
401401
*
402-
* \param gpio The GPIO pin to output the clock to. Valid GPIOs are: 21, 23, 24, 25. These GPIOs are connected to the GPOUT0-3 clock generators.
402+
* \if rp2040_specific
403+
* On RP2040 valid GPIOs are 21, 23, 24, 25.
404+
* These GPIOs are connected to the GPOUT0-3 clock generators.
405+
* \endif
406+
* \if rp2350_specific
407+
* On RP2350 valid GPIOs are 13, 15, 21, 23, 24, 25.
408+
* GPIOs 13 and 21 are connected to the GPOUT0 clock generator.
409+
* GPIOs 15 and 23 are connected to the GPOUT1 clock generator.
410+
* GPIOs 24 and 25 are connected to the GPOUT2-3 clock generators.
411+
* \endif
412+
*
413+
* \param gpio The GPIO pin to output the clock to.
403414
* \param src The source clock. See the register field CLOCKS_CLK_GPOUT0_CTRL_AUXSRC for a full list. The list is the same for each GPOUT clock generator.
404415
* \param div_int The integer part of the value to divide the source clock by. This is useful to not overwhelm the GPIO pin with a fast clock. This is in range of 1..2^24-1 on RP2040
405416
* and 1..2^16-1 on RP2350
@@ -410,7 +421,18 @@ void clock_gpio_init_int_frac16(uint gpio, uint src, uint32_t div_int, uint16_t
410421
/*! \brief Output an optionally divided clock to the specified gpio pin.
411422
* \ingroup hardware_clocks
412423
*
413-
* \param gpio The GPIO pin to output the clock to. Valid GPIOs are: 21, 23, 24, 25. These GPIOs are connected to the GPOUT0-3 clock generators.
424+
* * \if rp2040_specific
425+
* On RP2040 valid GPIOs are 21, 23, 24, 25.
426+
* These GPIOs are connected to the GPOUT0-3 clock generators.
427+
* \endif
428+
* \if rp2350_specific
429+
* On RP2350 valid GPIOs are 13, 15, 21, 23, 24, 25.
430+
* GPIOs 13 and 21 are connected to the GPOUT0 clock generator.
431+
* GPIOs 15 and 23 are connected to the GPOUT1 clock generator.
432+
* GPIOs 24 and 25 are connected to the GPOUT2-3 clock generators.
433+
* \endif
434+
*
435+
* \param gpio The GPIO pin to output the clock to.
414436
* \param src The source clock. See the register field CLOCKS_CLK_GPOUT0_CTRL_AUXSRC for a full list. The list is the same for each GPOUT clock generator.
415437
* \param div_int The integer part of the value to divide the source clock by. This is useful to not overwhelm the GPIO pin with a fast clock. This is in range of 1..2^24-1 on RP2040
416438
* and 1..2^16-1 on RP2350
@@ -428,7 +450,18 @@ static inline void clock_gpio_init_int_frac(uint gpio, uint src, uint32_t div_in
428450
/*! \brief Output an optionally divided clock to the specified gpio pin.
429451
* \ingroup hardware_clocks
430452
*
431-
* \param gpio The GPIO pin to output the clock to. Valid GPIOs are: 21, 23, 24, 25. These GPIOs are connected to the GPOUT0-3 clock generators.
453+
* \if rp2040_specific
454+
* On RP2040 valid GPIOs are 21, 23, 24, 25.
455+
* These GPIOs are connected to the GPOUT0-3 clock generators.
456+
* \endif
457+
* \if rp2350_specific
458+
* On RP2350 valid GPIOs are 13, 15, 21, 23, 24, 25.
459+
* GPIOs 13 and 21 are connected to the GPOUT0 clock generator.
460+
* GPIOs 15 and 23 are connected to the GPOUT1 clock generator.
461+
* GPIOs 24 and 25 are connected to the GPOUT2-3 clock generators.
462+
* \endif
463+
*
464+
* \param gpio The GPIO pin to output the clock to.
432465
* \param src The source clock. See the register field CLOCKS_CLK_GPOUT0_CTRL_AUXSRC for a full list. The list is the same for each GPOUT clock generator.
433466
* \param div The float amount to divide the source clock by. This is useful to not overwhelm the GPIO pin with a fast clock.
434467
*/

0 commit comments

Comments
 (0)