From 066c69f24b2b6b48ed6e6732b86820f839f78e63 Mon Sep 17 00:00:00 2001 From: Kevin Thomas Date: Mon, 6 Apr 2026 08:49:37 -0400 Subject: [PATCH] fix: remove duplicate docstrings from public functions in .c files Public function docstrings belong exclusively in .h headers per coding convention. Only static helper functions and static variables retain docstrings in .c files. Removed 413 duplicate docstrings across 185 files (15 CBM + 15 C SDK projects). All 30 projects rebuild with zero errors. --- drivers/0x01_uart/0x01_uart.c | 8 ---- drivers/0x01_uart/uart.c | 33 ----------------- drivers/0x01_uart_cbm/Src/image_def.c | 3 -- drivers/0x01_uart_cbm/Src/main.c | 4 -- drivers/0x01_uart_cbm/Src/rp2350_reset.c | 4 -- .../0x01_uart_cbm/Src/rp2350_reset_handler.c | 4 -- drivers/0x01_uart_cbm/Src/rp2350_stack.c | 4 -- drivers/0x01_uart_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x01_uart_cbm/Src/rp2350_xosc.c | 8 ---- drivers/0x01_uart_cbm/Src/vector_table.c | 3 -- drivers/0x02_blink/0x02_blink.c | 8 ---- drivers/0x02_blink/blink.c | 21 ----------- drivers/0x02_blink_cbm/Src/image_def.c | 3 -- drivers/0x02_blink_cbm/Src/main.c | 4 -- drivers/0x02_blink_cbm/Src/rp2350_delay.c | 5 --- drivers/0x02_blink_cbm/Src/rp2350_gpio.c | 25 ------------- drivers/0x02_blink_cbm/Src/rp2350_led.c | 25 ------------- drivers/0x02_blink_cbm/Src/rp2350_reset.c | 4 -- .../0x02_blink_cbm/Src/rp2350_reset_handler.c | 4 -- drivers/0x02_blink_cbm/Src/rp2350_stack.c | 4 -- drivers/0x02_blink_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x02_blink_cbm/Src/rp2350_xosc.c | 8 ---- drivers/0x02_blink_cbm/Src/vector_table.c | 3 -- drivers/0x03_button/0x03_button.c | 8 ---- drivers/0x03_button/button.c | 23 ------------ drivers/0x03_button_cbm/Src/image_def.c | 3 -- drivers/0x03_button_cbm/Src/main.c | 4 -- drivers/0x03_button_cbm/Src/rp2350_button.c | 11 ------ drivers/0x03_button_cbm/Src/rp2350_delay.c | 5 --- drivers/0x03_button_cbm/Src/rp2350_gpio.c | 30 --------------- drivers/0x03_button_cbm/Src/rp2350_led.c | 25 ------------- drivers/0x03_button_cbm/Src/rp2350_reset.c | 4 -- .../Src/rp2350_reset_handler.c | 4 -- drivers/0x03_button_cbm/Src/rp2350_stack.c | 4 -- drivers/0x03_button_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x03_button_cbm/Src/rp2350_xosc.c | 8 ---- drivers/0x03_button_cbm/Src/vector_table.c | 3 -- drivers/0x04_pwm/0x04_pwm.c | 9 ----- drivers/0x04_pwm/pwm.c | 11 ------ drivers/0x04_pwm_cbm/Src/image_def.c | 3 -- drivers/0x04_pwm_cbm/Src/main.c | 4 -- drivers/0x04_pwm_cbm/Src/rp2350_delay.c | 5 --- drivers/0x04_pwm_cbm/Src/rp2350_gpio.c | 25 ------------- drivers/0x04_pwm_cbm/Src/rp2350_led.c | 25 ------------- drivers/0x04_pwm_cbm/Src/rp2350_pwm.c | 13 ------- drivers/0x04_pwm_cbm/Src/rp2350_reset.c | 4 -- .../0x04_pwm_cbm/Src/rp2350_reset_handler.c | 8 ---- drivers/0x04_pwm_cbm/Src/rp2350_stack.c | 4 -- drivers/0x04_pwm_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x04_pwm_cbm/Src/rp2350_xosc.c | 8 ---- drivers/0x04_pwm_cbm/Src/vector_table.c | 3 -- drivers/0x05_servo/0x05_servo.c | 8 ---- drivers/0x05_servo/servo.c | 15 -------- drivers/0x05_servo_cbm/Src/image_def.c | 3 -- drivers/0x05_servo_cbm/Src/main.c | 4 -- drivers/0x05_servo_cbm/Src/rp2350_delay.c | 5 --- drivers/0x05_servo_cbm/Src/rp2350_gpio.c | 25 ------------- drivers/0x05_servo_cbm/Src/rp2350_led.c | 25 ------------- drivers/0x05_servo_cbm/Src/rp2350_reset.c | 4 -- .../0x05_servo_cbm/Src/rp2350_reset_handler.c | 8 ---- drivers/0x05_servo_cbm/Src/rp2350_servo.c | 18 --------- drivers/0x05_servo_cbm/Src/rp2350_stack.c | 4 -- drivers/0x05_servo_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x05_servo_cbm/Src/rp2350_xosc.c | 8 ---- drivers/0x05_servo_cbm/Src/vector_table.c | 3 -- drivers/0x06_adc/0x06_adc.c | 8 ---- drivers/0x06_adc/adc.c | 16 -------- drivers/0x06_adc_cbm/Src/image_def.c | 3 -- drivers/0x06_adc_cbm/Src/main.c | 4 -- drivers/0x06_adc_cbm/Src/rp2350_adc.c | 37 ------------------- drivers/0x06_adc_cbm/Src/rp2350_delay.c | 5 --- drivers/0x06_adc_cbm/Src/rp2350_reset.c | 4 -- .../0x06_adc_cbm/Src/rp2350_reset_handler.c | 4 -- drivers/0x06_adc_cbm/Src/rp2350_stack.c | 4 -- drivers/0x06_adc_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x06_adc_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x06_adc_cbm/Src/vector_table.c | 3 -- drivers/0x07_i2c/0x07_i2c.c | 9 ----- drivers/0x07_i2c/i2c.c | 20 ---------- drivers/0x07_i2c_cbm/Src/image_def.c | 3 -- drivers/0x07_i2c_cbm/Src/main.c | 4 -- drivers/0x07_i2c_cbm/Src/rp2350_delay.c | 5 --- drivers/0x07_i2c_cbm/Src/rp2350_i2c.c | 31 ---------------- drivers/0x07_i2c_cbm/Src/rp2350_reset.c | 4 -- .../0x07_i2c_cbm/Src/rp2350_reset_handler.c | 4 -- drivers/0x07_i2c_cbm/Src/rp2350_stack.c | 4 -- drivers/0x07_i2c_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x07_i2c_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x07_i2c_cbm/Src/vector_table.c | 3 -- drivers/0x08_lcd1602/0x08_lcd1602.c | 8 ---- drivers/0x08_lcd1602/lcd1602.c | 29 --------------- drivers/0x08_lcd1602_cbm/Src/image_def.c | 3 -- drivers/0x08_lcd1602_cbm/Src/main.c | 4 -- drivers/0x08_lcd1602_cbm/Src/rp2350_delay.c | 10 ----- drivers/0x08_lcd1602_cbm/Src/rp2350_i2c.c | 31 ---------------- drivers/0x08_lcd1602_cbm/Src/rp2350_lcd1602.c | 24 ------------ drivers/0x08_lcd1602_cbm/Src/rp2350_reset.c | 4 -- .../Src/rp2350_reset_handler.c | 4 -- drivers/0x08_lcd1602_cbm/Src/rp2350_stack.c | 4 -- drivers/0x08_lcd1602_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x08_lcd1602_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x08_lcd1602_cbm/Src/vector_table.c | 3 -- drivers/0x09_dht11/0x09_dht11.c | 8 ---- drivers/0x09_dht11/dht11.c | 17 --------- drivers/0x09_dht11_cbm/Src/image_def.c | 3 -- drivers/0x09_dht11_cbm/Src/main.c | 4 -- drivers/0x09_dht11_cbm/Src/rp2350_delay.c | 10 ----- drivers/0x09_dht11_cbm/Src/rp2350_dht11.c | 18 --------- drivers/0x09_dht11_cbm/Src/rp2350_reset.c | 4 -- .../0x09_dht11_cbm/Src/rp2350_reset_handler.c | 4 -- drivers/0x09_dht11_cbm/Src/rp2350_stack.c | 4 -- drivers/0x09_dht11_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x09_dht11_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x09_dht11_cbm/Src/vector_table.c | 3 -- drivers/0x0a_ir/0x0a_ir.c | 8 ---- drivers/0x0a_ir/ir.c | 16 -------- drivers/0x0a_ir_cbm/Src/image_def.c | 3 -- drivers/0x0a_ir_cbm/Src/main.c | 4 -- drivers/0x0a_ir_cbm/Src/rp2350_delay.c | 10 ----- drivers/0x0a_ir_cbm/Src/rp2350_ir.c | 16 -------- drivers/0x0a_ir_cbm/Src/rp2350_reset.c | 4 -- .../0x0a_ir_cbm/Src/rp2350_reset_handler.c | 4 -- drivers/0x0a_ir_cbm/Src/rp2350_stack.c | 4 -- drivers/0x0a_ir_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x0a_ir_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x0a_ir_cbm/Src/vector_table.c | 3 -- drivers/0x0b_spi/0x0b_spi.c | 8 ---- drivers/0x0b_spi/spi.c | 36 ------------------ drivers/0x0b_spi_cbm/Src/image_def.c | 3 -- drivers/0x0b_spi_cbm/Src/main.c | 4 -- drivers/0x0b_spi_cbm/Src/rp2350_delay.c | 10 ----- drivers/0x0b_spi_cbm/Src/rp2350_reset.c | 4 -- .../0x0b_spi_cbm/Src/rp2350_reset_handler.c | 4 -- drivers/0x0b_spi_cbm/Src/rp2350_spi.c | 32 ---------------- drivers/0x0b_spi_cbm/Src/rp2350_stack.c | 4 -- drivers/0x0b_spi_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x0b_spi_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x0b_spi_cbm/Src/vector_table.c | 3 -- drivers/0x0c_multicore/0x0c_multicore.c | 9 ----- drivers/0x0c_multicore/multicore.c | 25 ------------- drivers/0x0c_multicore_cbm/Src/image_def.c | 3 -- drivers/0x0c_multicore_cbm/Src/main.c | 4 -- drivers/0x0c_multicore_cbm/Src/rp2350_delay.c | 10 ----- .../0x0c_multicore_cbm/Src/rp2350_multicore.c | 27 -------------- drivers/0x0c_multicore_cbm/Src/rp2350_reset.c | 4 -- .../Src/rp2350_reset_handler.c | 4 -- drivers/0x0c_multicore_cbm/Src/rp2350_stack.c | 4 -- drivers/0x0c_multicore_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x0c_multicore_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x0c_multicore_cbm/Src/vector_table.c | 3 -- drivers/0x0d_timer/0x0d_timer.c | 8 ---- drivers/0x0d_timer/timer.c | 17 --------- drivers/0x0d_timer_cbm/Src/image_def.c | 3 -- drivers/0x0d_timer_cbm/Src/main.c | 4 -- drivers/0x0d_timer_cbm/Src/rp2350_delay.c | 10 ----- drivers/0x0d_timer_cbm/Src/rp2350_reset.c | 4 -- .../0x0d_timer_cbm/Src/rp2350_reset_handler.c | 8 ---- drivers/0x0d_timer_cbm/Src/rp2350_stack.c | 4 -- drivers/0x0d_timer_cbm/Src/rp2350_timer.c | 18 --------- drivers/0x0d_timer_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x0d_timer_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x0d_timer_cbm/Src/vector_table.c | 8 ---- drivers/0x0e_watchdog/0x0e_watchdog.c | 8 ---- drivers/0x0e_watchdog/watchdog.c | 23 ------------ drivers/0x0e_watchdog_cbm/Src/image_def.c | 3 -- drivers/0x0e_watchdog_cbm/Src/main.c | 4 -- drivers/0x0e_watchdog_cbm/Src/rp2350_delay.c | 10 ----- drivers/0x0e_watchdog_cbm/Src/rp2350_reset.c | 4 -- .../Src/rp2350_reset_handler.c | 4 -- drivers/0x0e_watchdog_cbm/Src/rp2350_stack.c | 4 -- drivers/0x0e_watchdog_cbm/Src/rp2350_uart.c | 31 ---------------- .../0x0e_watchdog_cbm/Src/rp2350_watchdog.c | 17 --------- drivers/0x0e_watchdog_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x0e_watchdog_cbm/Src/vector_table.c | 3 -- drivers/0x0f_flash/0x0f_flash.c | 8 ---- drivers/0x0f_flash/flash.c | 22 ----------- drivers/0x0f_flash_cbm/Src/image_def.c | 3 -- drivers/0x0f_flash_cbm/Src/main.c | 4 -- drivers/0x0f_flash_cbm/Src/rp2350_flash.c | 20 ---------- drivers/0x0f_flash_cbm/Src/rp2350_reset.c | 4 -- .../0x0f_flash_cbm/Src/rp2350_reset_handler.c | 8 ---- drivers/0x0f_flash_cbm/Src/rp2350_stack.c | 4 -- drivers/0x0f_flash_cbm/Src/rp2350_uart.c | 31 ---------------- drivers/0x0f_flash_cbm/Src/rp2350_xosc.c | 12 ------ drivers/0x0f_flash_cbm/Src/vector_table.c | 3 -- 185 files changed, 2041 deletions(-) diff --git a/drivers/0x01_uart/0x01_uart.c b/drivers/0x01_uart/0x01_uart.c index 83a120c..61ac5f5 100644 --- a/drivers/0x01_uart/0x01_uart.c +++ b/drivers/0x01_uart/0x01_uart.c @@ -49,14 +49,6 @@ /** @brief UART baud rate in bits per second */ #define UART_BAUD 115200 -/** - * @brief Application entry point for the UART uppercase echo demo - * - * Initializes UART0 and enters an infinite loop that reads incoming - * characters, converts them to uppercase, and echoes them back. - * - * @return int Does not return - */ int main(void) { uart_driver_init(UART_TX_PIN, UART_RX_PIN, UART_BAUD); uart_driver_puts("UART driver ready (115200 8N1)\r\n"); diff --git a/drivers/0x01_uart/uart.c b/drivers/0x01_uart/uart.c index 55f964d..4619fce 100644 --- a/drivers/0x01_uart/uart.c +++ b/drivers/0x01_uart/uart.c @@ -35,63 +35,30 @@ /** @brief Hardware UART instance used by this driver */ #define UART_INST uart0 -/** - * @brief Initialize hardware UART0 on the specified TX and RX GPIO pins - * - * @param tx_pin GPIO pin number to use as UART0 TX - * @param rx_pin GPIO pin number to use as UART0 RX - * @param baud_rate Desired baud rate in bits per second - */ void uart_driver_init(uint32_t tx_pin, uint32_t rx_pin, uint32_t baud_rate) { uart_init(UART_INST, baud_rate); gpio_set_function(tx_pin, GPIO_FUNC_UART); gpio_set_function(rx_pin, GPIO_FUNC_UART); } -/** - * @brief Check whether a received character is waiting in the UART FIFO - * - * @return bool true if at least one byte is available to read - */ bool uart_driver_is_readable(void) { return uart_is_readable(UART_INST); } -/** - * @brief Read one character from UART0 (blocking) - * - * @return char The received character - */ char uart_driver_getchar(void) { return (char)uart_getc(UART_INST); } -/** - * @brief Transmit one character over UART0 (blocking) - * - * @param c Character to transmit - */ void uart_driver_putchar(char c) { uart_putc_raw(UART_INST, c); } -/** - * @brief Transmit a null-terminated string over UART0 - * - * @param str Pointer to the string to transmit - */ void uart_driver_puts(const char *str) { while (*str) { uart_putc_raw(UART_INST, *str++); } } -/** - * @brief Convert a character to uppercase - * - * @param c Character to convert - * @return char Uppercase version if 'a'-'z', otherwise unchanged - */ char uart_driver_to_upper(char c) { if (c >= 'a' && c <= 'z') { return (char)(c - 32); diff --git a/drivers/0x01_uart_cbm/Src/image_def.c b/drivers/0x01_uart_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x01_uart_cbm/Src/image_def.c +++ b/drivers/0x01_uart_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x01_uart_cbm/Src/main.c b/drivers/0x01_uart_cbm/Src/main.c index bad7853..dff47bb 100644 --- a/drivers/0x01_uart_cbm/Src/main.c +++ b/drivers/0x01_uart_cbm/Src/main.c @@ -28,10 +28,6 @@ #include "rp2350_uart.h" -/** - * @brief Application entry point for the UART uppercase echo demo. - * @retval int does not return - */ int main(void) { uart_puts("UART driver ready (115200 8N1)\r\n"); diff --git a/drivers/0x01_uart_cbm/Src/rp2350_reset.c b/drivers/0x01_uart_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x01_uart_cbm/Src/rp2350_reset.c +++ b/drivers/0x01_uart_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x01_uart_cbm/Src/rp2350_reset_handler.c b/drivers/0x01_uart_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x01_uart_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x01_uart_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x01_uart_cbm/Src/rp2350_stack.c b/drivers/0x01_uart_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x01_uart_cbm/Src/rp2350_stack.c +++ b/drivers/0x01_uart_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x01_uart_cbm/Src/rp2350_uart.c b/drivers/0x01_uart_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x01_uart_cbm/Src/rp2350_uart.c +++ b/drivers/0x01_uart_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x01_uart_cbm/Src/rp2350_xosc.c b/drivers/0x01_uart_cbm/Src/rp2350_xosc.c index f78e589..2051745 100644 --- a/drivers/0x01_uart_cbm/Src/rp2350_xosc.c +++ b/drivers/0x01_uart_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; diff --git a/drivers/0x01_uart_cbm/Src/vector_table.c b/drivers/0x01_uart_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x01_uart_cbm/Src/vector_table.c +++ b/drivers/0x01_uart_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x02_blink/0x02_blink.c b/drivers/0x02_blink/0x02_blink.c index 45994df..d05dccc 100644 --- a/drivers/0x02_blink/0x02_blink.c +++ b/drivers/0x02_blink/0x02_blink.c @@ -45,14 +45,6 @@ /** @brief Delay between blink toggles in milliseconds */ #define BLINK_DELAY_MS 500 -/** - * @brief Application entry point for the LED blink demo - * - * Initializes the onboard LED and enters an infinite loop that - * toggles the LED state every BLINK_DELAY_MS milliseconds. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); blink_init(LED_PIN); diff --git a/drivers/0x02_blink/blink.c b/drivers/0x02_blink/blink.c index 082d7f8..d3f0af4 100644 --- a/drivers/0x02_blink/blink.c +++ b/drivers/0x02_blink/blink.c @@ -37,39 +37,18 @@ void blink_init(uint32_t pin) { gpio_put(pin, false); } -/** - * @brief Drive the output pin high (LED on) - * - * @param pin GPIO pin number - */ void blink_on(uint32_t pin) { gpio_put(pin, true); } -/** - * @brief Drive the output pin low (LED off) - * - * @param pin GPIO pin number - */ void blink_off(uint32_t pin) { gpio_put(pin, false); } -/** - * @brief Toggle the current state of the output pin - * - * @param pin GPIO pin number - */ void blink_toggle(uint32_t pin) { gpio_put(pin, !gpio_get(pin)); } -/** - * @brief Query the current drive state of the output pin - * - * @param pin GPIO pin number - * @return bool true if the pin is driven high, false if low - */ bool blink_get_state(uint32_t pin) { return (bool)gpio_get(pin); } diff --git a/drivers/0x02_blink_cbm/Src/image_def.c b/drivers/0x02_blink_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x02_blink_cbm/Src/image_def.c +++ b/drivers/0x02_blink_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x02_blink_cbm/Src/main.c b/drivers/0x02_blink_cbm/Src/main.c index 18e6d5e..5bc40b9 100644 --- a/drivers/0x02_blink_cbm/Src/main.c +++ b/drivers/0x02_blink_cbm/Src/main.c @@ -40,10 +40,6 @@ static void _print_led_state(uint32_t pin) uart_puts("LED: OFF\r\n"); } -/** - * @brief Application entry point for the LED blink demo. - * @retval int does not return - */ int main(void) { led_init(LED_PIN); diff --git a/drivers/0x02_blink_cbm/Src/rp2350_delay.c b/drivers/0x02_blink_cbm/Src/rp2350_delay.c index fb27ccf..8788630 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_delay.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) diff --git a/drivers/0x02_blink_cbm/Src/rp2350_gpio.c b/drivers/0x02_blink_cbm/Src/rp2350_gpio.c index 4c0ab10..b93c954 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_gpio.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_gpio.c @@ -62,11 +62,6 @@ static void _gpio_enable_output(uint32_t gpio_num) SIO[SIO_GPIO_OE_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Configure a GPIO pin as SIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_config(uint32_t gpio_num) { _gpio_config_pad(gpio_num); @@ -74,41 +69,21 @@ void gpio_config(uint32_t gpio_num) _gpio_enable_output(gpio_num); } -/** - * @brief Drive a GPIO output high. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_set(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Drive a GPIO output low. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_clear(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_CLR_OFFSET] = (1U << gpio_num); } -/** - * @brief Toggle a GPIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_toggle(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_XOR_OFFSET] = (1U << gpio_num); } -/** - * @brief Read the current input level of a GPIO pin. - * @param gpio_num GPIO pin number (0-29) - * @retval bool true if pin is high, false if low - */ bool gpio_get(uint32_t gpio_num) { return (SIO[SIO_GPIO_IN_OFFSET] & (1U << gpio_num)) != 0; diff --git a/drivers/0x02_blink_cbm/Src/rp2350_led.c b/drivers/0x02_blink_cbm/Src/rp2350_led.c index d1bda76..ebf2a76 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_led.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_led.c @@ -22,52 +22,27 @@ #include "rp2350_led.h" #include "rp2350_gpio.h" -/** - * @brief Initialize a GPIO pin as a push-pull digital output. - * @param pin GPIO pin number to configure - * @retval None - */ void led_init(uint32_t pin) { gpio_config(pin); gpio_clear(pin); } -/** - * @brief Drive the output pin high (LED on). - * @param pin GPIO pin number - * @retval None - */ void led_on(uint32_t pin) { gpio_set(pin); } -/** - * @brief Drive the output pin low (LED off). - * @param pin GPIO pin number - * @retval None - */ void led_off(uint32_t pin) { gpio_clear(pin); } -/** - * @brief Toggle the current state of the output pin. - * @param pin GPIO pin number - * @retval None - */ void led_toggle(uint32_t pin) { gpio_toggle(pin); } -/** - * @brief Query the current drive state of the output pin. - * @param pin GPIO pin number - * @retval bool true if the pin is driven high, false if low - */ bool led_get_state(uint32_t pin) { return gpio_get(pin); diff --git a/drivers/0x02_blink_cbm/Src/rp2350_reset.c b/drivers/0x02_blink_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_reset.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x02_blink_cbm/Src/rp2350_reset_handler.c b/drivers/0x02_blink_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x02_blink_cbm/Src/rp2350_stack.c b/drivers/0x02_blink_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_stack.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x02_blink_cbm/Src/rp2350_uart.c b/drivers/0x02_blink_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_uart.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x02_blink_cbm/Src/rp2350_xosc.c b/drivers/0x02_blink_cbm/Src/rp2350_xosc.c index f78e589..2051745 100644 --- a/drivers/0x02_blink_cbm/Src/rp2350_xosc.c +++ b/drivers/0x02_blink_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; diff --git a/drivers/0x02_blink_cbm/Src/vector_table.c b/drivers/0x02_blink_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x02_blink_cbm/Src/vector_table.c +++ b/drivers/0x02_blink_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x03_button/0x03_button.c b/drivers/0x03_button/0x03_button.c index 54dbab0..6261973 100644 --- a/drivers/0x03_button/0x03_button.c +++ b/drivers/0x03_button/0x03_button.c @@ -66,14 +66,6 @@ static void _poll_button(bool *last_state) { } } -/** - * @brief Application entry point for the button debounce demo - * - * Initializes button and LED, then continuously polls button state - * and mirrors it to the LED with UART reporting on edge transitions. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); button_init(BUTTON_PIN, DEBOUNCE_MS); diff --git a/drivers/0x03_button/button.c b/drivers/0x03_button/button.c index 6cfa08a..788adcd 100644 --- a/drivers/0x03_button/button.c +++ b/drivers/0x03_button/button.c @@ -49,12 +49,6 @@ static bool _debounce_confirm(uint32_t pin) { return !gpio_get(pin); } -/** - * @brief Initialize a GPIO pin as an active-low button input with pull-up - * - * @param pin GPIO pin number to configure as a button input - * @param debounce_ms Debounce settling time in milliseconds - */ void button_init(uint32_t pin, uint32_t debounce_ms) { debounce_delay_ms = debounce_ms; gpio_init(pin); @@ -62,12 +56,6 @@ void button_init(uint32_t pin, uint32_t debounce_ms) { gpio_pull_up(pin); } -/** - * @brief Read the debounced state of the button - * - * @param pin GPIO pin number previously initialized with button_init() - * @return bool true if the button is firmly pressed, false if released - */ bool button_is_pressed(uint32_t pin) { if (!gpio_get(pin)) { return _debounce_confirm(pin); @@ -75,23 +63,12 @@ bool button_is_pressed(uint32_t pin) { return false; } -/** - * @brief Initialize a GPIO pin as a push-pull digital output for an indicator LED - * - * @param pin GPIO pin number to configure as an LED output - */ void button_led_init(uint32_t pin) { gpio_init(pin); gpio_set_dir(pin, GPIO_OUT); gpio_put(pin, false); } -/** - * @brief Set the indicator LED state - * - * @param pin GPIO pin number - * @param on true to turn the LED on, false to turn it off - */ void button_led_set(uint32_t pin, bool on) { gpio_put(pin, on); } diff --git a/drivers/0x03_button_cbm/Src/image_def.c b/drivers/0x03_button_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x03_button_cbm/Src/image_def.c +++ b/drivers/0x03_button_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x03_button_cbm/Src/main.c b/drivers/0x03_button_cbm/Src/main.c index ffaa799..cbcc19e 100644 --- a/drivers/0x03_button_cbm/Src/main.c +++ b/drivers/0x03_button_cbm/Src/main.c @@ -77,10 +77,6 @@ static void _poll_button(bool *last_state) _report_edge(pressed, last_state); } -/** - * @brief Application entry point for the button debounce demo. - * @retval int does not return - */ int main(void) { button_init(BUTTON_PIN, DEBOUNCE_MS); diff --git a/drivers/0x03_button_cbm/Src/rp2350_button.c b/drivers/0x03_button_cbm/Src/rp2350_button.c index 4bce66e..cee8838 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_button.c +++ b/drivers/0x03_button_cbm/Src/rp2350_button.c @@ -38,23 +38,12 @@ static bool _debounce_confirm(uint32_t pin) return !gpio_get(pin); } -/** - * @brief Initialize a GPIO pin as an active-low button input with pull-up. - * @param pin GPIO pin number to configure as a button input - * @param debounce_ms debounce settling time in milliseconds - * @retval None - */ void button_init(uint32_t pin, uint32_t debounce_ms) { debounce_delay_ms = debounce_ms; gpio_config_input_pullup(pin); } -/** - * @brief Read the debounced state of the button. - * @param pin GPIO pin number previously initialized with button_init() - * @retval bool true if the button is firmly pressed, false if released - */ bool button_is_pressed(uint32_t pin) { if (!gpio_get(pin)) diff --git a/drivers/0x03_button_cbm/Src/rp2350_delay.c b/drivers/0x03_button_cbm/Src/rp2350_delay.c index fb27ccf..8788630 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_delay.c +++ b/drivers/0x03_button_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) diff --git a/drivers/0x03_button_cbm/Src/rp2350_gpio.c b/drivers/0x03_button_cbm/Src/rp2350_gpio.c index 00ab924..cc18e2e 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_gpio.c +++ b/drivers/0x03_button_cbm/Src/rp2350_gpio.c @@ -78,11 +78,6 @@ static void _gpio_enable_output(uint32_t gpio_num) SIO[SIO_GPIO_OE_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Configure a GPIO pin as SIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_config(uint32_t gpio_num) { _gpio_config_pad(gpio_num); @@ -90,51 +85,26 @@ void gpio_config(uint32_t gpio_num) _gpio_enable_output(gpio_num); } -/** - * @brief Drive a GPIO output high. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_set(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Drive a GPIO output low. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_clear(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_CLR_OFFSET] = (1U << gpio_num); } -/** - * @brief Toggle a GPIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_toggle(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_XOR_OFFSET] = (1U << gpio_num); } -/** - * @brief Read the current input level of a GPIO pin. - * @param gpio_num GPIO pin number (0-29) - * @retval bool true if pin is high, false if low - */ bool gpio_get(uint32_t gpio_num) { return (SIO[SIO_GPIO_IN_OFFSET] & (1U << gpio_num)) != 0; } -/** - * @brief Configure a GPIO pin as SIO input with internal pull-up. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_config_input_pullup(uint32_t gpio_num) { _gpio_config_pad_input_pullup(gpio_num); diff --git a/drivers/0x03_button_cbm/Src/rp2350_led.c b/drivers/0x03_button_cbm/Src/rp2350_led.c index d1bda76..ebf2a76 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_led.c +++ b/drivers/0x03_button_cbm/Src/rp2350_led.c @@ -22,52 +22,27 @@ #include "rp2350_led.h" #include "rp2350_gpio.h" -/** - * @brief Initialize a GPIO pin as a push-pull digital output. - * @param pin GPIO pin number to configure - * @retval None - */ void led_init(uint32_t pin) { gpio_config(pin); gpio_clear(pin); } -/** - * @brief Drive the output pin high (LED on). - * @param pin GPIO pin number - * @retval None - */ void led_on(uint32_t pin) { gpio_set(pin); } -/** - * @brief Drive the output pin low (LED off). - * @param pin GPIO pin number - * @retval None - */ void led_off(uint32_t pin) { gpio_clear(pin); } -/** - * @brief Toggle the current state of the output pin. - * @param pin GPIO pin number - * @retval None - */ void led_toggle(uint32_t pin) { gpio_toggle(pin); } -/** - * @brief Query the current drive state of the output pin. - * @param pin GPIO pin number - * @retval bool true if the pin is driven high, false if low - */ bool led_get_state(uint32_t pin) { return gpio_get(pin); diff --git a/drivers/0x03_button_cbm/Src/rp2350_reset.c b/drivers/0x03_button_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_reset.c +++ b/drivers/0x03_button_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x03_button_cbm/Src/rp2350_reset_handler.c b/drivers/0x03_button_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x03_button_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x03_button_cbm/Src/rp2350_stack.c b/drivers/0x03_button_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_stack.c +++ b/drivers/0x03_button_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x03_button_cbm/Src/rp2350_uart.c b/drivers/0x03_button_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_uart.c +++ b/drivers/0x03_button_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x03_button_cbm/Src/rp2350_xosc.c b/drivers/0x03_button_cbm/Src/rp2350_xosc.c index f78e589..2051745 100644 --- a/drivers/0x03_button_cbm/Src/rp2350_xosc.c +++ b/drivers/0x03_button_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; diff --git a/drivers/0x03_button_cbm/Src/vector_table.c b/drivers/0x03_button_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x03_button_cbm/Src/vector_table.c +++ b/drivers/0x03_button_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x04_pwm/0x04_pwm.c b/drivers/0x04_pwm/0x04_pwm.c index 02c549c..a982f9d 100644 --- a/drivers/0x04_pwm/0x04_pwm.c +++ b/drivers/0x04_pwm/0x04_pwm.c @@ -66,15 +66,6 @@ static void _sweep_duty(int start, int end, int step) { } } -/** - * @brief Application entry point for the PWM LED breathing demo - * - * Initializes PWM at 1 kHz on the onboard LED and enters an infinite - * loop that sweeps the duty cycle up and down to produce a smooth - * breathing effect, reporting each step over UART. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); pwm_driver_init(PWM_PIN, PWM_FREQ_HZ); diff --git a/drivers/0x04_pwm/pwm.c b/drivers/0x04_pwm/pwm.c index ae5958f..85d4218 100644 --- a/drivers/0x04_pwm/pwm.c +++ b/drivers/0x04_pwm/pwm.c @@ -71,12 +71,6 @@ static void _apply_pwm_config(uint32_t freq_hz) { pwm_set_chan_level(pwm_slice, pwm_chan, 0); } -/** - * @brief Initialize PWM output on the specified GPIO pin - * - * @param pin GPIO pin number to drive with PWM output - * @param freq_hz Desired PWM frequency in Hz - */ void pwm_driver_init(uint32_t pin, uint32_t freq_hz) { gpio_set_function(pin, GPIO_FUNC_PWM); pwm_slice = pwm_gpio_to_slice_num(pin); @@ -85,11 +79,6 @@ void pwm_driver_init(uint32_t pin, uint32_t freq_hz) { _apply_pwm_config(freq_hz); } -/** - * @brief Set the PWM duty cycle as an integer percentage - * - * @param percent Duty cycle from 0 (always low) to 100 (always high) - */ void pwm_driver_set_duty_percent(uint8_t percent) { if (percent > 100) { percent = 100; diff --git a/drivers/0x04_pwm_cbm/Src/image_def.c b/drivers/0x04_pwm_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x04_pwm_cbm/Src/image_def.c +++ b/drivers/0x04_pwm_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x04_pwm_cbm/Src/main.c b/drivers/0x04_pwm_cbm/Src/main.c index ad0ea19..7ef24a7 100644 --- a/drivers/0x04_pwm_cbm/Src/main.c +++ b/drivers/0x04_pwm_cbm/Src/main.c @@ -91,10 +91,6 @@ static void _sweep_down(void) } } -/** - * @brief Application entry point for the PWM LED breathing demo. - * @retval int does not return - */ int main(void) { uart_puts("PWM initialized: GPIO25\r\n"); diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_delay.c b/drivers/0x04_pwm_cbm/Src/rp2350_delay.c index fb27ccf..8788630 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_delay.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_gpio.c b/drivers/0x04_pwm_cbm/Src/rp2350_gpio.c index 4c0ab10..b93c954 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_gpio.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_gpio.c @@ -62,11 +62,6 @@ static void _gpio_enable_output(uint32_t gpio_num) SIO[SIO_GPIO_OE_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Configure a GPIO pin as SIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_config(uint32_t gpio_num) { _gpio_config_pad(gpio_num); @@ -74,41 +69,21 @@ void gpio_config(uint32_t gpio_num) _gpio_enable_output(gpio_num); } -/** - * @brief Drive a GPIO output high. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_set(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Drive a GPIO output low. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_clear(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_CLR_OFFSET] = (1U << gpio_num); } -/** - * @brief Toggle a GPIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_toggle(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_XOR_OFFSET] = (1U << gpio_num); } -/** - * @brief Read the current input level of a GPIO pin. - * @param gpio_num GPIO pin number (0-29) - * @retval bool true if pin is high, false if low - */ bool gpio_get(uint32_t gpio_num) { return (SIO[SIO_GPIO_IN_OFFSET] & (1U << gpio_num)) != 0; diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_led.c b/drivers/0x04_pwm_cbm/Src/rp2350_led.c index d1bda76..ebf2a76 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_led.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_led.c @@ -22,52 +22,27 @@ #include "rp2350_led.h" #include "rp2350_gpio.h" -/** - * @brief Initialize a GPIO pin as a push-pull digital output. - * @param pin GPIO pin number to configure - * @retval None - */ void led_init(uint32_t pin) { gpio_config(pin); gpio_clear(pin); } -/** - * @brief Drive the output pin high (LED on). - * @param pin GPIO pin number - * @retval None - */ void led_on(uint32_t pin) { gpio_set(pin); } -/** - * @brief Drive the output pin low (LED off). - * @param pin GPIO pin number - * @retval None - */ void led_off(uint32_t pin) { gpio_clear(pin); } -/** - * @brief Toggle the current state of the output pin. - * @param pin GPIO pin number - * @retval None - */ void led_toggle(uint32_t pin) { gpio_toggle(pin); } -/** - * @brief Query the current drive state of the output pin. - * @param pin GPIO pin number - * @retval bool true if the pin is driven high, false if low - */ bool led_get_state(uint32_t pin) { return gpio_get(pin); diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_pwm.c b/drivers/0x04_pwm_cbm/Src/rp2350_pwm.c index 7c8d4f3..171f4ec 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_pwm.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_pwm.c @@ -102,20 +102,12 @@ static void _pwm_enable(void) PWM[PWM_REG(PWM_CH_CSR_OFFSET)] = (1U << PWM_CSR_EN_SHIFT); } -/** - * @brief Release PWM from reset and wait until ready. - * @retval None - */ void pwm_release_reset(void) { _pwm_clear_reset_bit(); _pwm_wait_reset_done(); } -/** - * @brief Initialize PWM on GPIO 25 at approximately 1 kHz. - * @retval None - */ void pwm_init(void) { _pwm_configure_pin(); @@ -124,11 +116,6 @@ void pwm_init(void) _pwm_enable(); } -/** - * @brief Set the PWM duty cycle as an integer percentage. - * @param percent duty cycle from 0 (off) to 100 (fully on) - * @retval None - */ void pwm_set_duty(uint8_t percent) { uint32_t level; diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_reset.c b/drivers/0x04_pwm_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_reset.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_reset_handler.c b/drivers/0x04_pwm_cbm/Src/rp2350_reset_handler.c index 9bcda9f..32ef0df 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_reset_handler.c @@ -30,20 +30,12 @@ extern int main(void); -/** - * @brief Initialize late peripherals (PWM release and init). - * @retval None - */ void _late_init(void) { pwm_release_reset(); pwm_init(); } -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_stack.c b/drivers/0x04_pwm_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_stack.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_uart.c b/drivers/0x04_pwm_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_uart.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x04_pwm_cbm/Src/rp2350_xosc.c b/drivers/0x04_pwm_cbm/Src/rp2350_xosc.c index f78e589..2051745 100644 --- a/drivers/0x04_pwm_cbm/Src/rp2350_xosc.c +++ b/drivers/0x04_pwm_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; diff --git a/drivers/0x04_pwm_cbm/Src/vector_table.c b/drivers/0x04_pwm_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x04_pwm_cbm/Src/vector_table.c +++ b/drivers/0x04_pwm_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x05_servo/0x05_servo.c b/drivers/0x05_servo/0x05_servo.c index 3d3cd36..2999889 100644 --- a/drivers/0x05_servo/0x05_servo.c +++ b/drivers/0x05_servo/0x05_servo.c @@ -68,14 +68,6 @@ static void _sweep_angle(int start, int end, int step) { } } -/** - * @brief Application entry point for the servo sweep demo - * - * Initializes the servo on GPIO and continuously sweeps 0-180-0 degrees - * in STEP_DEGREES increments, reporting each angle over UART. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); servo_init(SERVO_GPIO); diff --git a/drivers/0x05_servo/servo.c b/drivers/0x05_servo/servo.c index 604df71..f036cf5 100644 --- a/drivers/0x05_servo/servo.c +++ b/drivers/0x05_servo/servo.c @@ -81,11 +81,6 @@ static void _apply_servo_config(void) { pwm_init(servo_slice, &config, true); } -/** - * @brief Initialize servo driver on a given GPIO pin - * - * @param pin GPIO pin number to use for servo PWM - */ void servo_init(uint8_t pin) { servo_pin = pin; gpio_set_function(servo_pin, GPIO_FUNC_PWM); @@ -95,11 +90,6 @@ void servo_init(uint8_t pin) { servo_initialized = true; } -/** - * @brief Set servo pulse width in microseconds - * - * @param pulse_us Pulse width in microseconds - */ void servo_set_pulse_us(uint16_t pulse_us) { if (!servo_initialized) return; if (pulse_us < SERVO_DEFAULT_MIN_US) pulse_us = SERVO_DEFAULT_MIN_US; @@ -108,11 +98,6 @@ void servo_set_pulse_us(uint16_t pulse_us) { pwm_set_chan_level(servo_slice, servo_chan, level); } -/** - * @brief Set servo angle in degrees (0 to 180) - * - * @param degrees Angle in degrees - */ void servo_set_angle(float degrees) { if (degrees < 0.0f) degrees = 0.0f; if (degrees > 180.0f) degrees = 180.0f; diff --git a/drivers/0x05_servo_cbm/Src/image_def.c b/drivers/0x05_servo_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x05_servo_cbm/Src/image_def.c +++ b/drivers/0x05_servo_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x05_servo_cbm/Src/main.c b/drivers/0x05_servo_cbm/Src/main.c index 265aa65..036fa59 100644 --- a/drivers/0x05_servo_cbm/Src/main.c +++ b/drivers/0x05_servo_cbm/Src/main.c @@ -92,10 +92,6 @@ static void _sweep_down(void) } } -/** - * @brief Application entry point for the servo sweep demo. - * @retval int does not return - */ int main(void) { uart_puts("Servo driver initialized on GPIO6\r\n"); diff --git a/drivers/0x05_servo_cbm/Src/rp2350_delay.c b/drivers/0x05_servo_cbm/Src/rp2350_delay.c index fb27ccf..8788630 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_delay.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) diff --git a/drivers/0x05_servo_cbm/Src/rp2350_gpio.c b/drivers/0x05_servo_cbm/Src/rp2350_gpio.c index 4c0ab10..b93c954 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_gpio.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_gpio.c @@ -62,11 +62,6 @@ static void _gpio_enable_output(uint32_t gpio_num) SIO[SIO_GPIO_OE_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Configure a GPIO pin as SIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_config(uint32_t gpio_num) { _gpio_config_pad(gpio_num); @@ -74,41 +69,21 @@ void gpio_config(uint32_t gpio_num) _gpio_enable_output(gpio_num); } -/** - * @brief Drive a GPIO output high. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_set(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_SET_OFFSET] = (1U << gpio_num); } -/** - * @brief Drive a GPIO output low. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_clear(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_CLR_OFFSET] = (1U << gpio_num); } -/** - * @brief Toggle a GPIO output. - * @param gpio_num GPIO pin number (0-29) - * @retval None - */ void gpio_toggle(uint32_t gpio_num) { SIO[SIO_GPIO_OUT_XOR_OFFSET] = (1U << gpio_num); } -/** - * @brief Read the current input level of a GPIO pin. - * @param gpio_num GPIO pin number (0-29) - * @retval bool true if pin is high, false if low - */ bool gpio_get(uint32_t gpio_num) { return (SIO[SIO_GPIO_IN_OFFSET] & (1U << gpio_num)) != 0; diff --git a/drivers/0x05_servo_cbm/Src/rp2350_led.c b/drivers/0x05_servo_cbm/Src/rp2350_led.c index d1bda76..ebf2a76 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_led.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_led.c @@ -22,52 +22,27 @@ #include "rp2350_led.h" #include "rp2350_gpio.h" -/** - * @brief Initialize a GPIO pin as a push-pull digital output. - * @param pin GPIO pin number to configure - * @retval None - */ void led_init(uint32_t pin) { gpio_config(pin); gpio_clear(pin); } -/** - * @brief Drive the output pin high (LED on). - * @param pin GPIO pin number - * @retval None - */ void led_on(uint32_t pin) { gpio_set(pin); } -/** - * @brief Drive the output pin low (LED off). - * @param pin GPIO pin number - * @retval None - */ void led_off(uint32_t pin) { gpio_clear(pin); } -/** - * @brief Toggle the current state of the output pin. - * @param pin GPIO pin number - * @retval None - */ void led_toggle(uint32_t pin) { gpio_toggle(pin); } -/** - * @brief Query the current drive state of the output pin. - * @param pin GPIO pin number - * @retval bool true if the pin is driven high, false if low - */ bool led_get_state(uint32_t pin) { return gpio_get(pin); diff --git a/drivers/0x05_servo_cbm/Src/rp2350_reset.c b/drivers/0x05_servo_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_reset.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x05_servo_cbm/Src/rp2350_reset_handler.c b/drivers/0x05_servo_cbm/Src/rp2350_reset_handler.c index 95ab7a7..95d3868 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_reset_handler.c @@ -30,20 +30,12 @@ extern int main(void); -/** - * @brief Initialize late peripherals (servo release and init). - * @retval None - */ void _late_init(void) { servo_release_reset(); servo_init(); } -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x05_servo_cbm/Src/rp2350_servo.c b/drivers/0x05_servo_cbm/Src/rp2350_servo.c index 3a84c05..efaf0a9 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_servo.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_servo.c @@ -132,20 +132,12 @@ static uint32_t _pulse_us_to_level(uint16_t pulse_us) return ((uint32_t)pulse_us * (SERVO_WRAP + 1)) / 20000U; } -/** - * @brief Release PWM from reset and wait until ready. - * @retval None - */ void servo_release_reset(void) { _servo_clear_reset_bit(); _servo_wait_reset_done(); } -/** - * @brief Initialize servo PWM on GPIO 6 at 50 Hz. - * @retval None - */ void servo_init(void) { _servo_configure_pin(); @@ -154,11 +146,6 @@ void servo_init(void) _servo_enable(); } -/** - * @brief Set the servo pulse width in microseconds (clamped 1000-2000). - * @param pulse_us pulse width in microseconds - * @retval None - */ void servo_set_pulse_us(uint16_t pulse_us) { uint32_t level; @@ -170,11 +157,6 @@ void servo_set_pulse_us(uint16_t pulse_us) PWM[SERVO_REG(PWM_CH_CC_OFFSET)] = level; } -/** - * @brief Set the servo angle in degrees (clamped 0-180). - * @param degrees angle from 0 to 180 - * @retval None - */ void servo_set_angle(uint8_t degrees) { uint16_t pulse; diff --git a/drivers/0x05_servo_cbm/Src/rp2350_stack.c b/drivers/0x05_servo_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_stack.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x05_servo_cbm/Src/rp2350_uart.c b/drivers/0x05_servo_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_uart.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x05_servo_cbm/Src/rp2350_xosc.c b/drivers/0x05_servo_cbm/Src/rp2350_xosc.c index f78e589..2051745 100644 --- a/drivers/0x05_servo_cbm/Src/rp2350_xosc.c +++ b/drivers/0x05_servo_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; diff --git a/drivers/0x05_servo_cbm/Src/vector_table.c b/drivers/0x05_servo_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x05_servo_cbm/Src/vector_table.c +++ b/drivers/0x05_servo_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x06_adc/0x06_adc.c b/drivers/0x06_adc/0x06_adc.c index a522bc1..406a757 100644 --- a/drivers/0x06_adc/0x06_adc.c +++ b/drivers/0x06_adc/0x06_adc.c @@ -59,14 +59,6 @@ static void _print_adc_readings(void) { printf("ADC0: %4lu mV | Chip temp: %.1f C\r\n", voltage_mv, temp_c); } -/** - * @brief Application entry point for the ADC voltage and temperature demo - * - * Initializes the ADC on GPIO26 channel 0 and prints readings - * every 500 ms over UART. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); adc_driver_init(ADC_GPIO, ADC_CHANNEL); diff --git a/drivers/0x06_adc/adc.c b/drivers/0x06_adc/adc.c index 698ed30..b06e522 100644 --- a/drivers/0x06_adc/adc.c +++ b/drivers/0x06_adc/adc.c @@ -65,12 +65,6 @@ static float _raw_to_celsius(uint16_t raw) { return 27.0f - (voltage - 0.706f) / 0.001721f; } -/** - * @brief Initialize the ADC peripheral and configure an analog GPIO pin - * - * @param gpio GPIO pin number for the analog input - * @param channel ADC channel number corresponding to the GPIO - */ void adc_driver_init(uint32_t gpio, uint8_t channel) { active_channel = channel; adc_init(); @@ -79,20 +73,10 @@ void adc_driver_init(uint32_t gpio, uint8_t channel) { adc_select_input(channel); } -/** - * @brief Perform a single ADC conversion and return millivolts - * - * @return uint32_t Measured voltage in millivolts (0 to 3300) - */ uint32_t adc_driver_read_mv(void) { return _raw_to_mv(adc_read()); } -/** - * @brief Read the on-chip temperature sensor in degrees Celsius - * - * @return float Die temperature in degrees Celsius - */ float adc_driver_read_temp_celsius(void) { adc_select_input(4); float result = _raw_to_celsius(adc_read()); diff --git a/drivers/0x06_adc_cbm/Src/image_def.c b/drivers/0x06_adc_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x06_adc_cbm/Src/image_def.c +++ b/drivers/0x06_adc_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x06_adc_cbm/Src/main.c b/drivers/0x06_adc_cbm/Src/main.c index b0c0b63..6d8c85d 100644 --- a/drivers/0x06_adc_cbm/Src/main.c +++ b/drivers/0x06_adc_cbm/Src/main.c @@ -95,10 +95,6 @@ static void _print_readings(void) uart_puts(" C\r\n"); } -/** - * @brief Application entry point for the ADC voltage and temperature demo. - * @retval int does not return - */ int main(void) { xosc_enable_adc_clk(); diff --git a/drivers/0x06_adc_cbm/Src/rp2350_adc.c b/drivers/0x06_adc_cbm/Src/rp2350_adc.c index 8a51edf..1e538dc 100644 --- a/drivers/0x06_adc_cbm/Src/rp2350_adc.c +++ b/drivers/0x06_adc_cbm/Src/rp2350_adc.c @@ -121,14 +121,6 @@ static int32_t _raw_to_temp_tenths(uint16_t raw) return 270 - (v_mv10 - 7060) * 1000 / 1721; } -/** - * @brief Release the ADC subsystem from reset. - * - * Clears the ADC bit in the RESETS register and waits until - * RESET_DONE confirms the subsystem is running. - * - * @retval None - */ void adc_release_reset(void) { RESETS->RESET |= (1U << RESETS_RESET_ADC_SHIFT); @@ -152,16 +144,6 @@ static void _adc_enable(void) ADC->CS |= (1U << ADC_CS_TS_EN_SHIFT); } -/** - * @brief Initialise the ADC peripheral for GPIO26 (channel 0). - * - * Configures GPIO26 pad for analog input (disables digital I/O, - * pulls, and pad isolation), sets the IO mux function to NULL, - * powers on the ADC, enables the temperature sensor, and selects - * channel 0 as the default input. - * - * @retval None - */ void adc_init(void) { _adc_config_pad(); @@ -171,30 +153,11 @@ void adc_init(void) _adc_select_input(active_channel); } -/** - * @brief Perform a single ADC conversion and return millivolts. - * - * Triggers a one-shot conversion on the currently selected channel, - * waits for the result, and scales the 12-bit value against the - * 3.3 V reference. - * - * @retval uint32_t measured voltage in millivolts (0-3300) - */ uint32_t adc_read_mv(void) { return _raw_to_mv(_adc_read_raw()); } -/** - * @brief Read the on-chip temperature sensor in tenths of degrees Celsius. - * - * Temporarily switches to ADC channel 4 (temperature sensor), - * performs a conversion, applies the RP2350 datasheet formula - * T = 27 - (V - 0.706) / 0.001721 using integer arithmetic, - * and restores the previously active channel. - * - * @retval int32_t die temperature in tenths of degrees (e.g. 270 = 27.0 C) - */ int32_t adc_read_temp_tenths(void) { _adc_select_input(ADC_TEMP_CHANNEL); diff --git a/drivers/0x06_adc_cbm/Src/rp2350_delay.c b/drivers/0x06_adc_cbm/Src/rp2350_delay.c index fb27ccf..8788630 100644 --- a/drivers/0x06_adc_cbm/Src/rp2350_delay.c +++ b/drivers/0x06_adc_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) diff --git a/drivers/0x06_adc_cbm/Src/rp2350_reset.c b/drivers/0x06_adc_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x06_adc_cbm/Src/rp2350_reset.c +++ b/drivers/0x06_adc_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x06_adc_cbm/Src/rp2350_reset_handler.c b/drivers/0x06_adc_cbm/Src/rp2350_reset_handler.c index 84e5cbc..eac8526 100644 --- a/drivers/0x06_adc_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x06_adc_cbm/Src/rp2350_reset_handler.c @@ -30,10 +30,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x06_adc_cbm/Src/rp2350_stack.c b/drivers/0x06_adc_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x06_adc_cbm/Src/rp2350_stack.c +++ b/drivers/0x06_adc_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x06_adc_cbm/Src/rp2350_uart.c b/drivers/0x06_adc_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x06_adc_cbm/Src/rp2350_uart.c +++ b/drivers/0x06_adc_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x06_adc_cbm/Src/rp2350_xosc.c b/drivers/0x06_adc_cbm/Src/rp2350_xosc.c index 028dfb4..92eba2f 100644 --- a/drivers/0x06_adc_cbm/Src/rp2350_xosc.c +++ b/drivers/0x06_adc_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Enable the XOSC ADC clock via CLK_ADC_CTRL. - * @retval None - */ void xosc_enable_adc_clk(void) { uint32_t value; diff --git a/drivers/0x06_adc_cbm/Src/vector_table.c b/drivers/0x06_adc_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x06_adc_cbm/Src/vector_table.c +++ b/drivers/0x06_adc_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x07_i2c/0x07_i2c.c b/drivers/0x07_i2c/0x07_i2c.c index 1624430..2f7c527 100644 --- a/drivers/0x07_i2c/0x07_i2c.c +++ b/drivers/0x07_i2c/0x07_i2c.c @@ -53,15 +53,6 @@ /** @brief I2C bus clock rate in Hz */ #define I2C_BAUD 100000 -/** - * @brief Application entry point for the I2C bus scanner demo - * - * Initializes I2C1 at 100 kHz on SDA=GPIO2 / SCL=GPIO3 and prints - * a formatted hex table of all responding device addresses over UART, - * repeating every 5 seconds. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); i2c_driver_init(I2C_PORT, I2C_SDA_PIN, I2C_SCL_PIN, I2C_BAUD); diff --git a/drivers/0x07_i2c/i2c.c b/drivers/0x07_i2c/i2c.c index 1b74638..0c83904 100644 --- a/drivers/0x07_i2c/i2c.c +++ b/drivers/0x07_i2c/i2c.c @@ -43,14 +43,6 @@ static i2c_inst_t *_get_i2c_inst(uint8_t port) { return port == 0 ? i2c0 : i2c1; } -/** - * @brief Initialize an I2C peripheral at the requested baud rate - * - * @param port I2C port number (0 for i2c0, 1 for i2c1) - * @param sda_pin GPIO pin number for SDA - * @param scl_pin GPIO pin number for SCL - * @param baud_hz Bus clock frequency in Hz - */ void i2c_driver_init(uint8_t port, uint32_t sda_pin, uint32_t scl_pin, uint32_t baud_hz) { i2c_inst_t *inst = _get_i2c_inst(port); @@ -61,13 +53,6 @@ void i2c_driver_init(uint8_t port, uint32_t sda_pin, uint32_t scl_pin, gpio_pull_up(scl_pin); } -/** - * @brief Probe a 7-bit I2C address and return whether a device responds - * - * @param port I2C port number (0 for i2c0, 1 for i2c1) - * @param addr 7-bit I2C address to probe - * @return bool true if a device acknowledged, false otherwise - */ bool i2c_driver_probe(uint8_t port, uint8_t addr) { i2c_inst_t *inst = _get_i2c_inst(port); uint8_t dummy; @@ -100,11 +85,6 @@ static void _print_scan_entry(uint8_t port, uint8_t addr) { if (addr % 16 == 15) printf("\r\n"); } -/** - * @brief Scan all valid 7-bit addresses and print a formatted table - * - * @param port I2C port number (0 for i2c0, 1 for i2c1) - */ void i2c_driver_scan(uint8_t port) { _print_scan_header(); for (uint8_t addr = 0; addr < 128; addr++) diff --git a/drivers/0x07_i2c_cbm/Src/image_def.c b/drivers/0x07_i2c_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x07_i2c_cbm/Src/image_def.c +++ b/drivers/0x07_i2c_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x07_i2c_cbm/Src/main.c b/drivers/0x07_i2c_cbm/Src/main.c index 81a5f90..82ffc0d 100644 --- a/drivers/0x07_i2c_cbm/Src/main.c +++ b/drivers/0x07_i2c_cbm/Src/main.c @@ -37,10 +37,6 @@ #define SCAN_DELAY_MS 5000 -/** - * @brief Application entry point for the I2C bus scanner demo. - * @retval int does not return - */ int main(void) { xosc_set_clk_ref(); diff --git a/drivers/0x07_i2c_cbm/Src/rp2350_delay.c b/drivers/0x07_i2c_cbm/Src/rp2350_delay.c index fb27ccf..8788630 100644 --- a/drivers/0x07_i2c_cbm/Src/rp2350_delay.c +++ b/drivers/0x07_i2c_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) diff --git a/drivers/0x07_i2c_cbm/Src/rp2350_i2c.c b/drivers/0x07_i2c_cbm/Src/rp2350_i2c.c index 1874dbb..e6d2dc4 100644 --- a/drivers/0x07_i2c_cbm/Src/rp2350_i2c.c +++ b/drivers/0x07_i2c_cbm/Src/rp2350_i2c.c @@ -131,10 +131,6 @@ static void _print_scan_entry(uint8_t addr) uart_puts("\r\n"); } -/** - * @brief Release I2C1 from reset and wait for completion. - * @retval None - */ void i2c_release_reset(void) { RESETS->RESET |= (1U << RESETS_RESET_I2C1_SHIFT); @@ -143,15 +139,6 @@ void i2c_release_reset(void) } } -/** - * @brief Initialize I2C1 as a 100 kHz master on SDA=GPIO2 / SCL=GPIO3. - * - * Configures GPIO pads with pull-ups, sets FUNCSEL to I2C, - * programs SCL timing for 100 kHz at 12 MHz clk_sys, and - * enables the controller in master mode with 7-bit addressing. - * - * @retval None - */ void i2c_init(void) { _i2c_config_pads(); @@ -217,15 +204,6 @@ static void _probe_cleanup(bool aborted) (void)I2C1->DATA_CMD; } -/** - * @brief Probe a 7-bit I2C address and return whether a device responds. - * - * Sends a 1-byte read to the target address. Returns true if - * the device acknowledges, false otherwise. - * - * @param addr 7-bit I2C address (0x08-0x77) - * @retval bool true if a device acknowledged, false otherwise - */ bool i2c_probe(uint8_t addr) { _probe_set_target(addr); @@ -235,15 +213,6 @@ bool i2c_probe(uint8_t addr) return !aborted; } -/** - * @brief Scan all valid 7-bit addresses and print a formatted table. - * - * Iterates addresses 0x00 through 0x7F, probes each valid one - * via i2c_probe(), and prints a 16-column hex grid showing - * discovered device addresses over UART. - * - * @retval None - */ void i2c_scan(void) { uart_puts("\r\nI2C bus scan:\r\n"); diff --git a/drivers/0x07_i2c_cbm/Src/rp2350_reset.c b/drivers/0x07_i2c_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x07_i2c_cbm/Src/rp2350_reset.c +++ b/drivers/0x07_i2c_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x07_i2c_cbm/Src/rp2350_reset_handler.c b/drivers/0x07_i2c_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x07_i2c_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x07_i2c_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x07_i2c_cbm/Src/rp2350_stack.c b/drivers/0x07_i2c_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x07_i2c_cbm/Src/rp2350_stack.c +++ b/drivers/0x07_i2c_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x07_i2c_cbm/Src/rp2350_uart.c b/drivers/0x07_i2c_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x07_i2c_cbm/Src/rp2350_uart.c +++ b/drivers/0x07_i2c_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x07_i2c_cbm/Src/rp2350_xosc.c b/drivers/0x07_i2c_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x07_i2c_cbm/Src/rp2350_xosc.c +++ b/drivers/0x07_i2c_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x07_i2c_cbm/Src/vector_table.c b/drivers/0x07_i2c_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x07_i2c_cbm/Src/vector_table.c +++ b/drivers/0x07_i2c_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x08_lcd1602/0x08_lcd1602.c b/drivers/0x08_lcd1602/0x08_lcd1602.c index 4f65e27..bb6c4b2 100644 --- a/drivers/0x08_lcd1602/0x08_lcd1602.c +++ b/drivers/0x08_lcd1602/0x08_lcd1602.c @@ -80,14 +80,6 @@ static void _update_counter(uint32_t *count) { sleep_ms(1000); } -/** - * @brief Application entry point for the LCD 1602 counter demo - * - * Initializes the LCD over I2C with a static title on line 0 and - * continuously increments a counter on line 1 every second. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); _setup_display(); diff --git a/drivers/0x08_lcd1602/lcd1602.c b/drivers/0x08_lcd1602/lcd1602.c index 113aa58..94c6a59 100644 --- a/drivers/0x08_lcd1602/lcd1602.c +++ b/drivers/0x08_lcd1602/lcd1602.c @@ -150,18 +150,6 @@ static void _lcd_hd44780_configure(void) { _lcd_send(0x06, 0); } -/** - * @brief Initialize the LCD driver over I2C - * - * Configures the internal driver state and performs the HD44780 initialization - * sequence. The driver does not configure I2C pins or call i2c_init; that - * must be done by the caller prior to calling this function. - * - * @param i2c_port I2C port number (0 for i2c0, 1 for i2c1) - * @param pcf_addr PCF8574 I2C address (commonly 0x27 or 0x3F) - * @param nibble_shift Bit shift applied to 4-bit nibbles (commonly 4 or 0) - * @param backlight_mask PCF8574 bit mask that controls the backlight - */ void lcd_i2c_init(uint8_t i2c_port, uint8_t pcf_addr, int nibble_shift, uint8_t backlight_mask) { _lcd_store_config(i2c_port, pcf_addr, nibble_shift, backlight_mask); @@ -197,34 +185,17 @@ void lcd_init(uint8_t i2c_port, uint32_t sda_pin, uint32_t scl_pin, lcd_i2c_init(i2c_port, pcf_addr, nibble_shift, backlight_mask); } -/** - * @brief Clear the LCD display - * - * Clears the display and returns the cursor to the home position. This - * call blocks for the duration required by the HD44780 controller. - */ void lcd_clear(void) { _lcd_send(0x01, 0); sleep_ms(2); } -/** - * @brief Set the cursor position - * - * @param line Line number (0 or 1) - * @param position Column (0..15) - */ void lcd_set_cursor(int line, int position) { const uint8_t row_offsets[] = {0x00, 0x40}; if (line > 1) line = 1; _lcd_send(0x80 | (position + row_offsets[line]), 0); } -/** - * @brief Write a null-terminated string to the display - * - * @param s The string to write (ASCII) - */ void lcd_puts(const char *s) { while (*s) _lcd_send((uint8_t)*s++, 1); diff --git a/drivers/0x08_lcd1602_cbm/Src/image_def.c b/drivers/0x08_lcd1602_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x08_lcd1602_cbm/Src/image_def.c +++ b/drivers/0x08_lcd1602_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x08_lcd1602_cbm/Src/main.c b/drivers/0x08_lcd1602_cbm/Src/main.c index a45c9e2..0f66392 100644 --- a/drivers/0x08_lcd1602_cbm/Src/main.c +++ b/drivers/0x08_lcd1602_cbm/Src/main.c @@ -139,10 +139,6 @@ static void _display_count(uint32_t count) uart_puts("\r\n"); } -/** - * @brief Application entry point for the LCD 1602 counter demo. - * @retval int does not return - */ int main(void) { uint32_t count = 0; diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_delay.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_delay.c index cc40ac6..f2fe8de 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_delay.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) @@ -43,11 +38,6 @@ void delay_ms(uint32_t ms) ); } -/** - * @brief Delay for the specified number of microseconds. - * @param us number of microseconds to delay - * @retval None - */ void delay_us(uint32_t us) { if (us == 0) diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_i2c.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_i2c.c index e0a347c..a663367 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_i2c.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_i2c.c @@ -123,10 +123,6 @@ static void _i2c_wait_done(void) } } -/** - * @brief Release I2C1 from reset and wait for completion. - * @retval None - */ void i2c_release_reset(void) { RESETS->RESET |= (1U << RESETS_RESET_I2C1_SHIFT); @@ -135,15 +131,6 @@ void i2c_release_reset(void) } } -/** - * @brief Initialize I2C1 as a 100 kHz master on SDA=GPIO2 / SCL=GPIO3. - * - * Configures GPIO pads with pull-ups, sets FUNCSEL to I2C, - * programs SCL timing for 100 kHz at 12 MHz clk_sys, and - * enables the controller in master mode with 7-bit addressing. - * - * @retval None - */ void i2c_init(void) { _i2c_config_pads(); @@ -156,15 +143,6 @@ void i2c_init(void) I2C1->ENABLE = 1U; } -/** - * @brief Set the I2C1 target slave address. - * - * Disables the controller, writes the 7-bit address into the - * TAR register, and re-enables the controller. - * - * @param addr 7-bit I2C address - * @retval None - */ void i2c_set_target(uint8_t addr) { I2C1->ENABLE = 0U; @@ -172,15 +150,6 @@ void i2c_set_target(uint8_t addr) I2C1->ENABLE = 1U; } -/** - * @brief Write one byte to the current target address with a STOP. - * - * Sends a single data byte over I2C1 with the STOP condition. - * Blocks until the transfer completes or an abort is detected. - * - * @param data byte to transmit - * @retval None - */ void i2c_write_byte(uint8_t data) { (void)I2C1->CLR_TX_ABRT; diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_lcd1602.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_lcd1602.c index 02d5911..d473779 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_lcd1602.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_lcd1602.c @@ -107,15 +107,6 @@ static void _lcd_hd44780_configure(void) _lcd_send(LCD_CMD_ENTRY_MODE, 0); } -/** - * @brief Initialize the LCD in 4-bit mode via the PCF8574 backpack. - * - * Sets the I2C target address to LCD_I2C_ADDR, performs the - * HD44780 power-on reset sequence, and configures the display - * for 4-bit, 2-line, 5x8 font with backlight on. - * - * @retval None - */ void lcd_init(void) { i2c_set_target(LCD_I2C_ADDR); @@ -123,33 +114,18 @@ void lcd_init(void) _lcd_hd44780_configure(); } -/** - * @brief Clear the LCD display and return cursor to home. - * @retval None - */ void lcd_clear(void) { _lcd_send(LCD_CMD_CLEAR, 0); delay_ms(2); } -/** - * @brief Set the cursor position on the display. - * @param line line number (0 or 1) - * @param position column number (0-15) - * @retval None - */ void lcd_set_cursor(uint8_t line, uint8_t position) { uint8_t offset = (line == 0U) ? LCD_ROW0_OFFSET : LCD_ROW1_OFFSET; _lcd_send(LCD_CMD_SET_DDRAM | (position + offset), 0); } -/** - * @brief Write a null-terminated string to the display. - * @param str pointer to the string to write (ASCII) - * @retval None - */ void lcd_puts(const char *str) { while (*str) diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_reset.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_reset.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_reset_handler.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_stack.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_stack.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_uart.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_uart.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x08_lcd1602_cbm/Src/rp2350_xosc.c b/drivers/0x08_lcd1602_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x08_lcd1602_cbm/Src/rp2350_xosc.c +++ b/drivers/0x08_lcd1602_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x08_lcd1602_cbm/Src/vector_table.c b/drivers/0x08_lcd1602_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x08_lcd1602_cbm/Src/vector_table.c +++ b/drivers/0x08_lcd1602_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x09_dht11/0x09_dht11.c b/drivers/0x09_dht11/0x09_dht11.c index cca2196..2c6e4c6 100644 --- a/drivers/0x09_dht11/0x09_dht11.c +++ b/drivers/0x09_dht11/0x09_dht11.c @@ -63,14 +63,6 @@ static void _print_reading(void) { sleep_ms(2000); } -/** - * @brief Application entry point for the DHT11 sensor demo - * - * Initializes the DHT11 on GPIO4 and continuously reads temperature - * and humidity, printing results over UART every 2 seconds. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); dht11_init(DHT11_GPIO); diff --git a/drivers/0x09_dht11/dht11.c b/drivers/0x09_dht11/dht11.c index 72f10be..820069f 100644 --- a/drivers/0x09_dht11/dht11.c +++ b/drivers/0x09_dht11/dht11.c @@ -122,29 +122,12 @@ static bool _validate_checksum(const uint8_t *data) { return data[4] == ((data[0] + data[1] + data[2] + data[3]) & 0xFF); } -/** - * @brief Initialize the DHT11 driver - * - * Configures the GPIO pin for the DHT11 sensor. This must be called before - * using dht11_read(). - * - * @param pin GPIO pin number connected to DHT11 signal - */ void dht11_init(uint8_t pin) { dht_pin = pin; gpio_init(pin); gpio_pull_up(pin); } -/** - * @brief Read temperature and humidity from DHT11 sensor - * - * Performs the DHT11 communication protocol to read sensor data. - * - * @param humidity Pointer to store humidity value (0-100%) - * @param temperature Pointer to store temperature value in Celsius - * @return true if read successful, false on error or timeout - */ bool dht11_read(float *humidity, float *temperature) { uint8_t data[5] = {0}; _send_start_signal(); diff --git a/drivers/0x09_dht11_cbm/Src/image_def.c b/drivers/0x09_dht11_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x09_dht11_cbm/Src/image_def.c +++ b/drivers/0x09_dht11_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x09_dht11_cbm/Src/main.c b/drivers/0x09_dht11_cbm/Src/main.c index 2aece4f..5096d69 100644 --- a/drivers/0x09_dht11_cbm/Src/main.c +++ b/drivers/0x09_dht11_cbm/Src/main.c @@ -110,10 +110,6 @@ static void _poll_sensor(void) delay_ms(DHT11_POLL_MS); } -/** - * @brief Application entry point for the DHT11 sensor demo. - * @retval int does not return - */ int main(void) { _dht11_setup(); diff --git a/drivers/0x09_dht11_cbm/Src/rp2350_delay.c b/drivers/0x09_dht11_cbm/Src/rp2350_delay.c index cc40ac6..f2fe8de 100644 --- a/drivers/0x09_dht11_cbm/Src/rp2350_delay.c +++ b/drivers/0x09_dht11_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) @@ -43,11 +38,6 @@ void delay_ms(uint32_t ms) ); } -/** - * @brief Delay for the specified number of microseconds. - * @param us number of microseconds to delay - * @retval None - */ void delay_us(uint32_t us) { if (us == 0) diff --git a/drivers/0x09_dht11_cbm/Src/rp2350_dht11.c b/drivers/0x09_dht11_cbm/Src/rp2350_dht11.c index 5ffc207..547e694 100644 --- a/drivers/0x09_dht11_cbm/Src/rp2350_dht11.c +++ b/drivers/0x09_dht11_cbm/Src/rp2350_dht11.c @@ -232,30 +232,18 @@ static void _configure_funcsel(void) IO_BANK0->GPIO[DHT11_PIN].CTRL = IO_BANK0_CTRL_FUNCSEL_SIO; } -/** - * @brief Release TIMER0 from reset in the reset controller. - * @retval None - */ void dht11_timer_release_reset(void) { _timer_clear_reset(); _timer_wait_reset_done(); } -/** - * @brief Start the TIMER0 tick generator for 1 us ticks at 12 MHz. - * @retval None - */ void dht11_timer_start_tick(void) { TICKS[TICKS_TIMER0_CYCLES_OFFSET] = TICKS_TIMER0_CYCLES_12MHZ; TICKS[TICKS_TIMER0_CTRL_OFFSET] = TICKS_TIMER0_ENABLE; } -/** - * @brief Configure GPIO4 pad and funcsel for SIO with pull-up. - * @retval None - */ void dht11_init(void) { _configure_pad(); @@ -278,12 +266,6 @@ static bool _acquire_data(uint8_t *data) return _validate_checksum(data); } -/** - * @brief Read temperature and humidity from the DHT11 sensor. - * @param humidity pointer to store humidity integer percentage - * @param temperature pointer to store temperature integer Celsius - * @retval bool true on success, false on timeout or checksum error - */ bool dht11_read(uint8_t *humidity, uint8_t *temperature) { uint8_t data[DHT11_DATA_BYTES] = {0}; diff --git a/drivers/0x09_dht11_cbm/Src/rp2350_reset.c b/drivers/0x09_dht11_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x09_dht11_cbm/Src/rp2350_reset.c +++ b/drivers/0x09_dht11_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x09_dht11_cbm/Src/rp2350_reset_handler.c b/drivers/0x09_dht11_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x09_dht11_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x09_dht11_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x09_dht11_cbm/Src/rp2350_stack.c b/drivers/0x09_dht11_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x09_dht11_cbm/Src/rp2350_stack.c +++ b/drivers/0x09_dht11_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x09_dht11_cbm/Src/rp2350_uart.c b/drivers/0x09_dht11_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x09_dht11_cbm/Src/rp2350_uart.c +++ b/drivers/0x09_dht11_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x09_dht11_cbm/Src/rp2350_xosc.c b/drivers/0x09_dht11_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x09_dht11_cbm/Src/rp2350_xosc.c +++ b/drivers/0x09_dht11_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x09_dht11_cbm/Src/vector_table.c b/drivers/0x09_dht11_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x09_dht11_cbm/Src/vector_table.c +++ b/drivers/0x09_dht11_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x0a_ir/0x0a_ir.c b/drivers/0x0a_ir/0x0a_ir.c index 03ee16e..f5bc690 100644 --- a/drivers/0x0a_ir/0x0a_ir.c +++ b/drivers/0x0a_ir/0x0a_ir.c @@ -55,14 +55,6 @@ static void _poll_and_print(void) { printf("NEC command: 0x%02X (%d)\r\n", command, command); } -/** - * @brief Application entry point for the NEC IR receiver demo - * - * Initializes the IR receiver on GPIO5 and continuously decodes - * NEC frames, printing each command byte over UART. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); ir_init(IR_GPIO); diff --git a/drivers/0x0a_ir/ir.c b/drivers/0x0a_ir/ir.c index 825e55c..31b9569 100644 --- a/drivers/0x0a_ir/ir.c +++ b/drivers/0x0a_ir/ir.c @@ -115,14 +115,6 @@ static int _validate_nec_frame(const uint8_t *data) { return -1; } -/** - * @brief Initialize the IR receiver GPIO - * - * Configures the given pin as an input with pull-up for the NEC IR receiver. - * Call this once during board initialization before calling ir_getkey(). - * - * @param pin GPIO pin number connected to IR receiver output - */ void ir_init(uint8_t pin) { ir_pin = pin; gpio_init(pin); @@ -130,14 +122,6 @@ void ir_init(uint8_t pin) { gpio_pull_up(pin); } -/** - * @brief Blocking NEC IR decoder - * - * Blocks while waiting for a complete NEC frame. On success returns the - * decoded command byte (0..255). On timeout or protocol error returns -1. - * - * @return decoded command byte (0..255) or -1 on failure - */ int ir_getkey(void) { if (!_wait_leader()) return -1; uint8_t data[4] = {0, 0, 0, 0}; diff --git a/drivers/0x0a_ir_cbm/Src/image_def.c b/drivers/0x0a_ir_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x0a_ir_cbm/Src/image_def.c +++ b/drivers/0x0a_ir_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x0a_ir_cbm/Src/main.c b/drivers/0x0a_ir_cbm/Src/main.c index 18f3421..c91a6a2 100644 --- a/drivers/0x0a_ir_cbm/Src/main.c +++ b/drivers/0x0a_ir_cbm/Src/main.c @@ -107,10 +107,6 @@ static void _ir_setup(void) uart_puts("Press a button on your NEC remote...\r\n"); } -/** - * @brief Application entry point for the NEC IR receiver demo. - * @retval int does not return - */ int main(void) { int command; diff --git a/drivers/0x0a_ir_cbm/Src/rp2350_delay.c b/drivers/0x0a_ir_cbm/Src/rp2350_delay.c index cc40ac6..f2fe8de 100644 --- a/drivers/0x0a_ir_cbm/Src/rp2350_delay.c +++ b/drivers/0x0a_ir_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) @@ -43,11 +38,6 @@ void delay_ms(uint32_t ms) ); } -/** - * @brief Delay for the specified number of microseconds. - * @param us number of microseconds to delay - * @retval None - */ void delay_us(uint32_t us) { if (us == 0) diff --git a/drivers/0x0a_ir_cbm/Src/rp2350_ir.c b/drivers/0x0a_ir_cbm/Src/rp2350_ir.c index 5c6cc28..24f33ea 100644 --- a/drivers/0x0a_ir_cbm/Src/rp2350_ir.c +++ b/drivers/0x0a_ir_cbm/Src/rp2350_ir.c @@ -211,30 +211,18 @@ static void _set_input(void) SIO[SIO_GPIO_OE_CLR_OFFSET] = IR_PIN_MASK; } -/** - * @brief Release TIMER0 from reset in the reset controller. - * @retval None - */ void ir_timer_release_reset(void) { _timer_clear_reset(); _timer_wait_reset_done(); } -/** - * @brief Start the TIMER0 tick generator for 1 us ticks at 12 MHz. - * @retval None - */ void ir_timer_start_tick(void) { TICKS[TICKS_TIMER0_CYCLES_OFFSET] = TICKS_TIMER0_CYCLES_12MHZ; TICKS[TICKS_TIMER0_CTRL_OFFSET] = TICKS_TIMER0_ENABLE; } -/** - * @brief Configure GPIO5 pad and funcsel for SIO input with pull-up. - * @retval None - */ void ir_init(void) { _configure_pad(); @@ -242,10 +230,6 @@ void ir_init(void) _set_input(); } -/** - * @brief Block until a valid NEC frame is received or timeout. - * @retval int command byte (0-255) on success, -1 on failure - */ int ir_getkey(void) { uint8_t data[NEC_DATA_BYTES] = {0}; diff --git a/drivers/0x0a_ir_cbm/Src/rp2350_reset.c b/drivers/0x0a_ir_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x0a_ir_cbm/Src/rp2350_reset.c +++ b/drivers/0x0a_ir_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x0a_ir_cbm/Src/rp2350_reset_handler.c b/drivers/0x0a_ir_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x0a_ir_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x0a_ir_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x0a_ir_cbm/Src/rp2350_stack.c b/drivers/0x0a_ir_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x0a_ir_cbm/Src/rp2350_stack.c +++ b/drivers/0x0a_ir_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x0a_ir_cbm/Src/rp2350_uart.c b/drivers/0x0a_ir_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x0a_ir_cbm/Src/rp2350_uart.c +++ b/drivers/0x0a_ir_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x0a_ir_cbm/Src/rp2350_xosc.c b/drivers/0x0a_ir_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x0a_ir_cbm/Src/rp2350_xosc.c +++ b/drivers/0x0a_ir_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x0a_ir_cbm/Src/vector_table.c b/drivers/0x0a_ir_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x0a_ir_cbm/Src/vector_table.c +++ b/drivers/0x0a_ir_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x0b_spi/0x0b_spi.c b/drivers/0x0b_spi/0x0b_spi.c index 823fd2a..74e9106 100644 --- a/drivers/0x0b_spi/0x0b_spi.c +++ b/drivers/0x0b_spi/0x0b_spi.c @@ -76,14 +76,6 @@ static void _loopback_transfer(const uint8_t *tx_buf, uint8_t *rx_buf, size_t le sleep_ms(1000); } -/** - * @brief Application entry point for the SPI loopback demo - * - * Initializes SPI0 in master mode and continuously performs - * full-duplex transfers with MOSI wired to MISO for loopback. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); spi_driver_init(SPI_PORT, PIN_MOSI, PIN_MISO, PIN_SCK, PIN_CS, SPI_BAUD_HZ); diff --git a/drivers/0x0b_spi/spi.c b/drivers/0x0b_spi/spi.c index da49150..3c3ee4f 100644 --- a/drivers/0x0b_spi/spi.c +++ b/drivers/0x0b_spi/spi.c @@ -54,20 +54,6 @@ static void _setup_spi_pins(uint32_t mosi, uint32_t miso, uint32_t sck) { gpio_set_function(sck, GPIO_FUNC_SPI); } -/** - * @brief Initialize an SPI peripheral in master mode - * - * Configures the SPI instance at the requested baud rate, assigns GPIO - * alternate functions for MOSI, MISO, and SCK, and configures the chip - * select pin as a GPIO output deasserted (high) by default. - * - * @param port SPI port number (0 for spi0, 1 for spi1) - * @param mosi GPIO pin number for MOSI (controller TX) - * @param miso GPIO pin number for MISO (controller RX) - * @param sck GPIO pin number for SCK (clock) - * @param cs GPIO pin number for chip select (active-low) - * @param baud_hz Desired SPI clock frequency in Hz (e.g. 1000000 for 1 MHz) - */ void spi_driver_init(uint8_t port, uint32_t mosi, uint32_t miso, uint32_t sck, uint32_t cs, uint32_t baud_hz) { spi_inst_t *spi = _get_spi_inst(port); @@ -78,36 +64,14 @@ void spi_driver_init(uint8_t port, uint32_t mosi, uint32_t miso, gpio_put(cs, 1); } -/** - * @brief Assert the chip-select line (drive CS low) - * - * @param cs GPIO pin number of the chip-select output - */ void spi_driver_cs_select(uint32_t cs) { gpio_put(cs, 0); } -/** - * @brief Deassert the chip-select line (drive CS high) - * - * @param cs GPIO pin number of the chip-select output - */ void spi_driver_cs_deselect(uint32_t cs) { gpio_put(cs, 1); } -/** - * @brief Perform a full-duplex SPI transfer - * - * Sends len bytes from tx while simultaneously receiving len bytes - * into rx. Both buffers must hold at least len bytes. The caller is - * responsible for asserting and deasserting CS around this call. - * - * @param port SPI port number (0 for spi0, 1 for spi1) - * @param tx Pointer to the transmit buffer (must be len bytes) - * @param rx Pointer to the receive buffer (must be len bytes) - * @param len Number of bytes to transfer - */ void spi_driver_transfer(uint8_t port, const uint8_t *tx, uint8_t *rx, uint32_t len) { spi_inst_t *spi = _get_spi_inst(port); diff --git a/drivers/0x0b_spi_cbm/Src/image_def.c b/drivers/0x0b_spi_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x0b_spi_cbm/Src/image_def.c +++ b/drivers/0x0b_spi_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x0b_spi_cbm/Src/main.c b/drivers/0x0b_spi_cbm/Src/main.c index 00db736..b2fa65f 100644 --- a/drivers/0x0b_spi_cbm/Src/main.c +++ b/drivers/0x0b_spi_cbm/Src/main.c @@ -111,10 +111,6 @@ static void _spi_setup(void) uart_puts("SPI loopback initialized (MOSI->MISO on GPIO19->GPIO16)\r\n"); } -/** - * @brief Application entry point for the SPI loopback demo. - * @retval int does not return - */ int main(void) { /** @brief Transmit test pattern for SPI loopback. */ diff --git a/drivers/0x0b_spi_cbm/Src/rp2350_delay.c b/drivers/0x0b_spi_cbm/Src/rp2350_delay.c index cc40ac6..f2fe8de 100644 --- a/drivers/0x0b_spi_cbm/Src/rp2350_delay.c +++ b/drivers/0x0b_spi_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) @@ -43,11 +38,6 @@ void delay_ms(uint32_t ms) ); } -/** - * @brief Delay for the specified number of microseconds. - * @param us number of microseconds to delay - * @retval None - */ void delay_us(uint32_t us) { if (us == 0) diff --git a/drivers/0x0b_spi_cbm/Src/rp2350_reset.c b/drivers/0x0b_spi_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x0b_spi_cbm/Src/rp2350_reset.c +++ b/drivers/0x0b_spi_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x0b_spi_cbm/Src/rp2350_reset_handler.c b/drivers/0x0b_spi_cbm/Src/rp2350_reset_handler.c index 321e731..c6da9f2 100644 --- a/drivers/0x0b_spi_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x0b_spi_cbm/Src/rp2350_reset_handler.c @@ -30,10 +30,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x0b_spi_cbm/Src/rp2350_spi.c b/drivers/0x0b_spi_cbm/Src/rp2350_spi.c index b9368fd..537e8c5 100644 --- a/drivers/0x0b_spi_cbm/Src/rp2350_spi.c +++ b/drivers/0x0b_spi_cbm/Src/rp2350_spi.c @@ -162,10 +162,6 @@ static void _wait_rx_not_empty(void) } } -/** - * @brief Release SPI0 from reset in the RESETS controller. - * @retval None - */ void spi_release_reset(void) { _spi_clear_reset(); @@ -196,14 +192,6 @@ static void _configure_all_funcsel(void) _set_funcsel_sio(SPI_CS_PIN); } -/** - * @brief Initialise SPI0 in master mode at 1 MHz, 8-bit, CPOL=0/CPHA=0. - * - * Configures SSPCR0, SSPCPSR, and SSPCR1 then enables the port. - * Also configures GPIO16-19 pads and IO funcsel for SPI. - * - * @retval None - */ void spi_init(void) { _configure_all_pads(); @@ -214,36 +202,16 @@ void spi_init(void) _enable_spi(); } -/** - * @brief Assert the chip-select line (drive CS low). - * @retval None - */ void spi_cs_select(void) { SIO[SIO_GPIO_OUT_CLR_OFFSET] = CS_PIN_MASK; } -/** - * @brief Deassert the chip-select line (drive CS high). - * @retval None - */ void spi_cs_deselect(void) { SIO[SIO_GPIO_OUT_SET_OFFSET] = CS_PIN_MASK; } -/** - * @brief Perform a full-duplex SPI transfer. - * - * Sends @p len bytes from @p tx while simultaneously receiving - * @p len bytes into @p rx. The caller is responsible for - * asserting and deasserting CS around this call. - * - * @param tx pointer to transmit buffer (must be @p len bytes) - * @param rx pointer to receive buffer (must be @p len bytes) - * @param len number of bytes to transfer - * @retval None - */ void spi_transfer(const uint8_t *tx, uint8_t *rx, uint32_t len) { for (uint32_t i = 0; i < len; i++) { diff --git a/drivers/0x0b_spi_cbm/Src/rp2350_stack.c b/drivers/0x0b_spi_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x0b_spi_cbm/Src/rp2350_stack.c +++ b/drivers/0x0b_spi_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x0b_spi_cbm/Src/rp2350_uart.c b/drivers/0x0b_spi_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x0b_spi_cbm/Src/rp2350_uart.c +++ b/drivers/0x0b_spi_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x0b_spi_cbm/Src/rp2350_xosc.c b/drivers/0x0b_spi_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x0b_spi_cbm/Src/rp2350_xosc.c +++ b/drivers/0x0b_spi_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x0b_spi_cbm/Src/vector_table.c b/drivers/0x0b_spi_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x0b_spi_cbm/Src/vector_table.c +++ b/drivers/0x0b_spi_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x0c_multicore/0x0c_multicore.c b/drivers/0x0c_multicore/0x0c_multicore.c index 9f7257f..e6db9ff 100644 --- a/drivers/0x0c_multicore/0x0c_multicore.c +++ b/drivers/0x0c_multicore/0x0c_multicore.c @@ -68,15 +68,6 @@ static void _send_and_print(uint32_t *counter) { sleep_ms(1000); } -/** - * @brief Application entry point for the multicore FIFO demo - * - * Launches core 1 and continuously sends an incrementing counter - * through the inter-core FIFO, printing both sent and returned - * values over UART every second. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); multicore_driver_launch(_core1_main); diff --git a/drivers/0x0c_multicore/multicore.c b/drivers/0x0c_multicore/multicore.c index 4649765..d0a93f9 100644 --- a/drivers/0x0c_multicore/multicore.c +++ b/drivers/0x0c_multicore/multicore.c @@ -30,39 +30,14 @@ #include "multicore.h" #include "pico/multicore.h" -/** - * @brief Start the provided function on core 1 - * - * Launches the given entry function on the second RP2350 core using the - * Pico SDK multicore_launch_core1() API. The function will run - * concurrently with core 0 from the moment this call returns. - * - * @param core1_entry Pointer to the void(void) function to run on core 1 - */ void multicore_driver_launch(void (*core1_entry)(void)) { multicore_launch_core1(core1_entry); } -/** - * @brief Push a 32-bit value into the inter-core FIFO (blocking) - * - * Writes data to the FIFO that core 1 reads from. Blocks until - * there is space in the hardware FIFO. - * - * @param data 32-bit value to send to core 1 - */ void multicore_driver_push(uint32_t data) { multicore_fifo_push_blocking(data); } -/** - * @brief Pop a 32-bit value from the inter-core FIFO (blocking) - * - * Reads one entry from the FIFO that core 1 writes into. Blocks until - * a value is available. - * - * @return uint32_t Value received from core 1 - */ uint32_t multicore_driver_pop(void) { return multicore_fifo_pop_blocking(); } diff --git a/drivers/0x0c_multicore_cbm/Src/image_def.c b/drivers/0x0c_multicore_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x0c_multicore_cbm/Src/image_def.c +++ b/drivers/0x0c_multicore_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x0c_multicore_cbm/Src/main.c b/drivers/0x0c_multicore_cbm/Src/main.c index 77bf9b1..9f55c35 100644 --- a/drivers/0x0c_multicore_cbm/Src/main.c +++ b/drivers/0x0c_multicore_cbm/Src/main.c @@ -130,10 +130,6 @@ static void _send_and_print(uint32_t *counter) delay_ms(1000); } -/** - * @brief Application entry point for the multicore FIFO demo. - * @retval int does not return - */ int main(void) { uint32_t counter = 0; diff --git a/drivers/0x0c_multicore_cbm/Src/rp2350_delay.c b/drivers/0x0c_multicore_cbm/Src/rp2350_delay.c index cc40ac6..f2fe8de 100644 --- a/drivers/0x0c_multicore_cbm/Src/rp2350_delay.c +++ b/drivers/0x0c_multicore_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) @@ -43,11 +38,6 @@ void delay_ms(uint32_t ms) ); } -/** - * @brief Delay for the specified number of microseconds. - * @param us number of microseconds to delay - * @retval None - */ void delay_us(uint32_t us) { if (us == 0) diff --git a/drivers/0x0c_multicore_cbm/Src/rp2350_multicore.c b/drivers/0x0c_multicore_cbm/Src/rp2350_multicore.c index d05459f..3ff0065 100644 --- a/drivers/0x0c_multicore_cbm/Src/rp2350_multicore.c +++ b/drivers/0x0c_multicore_cbm/Src/rp2350_multicore.c @@ -131,44 +131,17 @@ static void _launch_handshake(void (*entry)(void)) } while (idx < 6); } -/** - * @brief Launch a function on processor core 1. - * - * Resets core 1 via the PSM, then performs the FIFO handshake - * protocol described in RP2350 datasheet Section 5.3 to pass - * the vector table, stack pointer, and entry point. - * - * @param entry pointer to the void(void) function to run on core 1 - * @retval None - */ void multicore_launch(void (*entry)(void)) { _reset_core1(); _launch_handshake(entry); } -/** - * @brief Push a 32-bit value into the inter-core FIFO (blocking). - * - * Blocks until there is space in the TX FIFO, then writes the - * value and signals the other core with SEV. - * - * @param data 32-bit value to send - * @retval None - */ void multicore_fifo_push(uint32_t data) { _fifo_push_blocking(data); } -/** - * @brief Pop a 32-bit value from the inter-core FIFO (blocking). - * - * Blocks with WFE until a value is available in the RX FIFO, - * then returns it. - * - * @retval uint32_t value received from the other core - */ uint32_t multicore_fifo_pop(void) { return _fifo_pop_blocking(); diff --git a/drivers/0x0c_multicore_cbm/Src/rp2350_reset.c b/drivers/0x0c_multicore_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x0c_multicore_cbm/Src/rp2350_reset.c +++ b/drivers/0x0c_multicore_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x0c_multicore_cbm/Src/rp2350_reset_handler.c b/drivers/0x0c_multicore_cbm/Src/rp2350_reset_handler.c index 157ef18..e228a44 100644 --- a/drivers/0x0c_multicore_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x0c_multicore_cbm/Src/rp2350_reset_handler.c @@ -29,10 +29,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x0c_multicore_cbm/Src/rp2350_stack.c b/drivers/0x0c_multicore_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x0c_multicore_cbm/Src/rp2350_stack.c +++ b/drivers/0x0c_multicore_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x0c_multicore_cbm/Src/rp2350_uart.c b/drivers/0x0c_multicore_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x0c_multicore_cbm/Src/rp2350_uart.c +++ b/drivers/0x0c_multicore_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x0c_multicore_cbm/Src/rp2350_xosc.c b/drivers/0x0c_multicore_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x0c_multicore_cbm/Src/rp2350_xosc.c +++ b/drivers/0x0c_multicore_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x0c_multicore_cbm/Src/vector_table.c b/drivers/0x0c_multicore_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x0c_multicore_cbm/Src/vector_table.c +++ b/drivers/0x0c_multicore_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x0d_timer/0x0d_timer.c b/drivers/0x0d_timer/0x0d_timer.c index 1df4a33..1c750a9 100644 --- a/drivers/0x0d_timer/0x0d_timer.c +++ b/drivers/0x0d_timer/0x0d_timer.c @@ -50,14 +50,6 @@ static bool _heartbeat_callback(void) { return true; } -/** - * @brief Application entry point for the repeating timer demo - * - * Starts a 1-second repeating timer whose callback prints a - * heartbeat message over UART. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); timer_driver_start(1000, _heartbeat_callback); diff --git a/drivers/0x0d_timer/timer.c b/drivers/0x0d_timer/timer.c index 58cd7ad..ad00749 100644 --- a/drivers/0x0d_timer/timer.c +++ b/drivers/0x0d_timer/timer.c @@ -50,17 +50,6 @@ static bool _timer_shim(repeating_timer_t *rt) { return false; } -/** - * @brief Start a repeating hardware timer that fires the given callback - * - * Schedules callback to be invoked every period_ms milliseconds using - * the Pico SDK add_repeating_timer_ms() API. The timer continues firing - * until timer_driver_cancel() is called. - * - * @param period_ms Interval between callbacks in milliseconds (positive value) - * @param callback Function to call on each timer expiry; must return true to - * continue repeating, false to stop - */ void timer_driver_start(int32_t period_ms, timer_driver_callback_t callback) { if (g_timer_active) { cancel_repeating_timer(&g_timer); @@ -70,12 +59,6 @@ void timer_driver_start(int32_t period_ms, timer_driver_callback_t callback) { g_timer_active = add_repeating_timer_ms(period_ms, _timer_shim, NULL, &g_timer); } -/** - * @brief Cancel the active repeating timer - * - * Stops the timer started by timer_driver_start(). Safe to call even if the - * timer has already fired and self-cancelled. - */ void timer_driver_cancel(void) { if (!g_timer_active) return; diff --git a/drivers/0x0d_timer_cbm/Src/image_def.c b/drivers/0x0d_timer_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x0d_timer_cbm/Src/image_def.c +++ b/drivers/0x0d_timer_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x0d_timer_cbm/Src/main.c b/drivers/0x0d_timer_cbm/Src/main.c index dc05a96..012d758 100644 --- a/drivers/0x0d_timer_cbm/Src/main.c +++ b/drivers/0x0d_timer_cbm/Src/main.c @@ -38,10 +38,6 @@ static void _heartbeat(void) uart_puts("Timer heartbeat\r\n"); } -/** - * @brief Application entry point for the repeating timer demo. - * @retval int does not return - */ int main(void) { uart_puts("Timer alarm demo initialized\r\n"); diff --git a/drivers/0x0d_timer_cbm/Src/rp2350_delay.c b/drivers/0x0d_timer_cbm/Src/rp2350_delay.c index cc40ac6..f2fe8de 100644 --- a/drivers/0x0d_timer_cbm/Src/rp2350_delay.c +++ b/drivers/0x0d_timer_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) @@ -43,11 +38,6 @@ void delay_ms(uint32_t ms) ); } -/** - * @brief Delay for the specified number of microseconds. - * @param us number of microseconds to delay - * @retval None - */ void delay_us(uint32_t us) { if (us == 0) diff --git a/drivers/0x0d_timer_cbm/Src/rp2350_reset.c b/drivers/0x0d_timer_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x0d_timer_cbm/Src/rp2350_reset.c +++ b/drivers/0x0d_timer_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x0d_timer_cbm/Src/rp2350_reset_handler.c b/drivers/0x0d_timer_cbm/Src/rp2350_reset_handler.c index 92aea18..9922cc2 100644 --- a/drivers/0x0d_timer_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x0d_timer_cbm/Src/rp2350_reset_handler.c @@ -30,20 +30,12 @@ extern int main(void); -/** - * @brief Initialize late peripherals (timer release and tick init). - * @retval None - */ void _late_init(void) { timer_release_reset(); timer_tick_init(); } -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x0d_timer_cbm/Src/rp2350_stack.c b/drivers/0x0d_timer_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x0d_timer_cbm/Src/rp2350_stack.c +++ b/drivers/0x0d_timer_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x0d_timer_cbm/Src/rp2350_timer.c b/drivers/0x0d_timer_cbm/Src/rp2350_timer.c index d44f2b3..37c71e1 100644 --- a/drivers/0x0d_timer_cbm/Src/rp2350_timer.c +++ b/drivers/0x0d_timer_cbm/Src/rp2350_timer.c @@ -102,32 +102,18 @@ static void _timer_arm_alarm(void) TIMER0->ALARM0 = target; } -/** - * @brief Release TIMER0 from reset and wait until ready. - * @retval None - */ void timer_release_reset(void) { _timer_clear_reset_bit(); _timer_wait_reset_done(); } -/** - * @brief Start the TIMER0 tick generator at 1 us resolution. - * @retval None - */ void timer_tick_init(void) { _timer_set_tick_cycles(); _timer_enable_tick(); } -/** - * @brief Start a repeating alarm that fires every period_ms milliseconds. - * @param period_ms interval in milliseconds between callbacks - * @param cb function to call on each alarm - * @retval None - */ void timer_alarm_start(uint32_t period_ms, timer_callback_t cb) { _user_callback = cb; @@ -137,10 +123,6 @@ void timer_alarm_start(uint32_t period_ms, timer_callback_t cb) _timer_arm_alarm(); } -/** - * @brief TIMER0 alarm 0 interrupt handler (exception 16 + IRQ 0). - * @retval None - */ void TIMER0_IRQ_0_Handler(void) { TIMER0->INTR = TIMER_INTR_ALARM0_MASK; diff --git a/drivers/0x0d_timer_cbm/Src/rp2350_uart.c b/drivers/0x0d_timer_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x0d_timer_cbm/Src/rp2350_uart.c +++ b/drivers/0x0d_timer_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x0d_timer_cbm/Src/rp2350_xosc.c b/drivers/0x0d_timer_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x0d_timer_cbm/Src/rp2350_xosc.c +++ b/drivers/0x0d_timer_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x0d_timer_cbm/Src/vector_table.c b/drivers/0x0d_timer_cbm/Src/vector_table.c index 01a1a41..4989a70 100644 --- a/drivers/0x0d_timer_cbm/Src/vector_table.c +++ b/drivers/0x0d_timer_cbm/Src/vector_table.c @@ -40,14 +40,6 @@ static void _default_handler(void) typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - * - * Entry 0: Initial SP - * Entry 1: Reset handler - * Entries 2-15: System exceptions (NMI, HardFault, etc.) - * Entry 16: IRQ 0 = TIMER0_IRQ_0 - */ __attribute__((section(".vectors"), used)) const void *_vectors[17] = { &_stack_top, // 0: Initial stack pointer diff --git a/drivers/0x0e_watchdog/0x0e_watchdog.c b/drivers/0x0e_watchdog/0x0e_watchdog.c index 3143217..eea6434 100644 --- a/drivers/0x0e_watchdog/0x0e_watchdog.c +++ b/drivers/0x0e_watchdog/0x0e_watchdog.c @@ -60,14 +60,6 @@ static void _feed_and_report(void) { sleep_ms(1000); } -/** - * @brief Application entry point for the watchdog demo - * - * Enables the watchdog with a 3-second timeout and feeds it every - * 1 second. Reports the reset reason on startup. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); _print_reset_reason(); diff --git a/drivers/0x0e_watchdog/watchdog.c b/drivers/0x0e_watchdog/watchdog.c index 15a2eb6..fb677de 100644 --- a/drivers/0x0e_watchdog/watchdog.c +++ b/drivers/0x0e_watchdog/watchdog.c @@ -30,37 +30,14 @@ #include "watchdog.h" #include "hardware/watchdog.h" -/** - * @brief Enable the hardware watchdog with the specified timeout - * - * Starts the watchdog timer. If watchdog_driver_feed() is not called within - * timeout_ms milliseconds, the RP2350 will perform a hard reset. - * The maximum supported timeout is 8388 ms. - * - * @param timeout_ms Watchdog timeout in milliseconds (1 - 8388) - */ void watchdog_driver_enable(uint32_t timeout_ms) { watchdog_enable(timeout_ms, true); } -/** - * @brief Reset ("feed") the watchdog timer to prevent a reboot - * - * Must be called periodically within the timeout window configured by - * watchdog_driver_enable(). Each call restarts the countdown. - */ void watchdog_driver_feed(void) { watchdog_update(); } -/** - * @brief Check whether the last reset was caused by the watchdog - * - * Reads the reset reason register to determine if the watchdog timer - * expired and forced the most recent reboot. - * - * @return bool true if the watchdog triggered the last reset, false otherwise - */ bool watchdog_driver_caused_reboot(void) { return watchdog_caused_reboot(); } diff --git a/drivers/0x0e_watchdog_cbm/Src/image_def.c b/drivers/0x0e_watchdog_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x0e_watchdog_cbm/Src/image_def.c +++ b/drivers/0x0e_watchdog_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x0e_watchdog_cbm/Src/main.c b/drivers/0x0e_watchdog_cbm/Src/main.c index 59c1ed8..fcad828 100644 --- a/drivers/0x0e_watchdog_cbm/Src/main.c +++ b/drivers/0x0e_watchdog_cbm/Src/main.c @@ -53,10 +53,6 @@ static void _feed_and_report(void) delay_ms(1000); } -/** - * @brief Application entry point for the watchdog demo. - * @retval int does not return - */ int main(void) { _print_reset_reason(); diff --git a/drivers/0x0e_watchdog_cbm/Src/rp2350_delay.c b/drivers/0x0e_watchdog_cbm/Src/rp2350_delay.c index cc40ac6..f2fe8de 100644 --- a/drivers/0x0e_watchdog_cbm/Src/rp2350_delay.c +++ b/drivers/0x0e_watchdog_cbm/Src/rp2350_delay.c @@ -22,11 +22,6 @@ #include "rp2350_delay.h" -/** - * @brief Delay for the specified number of milliseconds. - * @param ms number of milliseconds to delay - * @retval None - */ void delay_ms(uint32_t ms) { if (ms == 0) @@ -43,11 +38,6 @@ void delay_ms(uint32_t ms) ); } -/** - * @brief Delay for the specified number of microseconds. - * @param us number of microseconds to delay - * @retval None - */ void delay_us(uint32_t us) { if (us == 0) diff --git a/drivers/0x0e_watchdog_cbm/Src/rp2350_reset.c b/drivers/0x0e_watchdog_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x0e_watchdog_cbm/Src/rp2350_reset.c +++ b/drivers/0x0e_watchdog_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x0e_watchdog_cbm/Src/rp2350_reset_handler.c b/drivers/0x0e_watchdog_cbm/Src/rp2350_reset_handler.c index 1c6a5a1..f5666ef 100644 --- a/drivers/0x0e_watchdog_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x0e_watchdog_cbm/Src/rp2350_reset_handler.c @@ -30,10 +30,6 @@ extern int main(void); -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x0e_watchdog_cbm/Src/rp2350_stack.c b/drivers/0x0e_watchdog_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x0e_watchdog_cbm/Src/rp2350_stack.c +++ b/drivers/0x0e_watchdog_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x0e_watchdog_cbm/Src/rp2350_uart.c b/drivers/0x0e_watchdog_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x0e_watchdog_cbm/Src/rp2350_uart.c +++ b/drivers/0x0e_watchdog_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x0e_watchdog_cbm/Src/rp2350_watchdog.c b/drivers/0x0e_watchdog_cbm/Src/rp2350_watchdog.c index 9132fce..6c9b5ee 100644 --- a/drivers/0x0e_watchdog_cbm/Src/rp2350_watchdog.c +++ b/drivers/0x0e_watchdog_cbm/Src/rp2350_watchdog.c @@ -89,21 +89,12 @@ static void _watchdog_load_and_enable(void) WATCHDOG->CTRL |= (1U << WATCHDOG_CTRL_ENABLE_SHIFT); } -/** - * @brief Start the watchdog tick generator at 1 us resolution. - * @retval None - */ void watchdog_tick_init(void) { _watchdog_set_tick_cycles(); _watchdog_enable_tick(); } -/** - * @brief Enable the watchdog with the specified timeout. - * @param timeout_ms watchdog timeout in milliseconds (1-16777) - * @retval None - */ void watchdog_enable(uint32_t timeout_ms) { _load_value = timeout_ms * 1000U; @@ -115,19 +106,11 @@ void watchdog_enable(uint32_t timeout_ms) _watchdog_load_and_enable(); } -/** - * @brief Feed the watchdog to prevent a reset. - * @retval None - */ void watchdog_feed(void) { WATCHDOG->LOAD = _load_value; } -/** - * @brief Check whether the last reset was caused by the watchdog. - * @retval bool true if the watchdog triggered the last reset - */ bool watchdog_caused_reboot(void) { return (WATCHDOG->REASON & ((1U << WATCHDOG_REASON_TIMER_SHIFT) | (1U << WATCHDOG_REASON_FORCE_SHIFT))) != 0; diff --git a/drivers/0x0e_watchdog_cbm/Src/rp2350_xosc.c b/drivers/0x0e_watchdog_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x0e_watchdog_cbm/Src/rp2350_xosc.c +++ b/drivers/0x0e_watchdog_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x0e_watchdog_cbm/Src/vector_table.c b/drivers/0x0e_watchdog_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x0e_watchdog_cbm/Src/vector_table.c +++ b/drivers/0x0e_watchdog_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top, diff --git a/drivers/0x0f_flash/0x0f_flash.c b/drivers/0x0f_flash/0x0f_flash.c index 514b2b7..bbfb7e5 100644 --- a/drivers/0x0f_flash/0x0f_flash.c +++ b/drivers/0x0f_flash/0x0f_flash.c @@ -70,14 +70,6 @@ static void _write_and_verify(void) { printf("Flash readback: %s\r\n", read_buf); } -/** - * @brief Application entry point for the on-chip flash demo - * - * Writes a demo string to the last flash sector, reads it back, - * and prints the result over UART. - * - * @return int Does not return - */ int main(void) { stdio_init_all(); _write_and_verify(); diff --git a/drivers/0x0f_flash/flash.c b/drivers/0x0f_flash/flash.c index db848f3..ad010cb 100644 --- a/drivers/0x0f_flash/flash.c +++ b/drivers/0x0f_flash/flash.c @@ -33,17 +33,6 @@ #include "hardware/sync.h" #include "pico/stdlib.h" -/** - * @brief Erase one 4096-byte sector and write data to on-chip flash - * - * The target address must be aligned to a 4096-byte sector boundary. - * The function disables interrupts, erases the containing sector, - * programs up to len bytes from data, and re-enables interrupts. - * - * @param flash_offset Byte offset from the start of flash (must be sector-aligned) - * @param data Pointer to the data buffer to write - * @param len Number of bytes to write (multiple of FLASH_DRIVER_PAGE_SIZE) - */ void flash_driver_write(uint32_t flash_offset, const uint8_t *data, uint32_t len) { uint32_t ints = save_and_disable_interrupts(); flash_range_erase(flash_offset, FLASH_SECTOR_SIZE); @@ -51,17 +40,6 @@ void flash_driver_write(uint32_t flash_offset, const uint8_t *data, uint32_t len restore_interrupts(ints); } -/** - * @brief Read bytes from on-chip flash via the XIP memory map - * - * Flash is memory-mapped starting at XIP_BASE (0x10000000). This function - * copies len bytes beginning at flash_offset into out using the XIP read - * path, which is always available without erasing. - * - * @param flash_offset Byte offset from the start of flash - * @param out Pointer to the destination buffer (must be len bytes) - * @param len Number of bytes to read - */ void flash_driver_read(uint32_t flash_offset, uint8_t *out, uint32_t len) { const uint8_t *flash_target_contents = (const uint8_t *)(XIP_BASE + flash_offset); memcpy(out, flash_target_contents, len); diff --git a/drivers/0x0f_flash_cbm/Src/image_def.c b/drivers/0x0f_flash_cbm/Src/image_def.c index 9a34198..6f8eb7d 100644 --- a/drivers/0x0f_flash_cbm/Src/image_def.c +++ b/drivers/0x0f_flash_cbm/Src/image_def.c @@ -22,9 +22,6 @@ #include -/** - * @brief IMAGE_DEF block structure placed in flash - */ __attribute__((section(".embedded_block"), used)) const uint8_t picobin_block[] = { 0xD3, 0xDE, 0xFF, 0xFF, diff --git a/drivers/0x0f_flash_cbm/Src/main.c b/drivers/0x0f_flash_cbm/Src/main.c index 91b7d1e..68a68c8 100644 --- a/drivers/0x0f_flash_cbm/Src/main.c +++ b/drivers/0x0f_flash_cbm/Src/main.c @@ -66,10 +66,6 @@ static void _write_and_verify(void) uart_puts("\r\n"); } -/** - * @brief Application entry point for the on-chip flash demo. - * @retval int does not return - */ int main(void) { _write_and_verify(); diff --git a/drivers/0x0f_flash_cbm/Src/rp2350_flash.c b/drivers/0x0f_flash_cbm/Src/rp2350_flash.c index 941a9df..cdc3a48 100644 --- a/drivers/0x0f_flash_cbm/Src/rp2350_flash.c +++ b/drivers/0x0f_flash_cbm/Src/rp2350_flash.c @@ -112,19 +112,6 @@ static void _flash_erase_program_ram(const FlashRomFns *fns, uint32_t offset, fns->enter_xip(); } -/** - * @brief Erase the containing sector(s) and program data to flash. - * - * The data buffer must reside in RAM (not flash). Interrupts - * are disabled for the duration of the erase/program cycle. - * The write length must be a multiple of FLASH_PAGE_SIZE - * (256 bytes); pad with 0xFF if necessary. - * - * @param offset byte offset from the start of flash (sector-aligned) - * @param data pointer to the source buffer in RAM - * @param len number of bytes to write - * @retval None - */ void flash_write(uint32_t offset, const uint8_t *data, uint32_t len) { FlashRomFns fns; @@ -136,13 +123,6 @@ void flash_write(uint32_t offset, const uint8_t *data, uint32_t len) __asm volatile ("msr primask, %0" :: "r" (primask)); } -/** - * @brief Read bytes from on-chip flash via the XIP memory map. - * @param offset byte offset from the start of flash - * @param out pointer to the destination buffer - * @param len number of bytes to read - * @retval None - */ void flash_read(uint32_t offset, uint8_t *out, uint32_t len) { const uint8_t *src = (const uint8_t *)(XIP_BASE + offset); diff --git a/drivers/0x0f_flash_cbm/Src/rp2350_reset.c b/drivers/0x0f_flash_cbm/Src/rp2350_reset.c index b70196c..b0e18e8 100644 --- a/drivers/0x0f_flash_cbm/Src/rp2350_reset.c +++ b/drivers/0x0f_flash_cbm/Src/rp2350_reset.c @@ -22,10 +22,6 @@ #include "rp2350_reset.h" -/** - * @brief Release IO_BANK0 from reset and wait until ready. - * @retval None - */ void reset_init_subsystem(void) { uint32_t value; diff --git a/drivers/0x0f_flash_cbm/Src/rp2350_reset_handler.c b/drivers/0x0f_flash_cbm/Src/rp2350_reset_handler.c index f38614c..3f59d42 100644 --- a/drivers/0x0f_flash_cbm/Src/rp2350_reset_handler.c +++ b/drivers/0x0f_flash_cbm/Src/rp2350_reset_handler.c @@ -56,20 +56,12 @@ static void _data_copy_init(void) *dst++ = *src++; } -/** - * @brief Initialize stack pointers and copy .data section to RAM. - * @retval None - */ void ram_init(void) { stack_init(); _data_copy_init(); } -/** - * @brief Reset handler entry point (naked, noreturn). - * @retval None - */ void __attribute__((naked, noreturn)) Reset_Handler(void) { __asm__ volatile ( diff --git a/drivers/0x0f_flash_cbm/Src/rp2350_stack.c b/drivers/0x0f_flash_cbm/Src/rp2350_stack.c index 0b94da4..9c328dc 100644 --- a/drivers/0x0f_flash_cbm/Src/rp2350_stack.c +++ b/drivers/0x0f_flash_cbm/Src/rp2350_stack.c @@ -21,10 +21,6 @@ #include "rp2350_stack.h" -/** - * @brief Initialize MSP, PSP, MSPLIM, and PSPLIM stack pointers. - * @retval None - */ void stack_init(void) { __asm__ volatile ( diff --git a/drivers/0x0f_flash_cbm/Src/rp2350_uart.c b/drivers/0x0f_flash_cbm/Src/rp2350_uart.c index 751a87b..44e67a9 100644 --- a/drivers/0x0f_flash_cbm/Src/rp2350_uart.c +++ b/drivers/0x0f_flash_cbm/Src/rp2350_uart.c @@ -79,20 +79,12 @@ static void _uart_enable(void) UART_BASE[UART_CR_OFFSET] = UART_CR_ENABLE; } -/** - * @brief Release UART0 from reset and wait until ready. - * @retval None - */ void uart_release_reset(void) { _uart_clear_reset_bit(); _uart_wait_reset_done(); } -/** - * @brief Initialize UART0 pins, baud rate, line control, and enable. - * @retval None - */ void uart_init(void) { _uart_configure_pins(); @@ -100,19 +92,11 @@ void uart_init(void) _uart_enable(); } -/** - * @brief Check whether a received byte is waiting in the UART FIFO. - * @retval bool true if at least one byte is available - */ bool uart_is_readable(void) { return (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) == 0; } -/** - * @brief Read one character from UART0 (blocking). - * @retval char the received character - */ char uart_getchar(void) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_RXFE_MASK) { @@ -120,11 +104,6 @@ char uart_getchar(void) return (char)(UART_BASE[UART_DR_OFFSET] & 0xFF); } -/** - * @brief Transmit one character over UART0 (blocking). - * @param c character to transmit - * @retval None - */ void uart_putchar(char c) { while (UART_BASE[UART_FR_OFFSET] & UART_FR_TXFF_MASK) { @@ -132,11 +111,6 @@ void uart_putchar(char c) UART_BASE[UART_DR_OFFSET] = (uint32_t)c; } -/** - * @brief Transmit a null-terminated string over UART0. - * @param str pointer to the string to send - * @retval None - */ void uart_puts(const char *str) { while (*str) { @@ -144,11 +118,6 @@ void uart_puts(const char *str) } } -/** - * @brief Convert a lowercase ASCII character to uppercase. - * @param c input character - * @retval char uppercase equivalent or original character - */ char uart_to_upper(char c) { if (c >= 'a' && c <= 'z') diff --git a/drivers/0x0f_flash_cbm/Src/rp2350_xosc.c b/drivers/0x0f_flash_cbm/Src/rp2350_xosc.c index b689487..3383559 100644 --- a/drivers/0x0f_flash_cbm/Src/rp2350_xosc.c +++ b/drivers/0x0f_flash_cbm/Src/rp2350_xosc.c @@ -22,10 +22,6 @@ #include "rp2350_xosc.h" -/** - * @brief Initialize the external crystal oscillator and wait until stable. - * @retval None - */ void xosc_init(void) { XOSC->STARTUP = 0x00C4U; @@ -34,10 +30,6 @@ void xosc_init(void) } } -/** - * @brief Enable the XOSC peripheral clock via CLK_PERI_CTRL. - * @retval None - */ void xosc_enable_peri_clk(void) { uint32_t value; @@ -48,10 +40,6 @@ void xosc_enable_peri_clk(void) CLOCKS->CLK_PERI_CTRL = value; } -/** - * @brief Switch CLK_REF source to XOSC for a stable 12 MHz clk_sys. - * @retval None - */ void xosc_set_clk_ref(void) { CLOCKS->CLK_REF_CTRL = CLK_REF_CTRL_SRC_XOSC; diff --git a/drivers/0x0f_flash_cbm/Src/vector_table.c b/drivers/0x0f_flash_cbm/Src/vector_table.c index 5d234c5..091894b 100644 --- a/drivers/0x0f_flash_cbm/Src/vector_table.c +++ b/drivers/0x0f_flash_cbm/Src/vector_table.c @@ -28,9 +28,6 @@ extern void Reset_Handler(void); typedef void (*vector_func_t)(void); -/** - * @brief Vector table placed in .vectors section - */ __attribute__((section(".vectors"), used)) const void *_vectors[2] = { &_stack_top,