Skip to content

Commit f0a1ff3

Browse files
kilograhamlurch
andauthored
Fixes for/found by documentation generation (#2099)
* fix errors breaking extra_[cmake_]configs.py * remove trailing whitespace which is confusing asciidoctor * fix rp2xxx-specific -> rp2xxx_specific * add missing xip_cache funcs to the combined docs * Revert "fix errors breaking extra_[cmake_]configs.py" * Fix typo in #define name * Allow optional whitespace at the start of "commented out" config lines Co-authored-by: Andrew Scheller <[email protected]>
1 parent bb916f4 commit f0a1ff3

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

src/rp2_common/hardware_gpio/include/hardware/gpio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ extern "C" {
4242
*
4343
* RP-series microcontrollers have two banks of General Purpose Input / Output (GPIO) pins, which are assigned as follows:
4444
*
45-
* \if rp2040-specific
45+
* \if rp2040_specific
4646
* RP2040 has 30 user GPIO pins in bank 0, and 6 QSPI pins in the QSPI bank 1 (QSPI_SS, QSPI_SCLK and QSPI_SD0 to QSPI_SD3). The QSPI
4747
* pins are used to execute code from an external flash device, leaving the User bank (GPIO0 to GPIO29) for the programmer to use.
4848
* \endif
4949
*
50-
* \if rp2350-specific
50+
* \if rp2350_specific
5151
* The number of GPIO pins available depends on the package. There are 30 user GPIOs in bank 0 in the QFN-60 package (RP2350A), or 48 user GPIOs
5252
* in the QFN-80 package. Bank 1 contains the 6 QSPI pins and the USB DP/DM pins.
5353
* \endif

src/rp2_common/hardware_pio/include/hardware/pio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ int pio_set_gpio_base(PIO pio, uint gpio_base);
919919
* \param pio The PIO instance; e.g. \ref pio0 or \ref pio1
920920
* \param program the program definition
921921
* \return true if the program can be loaded;
922-
* false if not, e.g. if there is not suitable space in the instruction memory
922+
* false if not, e.g. if there is not suitable space in the instruction memory
923923
*/
924924
bool pio_can_add_program(PIO pio, const pio_program_t *program);
925925

src/rp2_common/hardware_xip_cache/include/hardware/xip_cache.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
* of flash), so pointers should have XIP_BASE subtracted before passing into one of these
2121
* functions.
2222
*
23-
* \if rp2040-specific
23+
* \if rp2040_specific
2424
* The only valid cache maintenance operation on RP2040 is "invalidate", which tells the cache to
2525
* forget everything it knows about some address. This is necessary after a programming operation,
2626
* because the cache does not automatically know about any serial programming operations performed
2727
* on the external flash device, and could return stale data.
2828
* \endif
2929
*
30-
* \if rp2350-specific
30+
* \if rp2350_specific
3131
* On RP2350, the three types of operation are:
3232
*
3333
* * Invalidate: tell the cache to forget everything it knows about some address. The next access to
@@ -124,7 +124,7 @@ void xip_cache_invalidate_all(void);
124124
*/
125125
void xip_cache_invalidate_range(uintptr_t start_offset, uintptr_t size_bytes);
126126

127-
#if !XIP_CACHE_IS_READ_ONLY
127+
#if !XIP_CACHE_IS_READ_ONLY || PICO_COMBINED_DOCS
128128

129129
/*! \brief Clean the cache for the entire XIP address space
130130
* \ingroup hardware_xip_cache
@@ -136,12 +136,12 @@ void xip_cache_invalidate_range(uintptr_t start_offset, uintptr_t size_bytes);
136136
* This function is faster than calling xip_cache_clean_range() for the entire address space,
137137
* because it iterates over cachelines instead of addresses.
138138
*
139-
* \if rp2040-specific
139+
* \if rp2040_specific
140140
* On RP2040 this is a no-op, as the XIP cache is read-only. This is indicated by the
141141
* XIP_CACHE_IS_READ_ONLY macro.
142142
* \endif
143143
*
144-
* \if rp2350-specific
144+
* \if rp2350_specific
145145
* On RP2350, due to the workaround applied for RP2350-E11, this function also effectively
146146
* invalidates all cache lines after cleaning them. The next access to each line will miss. Avoid
147147
* this by calling xip_cache_clean_range() which does not suffer this issue.
@@ -155,7 +155,7 @@ void xip_cache_clean_all(void);
155155
*
156156
* This causes the cache to write out pending write data at these offsets to the downstream memory.
157157
*
158-
* \if rp2040-specific
158+
* \if rp2040_specific
159159
* On RP2040 this is a no-op, as the XIP cache is read-only. This is indicated by the
160160
* XIP_CACHE_IS_READ_ONLY macro.
161161
* \endif
@@ -177,7 +177,7 @@ static inline void xip_cache_clean_range(uintptr_t start_offset, uintptr_t size_
177177
}
178178
#endif
179179

180-
#if !PICO_RP2040
180+
#if !PICO_RP2040 || PICO_COMBINED_DOCS
181181

182182
/*! \brief Pin a range of offsets within the XIP address space
183183
* \ingroup hardware_xip_cache

src/rp2_common/pico_bootrom/include/pico/bootrom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static inline void rom_flash_enter_cmd_xip(void) {
403403
func();
404404
}
405405

406-
#if !PICO_RP2040
406+
#if !PICO_RP2040 || PICO_COMBINED_DOCS
407407
#ifdef __riscv
408408
/*!
409409
* \brief Give the bootrom a new stack

src/rp2_common/pico_double/include/pico/double.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ double exp10(double x);
6565
void sincos(double x, double *sinx, double *cosx);
6666
double powint(double x, int y);
6767

68-
#if !PICO_RP2040
68+
#if !PICO_RP2040 || PICO_COMBINED_DOCS
6969
double ddiv_fast(double n, double d);
7070
double sqrt_fast(double d);
7171
double mla(double x, double y, double z); // note this is not fused

src/rp2_common/pico_stdio_usb/include/pico/stdio_usb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
// PICO_CONFIG: PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED, Optionally define a pin to use as bootloader activity LED when BOOTSEL mode is entered via USB (either VIA_BAUD_RATE or VIA_VENDOR_INTERFACE), type=int, min=0, max=47 on RP2350B, 29 otherwise, group=pico_stdio_usb
7575

7676
// PICO_CONFIG: PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED_ACTIVE_LOW, Whether pin to use as bootloader activity LED when BOOTSEL mode is entered via USB (either VIA_BAUD_RATE or VIA_VENDOR_INTERFACE) is active low, type=bool, default=0, group=pico_stdio_usb
77-
#ifndef PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOW
78-
#define PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED_ACTIVE_LOW 0
77+
#ifndef PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED_ACTIVE_LOW
78+
#define PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED_ACTIVE_LOW 0
7979
#endif
8080

8181
// PICO_CONFIG: PICO_STDIO_USB_RESET_BOOTSEL_FIXED_ACTIVITY_LED, Whether the pin specified by PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED is fixed or can be modified by picotool over the VENDOR USB interface, type=bool, default=0, group=pico_stdio_usb

tools/extract_build_defines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def ValidateAttrs(config_name, config_attrs, file_path, linenum):
139139
elif BASE_BUILD_DEFINE_RE.search(line):
140140
m = BUILD_DEFINE_RE.match(line)
141141
if not m:
142-
if line.startswith("## "):
142+
if re.match(r"^\s*#\s*# ", line):
143143
logger.info("Possible misformatted {} at {}:{} ({})".format(BASE_BUILD_DEFINE_NAME, file_path, linenum, line))
144144
else:
145145
raise Exception("Found misformatted {} at {}:{} ({})".format(BASE_BUILD_DEFINE_NAME, file_path, linenum, line))

tools/extract_cmake_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def ValidateAttrs(config_name, config_attrs, file_path, linenum):
139139
elif BASE_CMAKE_CONFIG_RE.search(line):
140140
m = CMAKE_CONFIG_RE.match(line)
141141
if not m:
142-
if line.startswith("## "):
142+
if re.match("^\s*#\s*# ", line):
143143
logger.info("Possible misformatted {} at {}:{} ({})".format(BASE_CMAKE_CONFIG_NAME, file_path, linenum, line))
144144
else:
145145
raise Exception("Found misformatted {} at {}:{} ({})".format(BASE_CMAKE_CONFIG_NAME, file_path, linenum, line))

tools/extract_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def ValidateAttrs(config_name, config_attrs, file_path, linenum):
158158
elif BASE_CONFIG_RE.search(line):
159159
m = CONFIG_RE.match(line)
160160
if not m:
161-
if line.startswith("//// "):
161+
if re.match(r"^\s*//\s*// ", line):
162162
logger.info("Possible misformatted {} at {}:{} ({})".format(BASE_CONFIG_NAME, file_path, linenum, line))
163163
else:
164164
raise Exception("Found misformatted {} at {}:{} ({})".format(BASE_CONFIG_NAME, file_path, linenum, line))

0 commit comments

Comments
 (0)