5. 外设与示例说明
下表列出 Nsing.N32G41x_Library 中每个外设与功能模块的驱动文件及示例数量,点击外设名称进入对应小节。各示例支持的型号、开发环境与接线方式以示例目录中的 readme.txt 为准。
| 外设 / 分类 | 示例数 | 主要驱动文件 |
|---|---|---|
| ADC | 9 | n32g41x_adc.h / n32g41x_adc.c |
| bxCAN | 2 | n32g41x_can.h / n32g41x_can.c |
| COMP | 2 | n32g41x_comp.h / n32g41x_comp.c |
| Cortex-M4 | 2 | CMSIS Core |
| CRC | 2 | n32g41x_crc.h / n32g41x_crc.c |
| DMA | 1 | n32g41x_dma.h / n32g41x_dma.c |
| EXTI | 1 | n32g41x_exti.h / n32g41x_exti.c |
| Flash | 2 | n32g41x_flash.h / n32g41x_flash.c |
| FreeRTOS | 1 | FreeRTOS-Kernel |
| GPIO | 2 | n32g41x_gpio.h / n32g41x_gpio.c |
| I2C | 10 | n32g41x_i2c.h / n32g41x_i2c.c |
| I2S | 6 | n32g41x_spi.h / n32g41x_spi.c |
| IWDG | 1 | n32g41x_iwdg.h / n32g41x_iwdg.c |
| NVIC | 3 | misc.h / misc.c |
| OPAMP | 2 | n32g41x_opamp.h / n32g41x_opamp.c |
| PWR | 3 | n32g41x_pwr.h / n32g41x_pwr.c |
| RCC | 1 | n32g41x_rcc.h / n32g41x_rcc.c |
| RTC | 5 | n32g41x_rtc.h / n32g41x_rtc.c |
| SPI | 8 | n32g41x_spi.h / n32g41x_spi.c |
| TIM | 18 | n32g41x_tim.h / n32g41x_tim.c |
| USART | 19 | n32g41x_usart.h / n32g41x_usart.c |
| WWDG | 1 | n32g41x_wwdg.h / n32g41x_wwdg.c |
| DBG | 无独立 Demo | n32g41x_dbg.h / n32g41x_dbg.c |
示例数按含 MDK-ARM、EWARM 或 GCC 构建工程的示例入口统计,共 101 个:只在父目录提供说明文件的成对子工程(如 SPI/SPI_9Bit)计为 1 个;子工程各自带说明文件时(如 I2S/I2S_DMA 下的主、从工程)分别计数;无工程的共享代码目录(如 RTC/Common)不计。I2S 与 SPI 共用 n32g41x_spi.h,I2S 小节收录 I2S_ 前缀的函数;Cortex-M4 与 FreeRTOS 没有对应的标准外设驱动,API 节说明接口来源。