diff --git a/docs/development_guide/build/doctrees/api_reference/api_overview.doctree b/docs/development_guide/build/doctrees/api_reference/api_overview.doctree index 75f7d882..35734501 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/api_overview.doctree and b/docs/development_guide/build/doctrees/api_reference/api_overview.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/bluetooth/api_ble.doctree b/docs/development_guide/build/doctrees/api_reference/bluetooth/api_ble.doctree index d76c4fb8..d6269f17 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/bluetooth/api_ble.doctree and b/docs/development_guide/build/doctrees/api_reference/bluetooth/api_ble.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/board.doctree b/docs/development_guide/build/doctrees/api_reference/board.doctree index bbd318d8..f2b0f7dc 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/board.doctree and b/docs/development_guide/build/doctrees/api_reference/board.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_adc.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_adc.doctree index 5b8c6310..6ab5ab22 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_adc.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_adc.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_clock.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_clock.doctree index ab94b4dc..9e723b73 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_clock.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_clock.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_dac.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_dac.doctree index e071a0a9..658aa960 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_dac.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_dac.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_dma.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_dma.doctree index 97e4a84f..a9720e08 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_dma.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_dma.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_gpio.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_gpio.doctree index e6843074..10042d60 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_gpio.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_gpio.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_i2c.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_i2c.doctree index 21b693df..9659be47 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_i2c.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_i2c.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_i2s.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_i2s.doctree new file mode 100644 index 00000000..27a011dd Binary files /dev/null and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_i2s.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_pwm.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_pwm.doctree index 12e414cd..c1f94a8f 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_pwm.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_pwm.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_spi.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_spi.doctree index 8eb0faaa..60a37ba3 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_spi.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_spi.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_timer.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_timer.doctree index 06cf0056..3aa2a268 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_timer.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_timer.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_uart.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_uart.doctree index b2f89664..ac1db127 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/api_uart.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_uart.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/api_usb.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/api_usb.doctree new file mode 100644 index 00000000..befebfd3 Binary files /dev/null and b/docs/development_guide/build/doctrees/api_reference/peripheral/api_usb.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/peripheral/index.doctree b/docs/development_guide/build/doctrees/api_reference/peripheral/index.doctree index e562ed31..8f9a0b7d 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/peripheral/index.doctree and b/docs/development_guide/build/doctrees/api_reference/peripheral/index.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/shell/api_shell.doctree b/docs/development_guide/build/doctrees/api_reference/shell/api_shell.doctree index 9eb93649..ecc1f4ca 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/shell/api_shell.doctree and b/docs/development_guide/build/doctrees/api_reference/shell/api_shell.doctree differ diff --git a/docs/development_guide/build/doctrees/api_reference/usb stack/api_usb_stack.doctree b/docs/development_guide/build/doctrees/api_reference/usb stack/api_usb_stack.doctree index b805e496..355f2bc0 100644 Binary files a/docs/development_guide/build/doctrees/api_reference/usb stack/api_usb_stack.doctree and b/docs/development_guide/build/doctrees/api_reference/usb stack/api_usb_stack.doctree differ diff --git a/docs/development_guide/build/doctrees/environment.pickle b/docs/development_guide/build/doctrees/environment.pickle index a253e8d4..624c0361 100644 Binary files a/docs/development_guide/build/doctrees/environment.pickle and b/docs/development_guide/build/doctrees/environment.pickle differ diff --git a/docs/development_guide/build/doctrees/get_started/Linux_quick_start_ubuntu.doctree b/docs/development_guide/build/doctrees/get_started/Linux_quick_start_ubuntu.doctree index b384730c..2790331e 100644 Binary files a/docs/development_guide/build/doctrees/get_started/Linux_quick_start_ubuntu.doctree and b/docs/development_guide/build/doctrees/get_started/Linux_quick_start_ubuntu.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/Windows_quick_start_cdk.doctree b/docs/development_guide/build/doctrees/get_started/Windows_quick_start_cdk.doctree index 6bf18fda..b4047710 100644 Binary files a/docs/development_guide/build/doctrees/get_started/Windows_quick_start_cdk.doctree and b/docs/development_guide/build/doctrees/get_started/Windows_quick_start_cdk.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/Windows_quick_start_eclipse.doctree b/docs/development_guide/build/doctrees/get_started/Windows_quick_start_eclipse.doctree index 68d138dc..7e1eacb0 100644 Binary files a/docs/development_guide/build/doctrees/get_started/Windows_quick_start_eclipse.doctree and b/docs/development_guide/build/doctrees/get_started/Windows_quick_start_eclipse.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/bl_dev_cube.doctree b/docs/development_guide/build/doctrees/get_started/bl_dev_cube.doctree index cb295fc7..279137ab 100644 Binary files a/docs/development_guide/build/doctrees/get_started/bl_dev_cube.doctree and b/docs/development_guide/build/doctrees/get_started/bl_dev_cube.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/cdk_ck_link.doctree b/docs/development_guide/build/doctrees/get_started/cdk_ck_link.doctree index 72dcf826..c7b0cf4f 100644 Binary files a/docs/development_guide/build/doctrees/get_started/cdk_ck_link.doctree and b/docs/development_guide/build/doctrees/get_started/cdk_ck_link.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/cdk_rv_debugger_plus.doctree b/docs/development_guide/build/doctrees/get_started/cdk_rv_debugger_plus.doctree index 5aa240f1..e309eee6 100644 Binary files a/docs/development_guide/build/doctrees/get_started/cdk_rv_debugger_plus.doctree and b/docs/development_guide/build/doctrees/get_started/cdk_rv_debugger_plus.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/cmake_quick_start.doctree b/docs/development_guide/build/doctrees/get_started/cmake_quick_start.doctree index a4a6618c..facdfefa 100644 Binary files a/docs/development_guide/build/doctrees/get_started/cmake_quick_start.doctree and b/docs/development_guide/build/doctrees/get_started/cmake_quick_start.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/connecting_hardware.doctree b/docs/development_guide/build/doctrees/get_started/connecting_hardware.doctree index dccab7ab..4a33c491 100644 Binary files a/docs/development_guide/build/doctrees/get_started/connecting_hardware.doctree and b/docs/development_guide/build/doctrees/get_started/connecting_hardware.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/get_started.doctree b/docs/development_guide/build/doctrees/get_started/get_started.doctree index fcce9621..90216bc4 100644 Binary files a/docs/development_guide/build/doctrees/get_started/get_started.doctree and b/docs/development_guide/build/doctrees/get_started/get_started.doctree differ diff --git a/docs/development_guide/build/doctrees/get_started/index.doctree b/docs/development_guide/build/doctrees/get_started/index.doctree index 55fc489d..6c3521d6 100644 Binary files a/docs/development_guide/build/doctrees/get_started/index.doctree and b/docs/development_guide/build/doctrees/get_started/index.doctree differ diff --git a/docs/development_guide/build/doctrees/index.doctree b/docs/development_guide/build/doctrees/index.doctree index 2c89e11a..d3c4531f 100644 Binary files a/docs/development_guide/build/doctrees/index.doctree and b/docs/development_guide/build/doctrees/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/ble_scan_demo.doctree b/docs/development_guide/build/doctrees/samples/advance samples/ble_scan_demo.doctree index ce8d7bf4..dca6baa1 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/ble_scan_demo.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/ble_scan_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/boot2_iap_info.doctree b/docs/development_guide/build/doctrees/samples/advance samples/boot2_iap_info.doctree index 9c0a82bc..85787372 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/boot2_iap_info.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/boot2_iap_info.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/fatfs_demo.doctree b/docs/development_guide/build/doctrees/samples/advance samples/fatfs_demo.doctree index b84801c4..8fb1c2ad 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/fatfs_demo.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/fatfs_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/lowpower_demo.doctree b/docs/development_guide/build/doctrees/samples/advance samples/lowpower_demo.doctree index 29d28728..11509836 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/lowpower_demo.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/lowpower_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/shell_demo.doctree b/docs/development_guide/build/doctrees/samples/advance samples/shell_demo.doctree index 106eebf7..2c001281 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/shell_demo.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/shell_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/usb/index.doctree b/docs/development_guide/build/doctrees/samples/advance samples/usb/index.doctree index 0dabd0d2..301ebdb4 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/usb/index.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/usb/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_audio.doctree b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_audio.doctree index fa699078..daeb1758 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_audio.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_audio.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_cdc.doctree b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_cdc.doctree index 8b318e0f..3d986168 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_cdc.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_cdc.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_hid.doctree b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_hid.doctree index 38d3f2ea..295c9279 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_hid.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_hid.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_msc.doctree b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_msc.doctree index 6605926d..7af86a33 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_msc.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_msc.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_video.doctree b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_video.doctree index aa027a03..780f84f6 100644 Binary files a/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_video.doctree and b/docs/development_guide/build/doctrees/samples/advance samples/usb/usbd_video.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/adc/adc_key_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/adc/adc_key_demo.doctree index a68added..6f4482c8 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/adc/adc_key_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/adc/adc_key_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/adc/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/adc/index.doctree index 84d75b55..86e81386 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/adc/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/adc/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/dma/dma_m2m_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/dma/dma_m2m_demo.doctree index 4b338bcd..df1d9e59 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/dma/dma_m2m_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/dma/dma_m2m_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/dma/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/dma/index.doctree index 19830616..5e9a9465 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/dma/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/dma/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/gpio/blink_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/gpio/blink_demo.doctree index b0ded823..b5a15d72 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/gpio/blink_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/gpio/blink_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/gpio/button_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/gpio/button_demo.doctree index ae41d22b..5ce3c241 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/gpio/button_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/gpio/button_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/gpio/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/gpio/index.doctree index 6aa58494..8a5957e0 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/gpio/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/gpio/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/i2c/i2c_eeprom_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/i2c/i2c_eeprom_demo.doctree index 2ef86116..fbb68845 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/i2c/i2c_eeprom_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/i2c/i2c_eeprom_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/i2c/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/i2c/index.doctree index e6211d49..1936d827 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/i2c/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/i2c/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/mtimer/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/mtimer/index.doctree index 3a06b0af..f0c87276 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/mtimer/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/mtimer/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/mtimer/mtimer_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/mtimer/mtimer_demo.doctree index 2ee0a766..eb6d5bc0 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/mtimer/mtimer_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/mtimer/mtimer_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/pwm/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/pwm/index.doctree index 096039c4..ec575fa5 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/pwm/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/pwm/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_breath_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_breath_demo.doctree index 003644ab..4558a70a 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_breath_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_breath_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_step_motor.doctree b/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_step_motor.doctree index a84fbab6..81f040a6 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_step_motor.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/pwm/pwm_step_motor.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/spi/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/spi/index.doctree index 906a6edf..3daf387b 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/spi/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/spi/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/spi/spi_lcd_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/spi/spi_lcd_demo.doctree index 588cca73..9539aabf 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/spi/spi_lcd_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/spi/spi_lcd_demo.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/uart/index.doctree b/docs/development_guide/build/doctrees/samples/basic samples/uart/index.doctree index 235dd382..191f5a70 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/uart/index.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/uart/index.doctree differ diff --git a/docs/development_guide/build/doctrees/samples/basic samples/uart/uart_loopback_demo.doctree b/docs/development_guide/build/doctrees/samples/basic samples/uart/uart_loopback_demo.doctree index c3b8920d..0bed5d7d 100644 Binary files a/docs/development_guide/build/doctrees/samples/basic samples/uart/uart_loopback_demo.doctree and b/docs/development_guide/build/doctrees/samples/basic samples/uart/uart_loopback_demo.doctree differ diff --git a/docs/development_guide/build/html/.buildinfo b/docs/development_guide/build/html/.buildinfo index a6a74b4d..694e335c 100644 --- a/docs/development_guide/build/html/.buildinfo +++ b/docs/development_guide/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: c1a44f4f683944084f04b029ea7630d0 +config: 5e2136c8889edd21ef4392d0839f5aa1 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/development_guide/build/html/_images/sipeed_rv_debugger_6.png b/docs/development_guide/build/html/_images/sipeed_rv_debugger_6.png new file mode 100644 index 00000000..e3c5e69b Binary files /dev/null and b/docs/development_guide/build/html/_images/sipeed_rv_debugger_6.png differ diff --git a/docs/development_guide/build/html/_images/sipeed_rv_debugger_7.png b/docs/development_guide/build/html/_images/sipeed_rv_debugger_7.png new file mode 100644 index 00000000..d825504e Binary files /dev/null and b/docs/development_guide/build/html/_images/sipeed_rv_debugger_7.png differ diff --git a/docs/development_guide/build/html/_images/sipeed_rv_debugger_8.png b/docs/development_guide/build/html/_images/sipeed_rv_debugger_8.png new file mode 100644 index 00000000..971389d8 Binary files /dev/null and b/docs/development_guide/build/html/_images/sipeed_rv_debugger_8.png differ diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_adc.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_adc.rst.txt index 72ecde47..39c00768 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_adc.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_adc.rst.txt @@ -82,7 +82,7 @@ ADC 设备接口全部遵循标准设备驱动管理层提供的接口。 **ADC_register** ^^^^^^^^^^^^^^^^^^^^^^^^ -``adc_register`` 用来注册一个 ADC 设备,注册该设备需要使用的标准接口,在注册之前需要打开对应 ADC 设备的宏定义。例如定义宏 ``BSP_USING_ADC0`` 方可使用 ``ADC0`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``ADC0`` 设备。 +``adc_register`` 用来注册 ADC 设备标准驱动接口,在注册之前需要打开对应 ADC 设备的宏定义。例如定义宏 ``BSP_USING_ADC0`` 方可使用 ``ADC0`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``ADC0`` 设备。 .. code-block:: C @@ -115,7 +115,7 @@ ADC 设备接口全部遵循标准设备驱动管理层提供的接口。 - dev 设备句柄 - oflag 设备的打开方式 -- return 错误码,0 表示打开成功,其他表示错误 +- return 错误码,0表示成功,其他表示失败 ``oflag`` 可以写入以下参数: @@ -138,7 +138,7 @@ ADC 设备接口全部遵循标准设备驱动管理层提供的接口。 int device_close(struct device *dev); - dev 设备句柄 -- return 错误码,0 表示关闭成功,其他表示错误 +- return 错误码,0表示成功,其他表示失败 **device_control** ^^^^^^^^^^^^^^^^^^^ diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_dma.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_dma.rst.txt index e551015e..9ad4d9d2 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_dma.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_dma.rst.txt @@ -213,7 +213,7 @@ DMA 设备接口全部遵循标准设备驱动管理层提供的接口。并且 **dma_register** ^^^^^^^^^^^^^^^^^^^^^^^^ -``dma_register`` 用来注册一个 DMA 设备的一个通道,注册该设备需要使用的标准接口,在注册之前需要打开对应 DMA 设备的通道宏定义。例如定义宏 ``BSP_USING_DMA_CH0`` 方可使用 ``DMA`` 设备的 0 通道,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``DMA`` 设备的 0 通道。 +``dma_register`` 用来注册 DMA 设备标准驱动接口,在注册之前需要打开对应 DMA 设备的通道宏定义。例如定义宏 ``BSP_USING_DMA_CH0`` 方可使用 ``DMA`` 设备的 0 通道,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``DMA`` 设备的 0 通道。 .. code-block:: C diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_i2c.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_i2c.rst.txt index 6dbcffc3..84df7e81 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_i2c.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_i2c.rst.txt @@ -71,7 +71,7 @@ I2C 设备标准接口当前仅使用 ``device_open`` , 并提供标准的数据 **i2c_register** ^^^^^^^^^^^^^^^^^^^^^^^^ -``i2c_register`` 用来注册一个 I2C 设备,注册该设备需要使用的标准接口,在注册之前需要打开对应 I2C 设备的宏定义。例如定义宏 ``BSP_USING_I2C0`` 方可使用 ``I2C0`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``I2C0`` 设备。 +``i2c_register`` 用来注册 I2C 设备标准驱动接口,在注册之前需要打开对应 I2C 设备的宏定义。例如定义宏 ``BSP_USING_I2C0`` 方可使用 ``I2C0`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``I2C0`` 设备。 .. code-block:: C diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_i2s.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_i2s.rst.txt new file mode 100644 index 00000000..adef075e --- /dev/null +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_i2s.rst.txt @@ -0,0 +1,271 @@ +I2S 设备 +========================= + +简介 +------------------------ +I2S (Inter—IC Sound) 总线, 又称集成电路内置音频总线,为数字音频设备之间的音频数据传输而制定的一种总线标准, +该总线专门用于音频设备之间的数据传输,广泛应用于各种多媒体系统。博流系列 MCU 中 I2S 设备具有以下特性: + +- 支持主模式以及从模式 +- 支持 Left-justified/Right-justified/DSP 等数据格式 +- 支持 8/16/24/32 比特数据宽度 +- 除单声道/双声道模式之外,同时支持四声道模式 +- 支持动态静音切换功能 +- 数据发送 FIFO 的宽度为 32 位,深度 16 +- 数据接收 FIFO 的宽度为 32 位,深度 16 + +I2S 设备结构体定义 +------------------------ + +.. code-block:: C + + typedef struct i2s_device { + struct device parent; + uint8_t id; + i2s_mode_t iis_mode; + interface_mode_t interface_mode; + uint32_t sampl_freq_hz; + i2s_channel_num_t channel_num; + i2s_frame_size_t frame_size; + i2s_data_size_t data_size; + uint8_t fifo_threshold; + void *tx_dma; + void *rx_dma; + } i2s_device_t; + +- parent 继承父类属性 +- id 外设 id 号, 0 表示 I2S0 +- iis_mode 主从模式选择 +- interface_mode 协议类型 +- sampl_freq_hz 音频数据采样率 +- channel_num 音频通道数,非 DSP 模式下最高 2 通道 +- frame_size 帧格式长度,即每个通道音频的 BCLK 个数 +- data_size 实际的有效音频数据位宽,不能大于 frame_size +- fifo_threshold 收发数据的 fifo 深度阈值 +- tx_dma 附加的发送 dma 句柄 +- rx_dma 附加的接收 dma 句柄 + +``iis_mode`` 提供以下类型 + +.. code-block:: C + + typedef enum { + I2S_MODE_MASTER = 0, /*!< I2S as master */ + I2S_MODE_SLAVE, /*!< I2S as slave */ + } i2s_mode_t; + +``interface_mode`` 提供以下类型 + +.. code-block:: C + + typedef enum { + I2S_MODE_STD, /*!< I2S STD Mode */ + I2S_MODE_LEFT, /*!< Left-Justified Mode */ + I2S_MODE_RIGHT, /*!< Right-Justified Mode */ + I2S_MODE_DSP_A, /*!< DSP/PCM Mode A*/ + I2S_MODE_DSP_B, /*!< DSP/PCM Mode B*/ + } interface_mode_t; + +``channel_num`` 提供以下类型 + +.. code-block:: C + + typedef enum { + I2S_FS_CHANNELS_NUM_MONO = 1, /*!< I2S frame is for 1 channels */ + I2S_FS_CHANNELS_NUM_2 = 2, /*!< I2S frame is for 2 channels */ + I2S_FS_CHANNELS_NUM_3 = 3, /*!< I2S frame is for 3 channels, DSP mode only, frame_size must equal data_size*/ + I2S_FS_CHANNELS_NUM_4 = 4, /*!< I2S frame is for 4 channels, DSP mode only, frame_size must equal data_size*/ + } i2s_channel_num_t; + +``frame_size`` 提供以下类型 + +.. code-block:: C + + typedef enum { + I2S_FRAME_LEN_8 = 1, /*!< I2S frame size 8 bits */ + I2S_FRAME_LEN_16 = 2, /*!< I2S frame size 16 bits */ + I2S_FRAME_LEN_24 = 3, /*!< I2S frame size 24 bits */ + I2S_FRAME_LEN_32 = 4, /*!< I2S frame size 32 bits */ + } i2s_frame_size_t; + +``data_size`` 提供以下类型 + +.. code-block:: C + + typedef enum { + I2S_DATA_LEN_8 = 1, /*!< I2S data size 8 bits */ + I2S_DATA_LEN_16 = 2, /*!< I2S data size 16 bits */ + I2S_DATA_LEN_24 = 3, /*!< I2S data size 24 bits */ + I2S_DATA_LEN_32 = 4, /*!< I2S data size 32 bits */ + } i2s_data_size_t; + +I2S 设备参数配置表 +------------------------ + +每一个 I2S 设备都有一个参数配置宏,宏定义位于 ``bsp/board/xxx`` 目录下 ``peripheral_config.h`` 文件, +因此无需用户自己定义变量。当用户打开对应设备的宏,该设备的配置才生效。 +例如打开宏 ``BSP_USING_I2S0`` ,``I2S0_CONFIG`` 即生效,同时 ``I2S0`` 设备就可以进行注册和使用了。 + +.. code-block:: C + + #if defined(BSP_USING_I2S0) + #ifndef I2S0_CONFIG + #define I2S0_CONFIG \ + { \ + .id = 0, \ + .iis_mode = I2S_MODE_MASTER, \ + .interface_mode = I2S_MODE_LEFT, \ + .sampl_freq_hz = 16 * 1000, \ + .channel_num = I2S_FS_CHANNELS_NUM_MONO, \ + .frame_size = I2S_FRAME_LEN_16, \ + .data_size = I2S_DATA_LEN_16, \ + .fifo_threshold = 8, \ + } + #endif + #endif + + static i2s_device_t i2sx_device[I2S_MAX_INDEX] = { + #ifdef BSP_USING_I2S0 + I2S0_CONFIG, + #endif + }; + +.. note:: 上述配置可以通过 ``I2S_DEV(dev)->xxx`` 进行修改,只能在调用 ``device_open`` 之前使用。 + +I2S 设备接口 +------------------------ + +I2S 设备接口全部遵循标准设备驱动管理层提供的接口。 + +**i2s_register** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``i2s_register`` 用来注册 I2S 标准驱动接口,在注册之前需要打开对应 I2S 设备的宏定义,例如定义宏 ``BSP_USING_I2S0`` 方可使用 I2S0 设备。注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 I2S 设备。 + +.. code-block:: C + + int i2s_register(enum i2s_index_type index, const char *name, uint16_t flag); + +- index 要注册的设备索引 +- name 为注册的设备命名 +- flag 默认可读可写属性 + +``index`` 用来选择 I2S 设备配置,一个 index 对应一个 I2S 设备配置,比如 ``I2S0_INDEX`` 对应 ``I2S0_CONFIG`` 配置。index 有如下可选类型 + +.. code-block:: C + + enum i2s_index_type { + #ifdef BSP_USING_I2S0 + I2S0_INDEX, + #endif + I2S_MAX_INDEX + }; + +**device_open** +^^^^^^^^^^^^^^^^ + +``device_open`` 用于设备的打开,``oflag`` 表示以何种方式打开。实际调用 ``i2s_open``。 + +.. code-block:: C + + int device_open(struct device *dev, uint16_t oflag); + + +- dev 设备句柄 +- oflag 设备的打开方式 +- return 错误码,0 表示打开成功,其他表示错误 + +``oflag`` 可以写入以下参数: + +.. code-block:: C + + #define DEVICE_OFLAG_STREAM_TX 0x001 /* 设备以轮训发送模式打开 */ + #define DEVICE_OFLAG_STREAM_RX 0x002 /* 设备以轮训接收模式打开 */ + #define DEVICE_OFLAG_DMA_TX 0x010 /* 设备以 DMA 发送模式打开 */ + #define DEVICE_OFLAG_DMA_RX 0x020 /* 设备以 DMA 接收模式打开 */ + +**device_close** +^^^^^^^^^^^^^^^^ + +``device_close`` 用于设备的关闭。实际调用 ``i2s_close``。 + +.. code-block:: C + + int device_close(struct device *dev); + +- dev 设备句柄 +- return 错误码,0 表示关闭成功,其他表示错误 + +**device_control** +^^^^^^^^^^^^^^^^^^^ + +``device_control`` 用于根据命令对设备进行控制和参数的修改。实际调用 ``i2s_control``。 + +.. code-block:: C + + int device_control(struct device *dev, int cmd, void *args); + +- dev 设备句柄 +- cmd 设备控制命令 +- args 控制参数 +- return 不同的控制命令返回的意义不同。 + +I2S 设备除了标准的控制命令,还具有自己特殊的控制命令。 + +.. code-block:: C + + #define I2S_GET_TX_FIFO_CMD 0x10 + #define I2S_GET_RX_FIFO_CMD 0x11 + +``args`` 根据不同的 ``cmd`` 传入不同,具体如下: + +.. list-table:: table1 + :widths: 15 10 30 + :header-rows: 1 + + * - cmd + - args + - description + * - DEVICE_CTRL_I2S_ATTACH_TX_DMA + - struct device* + - 链接发送 dma 设备 + * - DEVICE_CTRL_I2S_ATTACH_RX_DMA + - struct device* + - 链接接收 dma 设备 + * - DEVICE_CTRL_GET_CONFIG + - I2S_GET_TX_FIFO_CMD + - 获取 I2S 发送 fifo 未发数据量 + * - DEVICE_CTRL_GET_CONFIG + - I2S_GET_RX_FIFO_CMD + - 获取 I2S 接受 fifo 已收数据量 + +**device_write** +^^^^^^^^^^^^^^^^ + +``device_write`` 用于 I2S 设备数据的发送,考虑到效率,目前仅支持 DMA 模式发送。 + +.. code-block:: C + + int device_write(struct device *dev, uint32_t pos, const void *buffer, uint32_t size); + +- dev 设备句柄 +- pos 无作用 +- buffer 要写入的 buffer 缓冲区 +- size 要写入的长度 +- return 错误码,0 表示写入成功,其他表示错误 + +**device_read** +^^^^^^^^^^^^^^^^ + +``device_read`` 用于 I2S 设备数据的接收,考虑到效率,目前仅支持 DMA 模式接收。 + +.. code-block:: C + + int device_read(struct device *dev, uint32_t pos, void *buffer, uint32_t size); + +- dev 设备句柄 +- pos 无作用 +- buffer 要读入的 buffer 缓冲区 +- size 要读入的长度 +- return 错误码,0 表示读入成功,其他表示错误 + diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_pwm.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_pwm.rst.txt index 2793e307..5a85db07 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_pwm.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_pwm.rst.txt @@ -90,7 +90,7 @@ PWM 设备接口全部遵循标准设备驱动管理层提供的接口。并且 **pwm_register** ^^^^^^^^^^^^^^^^^^^^^^^^ -``pwm_register`` 用来注册一个 PWM 设备的一个通道,注册该设备需要使用的标准接口,在注册之前需要打开对应 PWM 设备某个通道的宏定义,例如定义 ``BSP_USING_PWM_CH0`` 方可使用 ``PWM`` 通道0 设备。注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 PWM 设备。 +``pwm_register`` 用来注册 PWM 设备的一个通道的标准驱动接口,在注册之前需要打开对应 PWM 设备某个通道的宏定义,例如定义 ``BSP_USING_PWM_CH0`` 方可使用 ``PWM`` 通道0 设备。注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 PWM 设备。 .. code-block:: C diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_spi.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_spi.rst.txt index 38cd3608..35561551 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_spi.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_spi.rst.txt @@ -133,7 +133,7 @@ SPI 设备接口全部遵循标准设备驱动管理层提供的接口。 **spi_register** ^^^^^^^^^^^^^^^^^^^^^^^^ -``spi_register`` 用来注册一个 SPI 设备,注册该设备需要使用的标准接口,在注册之前需要打开对应 SPI 设备的宏定义,例如定义宏 ``BSP_USING_SPI0`` 方可使用 SPI0 设备。注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 SPI 设备。 +``spi_register`` 用来注册 SPI 设备标准驱动接口,在注册之前需要打开对应 SPI 设备的宏定义,例如定义宏 ``BSP_USING_SPI0`` 方可使用 SPI0 设备。注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 SPI 设备。 .. code-block:: C diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_timer.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_timer.rst.txt index b4b1f3f9..327a82df 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_timer.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_timer.rst.txt @@ -120,7 +120,7 @@ TIMER 设备接口全部遵循标准设备驱动管理层提供的接口。 **timer_register** ^^^^^^^^^^^^^^^^^^^^^^^^ -``timer_register`` 用来注册一个 TIMER 设备,注册该设备需要使用的标准接口,在注册之前需要打开对应 TIMER 设备的宏定义。例如定义宏 ``BSP_USING_TIMER_CH0`` 方可使用 ``TIMER_CH0_INDEX`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``TIMER_CH0_INDEX`` 设备。 +``timer_register`` 用来注册 TIMER 设备标准驱动接口,在注册之前需要打开对应 TIMER 设备的宏定义。例如定义宏 ``BSP_USING_TIMER_CH0`` 方可使用 ``TIMER_CH0_INDEX`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``TIMER_CH0_INDEX`` 设备。 .. code-block:: C diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_uart.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_uart.rst.txt index d848bc23..33b0aebe 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_uart.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_uart.rst.txt @@ -121,7 +121,7 @@ UART 设备接口全部遵循标准设备驱动管理层提供的接口。 **uart_register** ^^^^^^^^^^^^^^^^^^^^^^^^ -``uart_register`` 用来注册一个 UART 设备,注册该设备需要使用的标准接口,在注册之前需要打开对应 UART 设备的宏定义。例如定义宏 ``BSP_USING_UART0`` 方可使用 ``UART0`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``UART0`` 设备。 +``uart_register`` 用来注册 UART 设备标准驱动接口,在注册之前需要打开对应 UART 设备的宏定义。例如定义宏 ``BSP_USING_UART0`` 方可使用 ``UART0`` 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ``UART0`` 设备。 .. code-block:: C diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/api_usb.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_usb.rst.txt new file mode 100644 index 00000000..1a7c8dea --- /dev/null +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/api_usb.rst.txt @@ -0,0 +1,412 @@ +USB 设备 +========================= + +简介 +------------------------ + +USB 通信串行总线(Universal Serial Bus)是一种外部总线标准,用于规范电脑和外部设备的连接和通讯,是应用在 PC 领域的接口技术。博流 BL70X 系列 MCU 中 USB 设备具有以下特性: + +- 支持 USB1.1 全速设备 +- 支持 8 个双向端点:EP0 可配置为控制/批量/中断/同步端点,EP1-EP7 可配置为批量/中断/同步端点 +- 每个端点均包含 TX、RX 两个方向的 FIFO,FIFO 深度 64 字节,并且支持 DMA +- 支持内部 transceiver +- 支持 suspend/resume +- 支持 LPM +- 支持多种 USB 中断配置 + +USB 设备结构体定义 +------------------------ + +.. code-block:: C + + typedef struct usb_dc_device { + struct device parent; + uint8_t id; + usb_dc_ep_state_t in_ep[8]; + usb_dc_ep_state_t out_ep[8]; + void *tx_dma; + void *rx_dma; + } usb_dc_device_t; + +- parent 继承父类属性 +- id USB id,0 表示 USB0 +- in_ep USB 输入端点的参数 +- out_ep USB 输出端点的参数 +- tx_dma 附加的发送 dma 句柄 +- rx_dma 附加的接收 dma 句柄 + + +``in_ep`` ``out_ep`` 的结构如下 + +.. code-block:: C + + typedef struct + { + uint8_t ep_ena; + uint32_t is_stalled; + struct usb_dc_ep_cfg ep_cfg; + } usb_dc_ep_state_t; + +- ep_ena 继承父类属性 +- is_stalled 挂起状态,0表示非挂起状态,1表示挂起状态 +- ep_cfg 端点的属性 + + +``ep_cfg`` 的结构如下 + +.. code-block:: C + + struct usb_dc_ep_cfg { + uint8_t ep_addr; + uint16_t ep_mps; + uint8_t ep_type; + }; + +- ep_addr 端点的地址 +- ep_mps 端点最大 packet 长度 +- ep_type 端点传输类型 + + +.. note:: 以上参数无需用户配置 + +USB 设备接口 +------------------------ + +USB 设备接口遵循标准设备驱动管理层提供的接口。 + +**usb_dc_register** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_register`` 用来注册 USB 设备标准驱动接口,在注册之前需要打开对应 USB 设备的宏定义,例如定义宏 ``BSP_USING_USB`` 方可使用 USB 设备。注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 USB 设备。 + +.. code-block:: C + + int usb_dc_register(enum usb_index_type index, const char *name, uint16_t flag); + +- index 要注册的设备索引 +- name 为注册的设备命名 +- flag 默认可读可写属性 +- return 错误码,0表示成功,其他表示失败 + +**device_open** +^^^^^^^^^^^^^^^^ + +``device_open`` 用于设备的打开,``oflag`` 表示以何种方式打开。实际调用 ``usb_open``。 + +.. code-block:: C + + int device_open(struct device *dev, uint16_t oflag); + +- dev 设备句柄 +- oflag 设备的打开方式 +- return 错误码,0表示成功,其他表示失败 + +**device_close** +^^^^^^^^^^^^^^^^ + +``device_close`` 用于设备的关闭。实际调用 ``usb_close``。 + +.. code-block:: C + + int device_close(struct device *dev); + +- dev 设备句柄 +- return 错误码,0表示成功,其他表示失败 + +**device_control** +^^^^^^^^^^^^^^^^^^^ + +``device_control`` 用于根据命令对设备进行控制和参数的修改。实际调用 ``usb_control``。 + +.. code-block:: C + + int device_control(struct device *dev, int cmd, void *args); + +- dev 设备句柄 +- cmd 设备控制命令 +- args 控制参数 +- return 错误码,0表示成功,其他表示失败 + +USB 设备除了标准的控制命令,还具有私有的控制命令。 + +.. list-table:: table1 + :widths: 15 10 30 + :header-rows: 1 + + * - cmd + - args + - description + * - DEVICE_CTRL_USB_DC_SET_ACK + - uint32_t + - 设置 USB 设备 ACK 状态 + * - DEVICE_CTRL_USB_DC_ENUM_ON + - NULL + - 打开 USB 设备枚举 + * - DEVICE_CTRL_USB_DC_ENUM_OFF + - NULL + - 关闭 USB 设备枚举 + * - DEVICE_CTRL_USB_DC_GET_EP_TX_FIFO_CNT + - uint32_t + - 设置 USB 设备发送 FIFO 的个数 + * - DEVICE_CTRL_USB_DC_GET_EP_RX_FIFO_CNT + - uint32_t + - 设置 USB 设备接收 FIFO 的个数 + * - DEVICE_CTRL_ATTACH_TX_DMA + - device* + - 设置 USB 设备发送 dma 句柄 + * - DEVICE_CTRL_ATTACH_RX_DMA + - device* + - 设置 USB 设备接收 dma 句柄 + * - DEVICE_CTRL_USB_DC_SET_TX_DMA + - uint32_t + - 开启 USB 设备通过 dma 发送 + * - DEVICE_CTRL_USB_DC_SET_RX_DMA + - uint32_t + - 开启 USB 设备通过 dma 接收 + +``args`` 支持的标准控制命令 ``cmd`` 具体如下: + +.. list-table:: table2 + :widths: 15 10 30 + :header-rows: 1 + + * - cmd + - args + - description + * - DEVICE_CTRL_SET_INT + - uint32_t + - 开启 USB 中断 + + +**device_write** +^^^^^^^^^^^^^^^^ + +``device_write`` 用于 USB 设备数据的发送,当前只支持同步传输 dma 发送,实际调用 ``usb_write``。 + +.. code-block:: C + + int device_write(struct device *dev, uint32_t pos, const void *buffer, uint32_t size); + +- dev 设备句柄 +- pos 无作用 +- buffer 要写入的 buffer 缓冲区 +- size 要写入的长度 +- return 错误码,0表示成功,其他表示失败 + +**device_read** +^^^^^^^^^^^^^^^^ + +``device_read`` 用于 USB 设备数据的接收,当前只支持同步传输 dma 接收。实际调用 ``usb_read``。 + +.. code-block:: C + + int device_read(struct device *dev, uint32_t pos, void *buffer, uint32_t size); + +- dev 设备句柄 +- pos 无作用 +- buffer 要读入的 buffer 缓冲区 +- size 要读入的长度 +- return 错误码,0表示成功,其他表示失败 + +**device_set_callback** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``device_set_callback`` 用于注册一个 USB 设备中断回调函数。 + +.. code-block:: C + + int device_set_callback(struct device *dev, void (*callback)(struct device *dev, void *args, uint32_t size, uint32_t event)); + +- dev 设备句柄 +- callback 要注册的中断回调函数 +- return 错误码,0表示成功,其他表示失败 + + - dev 设备句柄 + - args 接收发送缓冲区,数据类型为 uint8_t* + - size 传输长度 + - event 中断事件类型 + +USB 设备 ``event`` 类型如下 + +.. code-block:: C + + enum usb_dc_event_type { + /** USB error reported by the controller */ + USB_DC_EVENT_ERROR, + /** USB reset */ + USB_DC_EVENT_RESET, + /** Start of Frame received */ + USB_DC_EVENT_SOF, + /** USB connection established, hardware enumeration is completed */ + USB_DC_EVENT_CONNECTED, + /** USB configuration done */ + USB_DC_EVENT_CONFIGURED, + /** USB connection suspended by the HOST */ + USB_DC_EVENT_SUSPEND, + /** USB connection lost */ + USB_DC_EVENT_DISCONNECTED, + /** USB connection resumed by the HOST */ + USB_DC_EVENT_RESUME, + + /** setup packet received */ + USB_DC_EVENT_SETUP_NOTIFY, + /** ep0 in packet received */ + USB_DC_EVENT_EP0_IN_NOTIFY, + /** ep0 out packet received */ + USB_DC_EVENT_EP0_OUT_NOTIFY, + /** ep in packet except ep0 received */ + USB_DC_EVENT_EP_IN_NOTIFY, + /** ep out packet except ep0 received */ + USB_DC_EVENT_EP_OUT_NOTIFY, + /** Initial USB connection status */ + USB_DC_EVENT_UNKNOWN + }; + +**usb_dc_send_from_ringbuffer** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_send_from_ringbuffer`` 用于从 ringbuffer 中读取数据并通过某个端点将数据发送出去。 + +.. code-block:: C + + int usb_dc_send_from_ringbuffer(struct device *dev, Ring_Buffer_Type *rb, uint8_t ep); + +- dev 设备指针 +- rb rinbuffer 结构体指针 +- ep 端点地址 +- return 错误码,0表示成功,其他表示失败 + +**usb_dc_receive_to_ringbuffer** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_receive_to_ringbuffer`` 用于从某个端点接收数据并保存到 ringbuffer 中。 + +.. code-block:: C + + int usb_dc_receive_to_ringbuffer(struct device *dev, Ring_Buffer_Type *rb, uint8_t ep); + +- dev 设备指针 +- rb rinbuffer 结构体指针 +- ep 端点地址 +- return 错误码,0表示成功,其他表示失败 + +.. important:: 以下函数为 USB Device 协议栈需要实现的 porting 接口,用户无需在应用层调用。 + +.. _usb_dc_set_address: + +**usb_dc_set_address** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_set_address`` 用于 USB 设备地址的配置。 + +.. code-block:: C + + int usb_dc_set_address(const uint8_t addr); + +- addr USB 设备的地址 +- return 错误码,0表示成功,其他表示失败 + +.. _usb_dc_ep_open: + +**usb_dc_ep_open** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_ep_open`` 用于 USB 设备端点的开启。 + +.. code-block:: C + + int usb_dc_ep_open(const struct usbd_endpoint_cfg *ep_cfg); + +- ep_cfg 端点的属性 +- return 错误码,0表示成功,其他表示失败 + +.. _usb_dc_ep_close: + +**usb_dc_ep_close** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_ep_close`` 用于 USB 设备端点的关闭。 + +.. code-block:: C + + int usb_dc_ep_close(const uint8_t ep); + +- ep 端点地址 +- return 错误码,0表示成功,其他表示失败 + +.. _usb_dc_ep_set_stall: + +**usb_dc_ep_set_stall** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_ep_set_stall`` 用于 USB 设备挂起状态的设置,挂起状态下无法收发数据。 + +.. code-block:: C + + int usb_dc_ep_set_stall(const uint8_t ep); + +- ep 端点地址 +- return 错误码,0表示成功,其他表示失败 + +.. _usb_dc_ep_clear_stall: + +**usb_dc_ep_clear_stall** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_ep_clear_stall`` 用于端点挂起状态的清除,非挂起状态可以进行收发数据。 + +.. code-block:: C + + int usb_dc_ep_clear_stall(const uint8_t ep); + +- ep 端点地址 +- return 错误码,0表示成功,其他表示失败 + +.. _usb_dc_ep_is_stalled: + +**usb_dc_ep_is_stalled** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_ep_is_stalled`` 用于 USB 设备挂起状态的查询。 + +.. code-block:: C + + int usb_dc_ep_is_stalled(const uint8_t ep, uint8_t *stalled); + +- ep 端点id +- stalled 保存挂起状态的地址, 0 表示非挂起状态, 1 表示挂起状态 +- return 错误码,0表示成功,其他表示失败 + +.. _usb_dc_ep_write: + +**usb_dc_ep_write** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_ep_write`` 用于向某个端点发送数据。 + +.. code-block:: C + + int usb_dc_ep_write(const uint8_t ep, const uint8_t *data, uint32_t data_len, uint32_t *ret_bytes); + +- ep 端点地址 +- data 要发送的数据地址 +- data_len 要发送数据的长度 +- ret_bytes 实际成功发生的数据长度 +- return 错误码,0表示成功,其他表示失败 + +.. _usb_dc_ep_read: + +**usb_dc_ep_read** +^^^^^^^^^^^^^^^^^^^^^^^^ + +``usb_dc_ep_read`` 用于从某个端点接收数据。 + +.. code-block:: C + + int usb_dc_ep_read(const uint8_t ep, uint8_t *data, uint32_t max_data_len, uint32_t *read_bytes); + +- ep 端点地址 +- data 要接收数据的地址 +- data_len 要接收数据的长度,不能大于最大包长 +- ret_bytes 实际成功接收的数据长度 +- return 错误码,0表示成功,其他表示失败 diff --git a/docs/development_guide/build/html/_sources/api_reference/peripheral/index.rst.txt b/docs/development_guide/build/html/_sources/api_reference/peripheral/index.rst.txt index f786aab3..d03dbf83 100644 --- a/docs/development_guide/build/html/_sources/api_reference/peripheral/index.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/peripheral/index.rst.txt @@ -11,7 +11,9 @@ Peripheral PWM 设备 DMA 设备 I2C 设备 + I2S 设备 SPI 设备 ADC 设备 DAC 设备 - TIMER 设备 \ No newline at end of file + TIMER 设备 + USB 设备 \ No newline at end of file diff --git a/docs/development_guide/build/html/_sources/api_reference/usb stack/api_usb_stack.rst.txt b/docs/development_guide/build/html/_sources/api_reference/usb stack/api_usb_stack.rst.txt index e2015945..e03bc967 100644 --- a/docs/development_guide/build/html/_sources/api_reference/usb stack/api_usb_stack.rst.txt +++ b/docs/development_guide/build/html/_sources/api_reference/usb stack/api_usb_stack.rst.txt @@ -1,7 +1,7 @@ USB Stack ======================= -USB Stack 是一个跨平台的、用于嵌入式 MCU 的 USB 协议栈,该协议栈对标准设备请求、CLASS 请求、VENDOR 请求规范了一套统一的函数框架,从而对复合设备或者使用自定义设备类时,能够在极短的时间内进行添加和移植。此外,该协议栈代码优美,内存占用小(不使用静态数组),通用性非常高,提供了一套标准的 porting 接口,供给不同的 MCU 使用。其中,usb device 协议栈当前具有以下功能: +USB Stack 是一个跨平台的、用于嵌入式 MCU 的 USB 协议栈。其中 DEVICE 协议栈对标准设备请求、CLASS 请求、VENDOR 请求规范了一套统一的函数框架,从而对复合设备或者使用自定义设备类时,能够在极短的时间内进行添加和移植,提供了一套标准的 porting 接口,供给不同的 MCU 使用,因此,通用性非常高。此外在代码优美方面,以及内存占用方面也是相当出色。USB DEVICE 协议栈当前具有以下功能: - 支持 USB2.0 全速和高速设备 - 支持端点中断注册功能,porting 给用户自己处理中断里的数据 @@ -17,48 +17,46 @@ USB Stack 是一个跨平台的、用于嵌入式 MCU 的 USB 协议栈,该协 .. note:: USB DEVICE 协议栈的代码实现过程参考 ``_ -USB Device Porting 接口 ------------------------- +USB DEVICE 协议栈 porting 接口 +------------------------------- - USB Device Porting 接口在 ``usb_stack/common/usb_dc.h`` 文件中声明,用户根据自己的 MCU 进行实现 +USB DEVICE 协议栈 porting 接口在 ``usb_stack/common/usb_dc.h`` 文件中声明,用户根据自己的 MCU 实现以下接口 -**usbd_set_address** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + - ``usbd_set_address`` 调用 :ref:`usb_dc_set_address` + - ``usbd_ep_open`` 调用 :ref:`usb_dc_ep_open` + - ``usbd_ep_close`` 调用 :ref:`usb_dc_ep_close` + - ``usbd_ep_set_stall`` 调用 :ref:`usb_dc_ep_set_stall` + - ``usbd_ep_clear_stall`` 调用 :ref:`usb_dc_ep_clear_stall` + - ``usbd_ep_is_stalled`` 调用 :ref:`usb_dc_ep_is_stalled` + - ``usbd_ep_write`` 调用 :ref:`usb_dc_ep_write` + - ``usbd_ep_read`` 调用 :ref:`usb_dc_ep_read` -**usbd_ep_open** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -**usbd_ep_close** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -**usbd_ep_set_stall** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -**usbd_ep_clear_stall** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -**usbd_ep_is_stalled** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -**usbd_ep_write** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -**usbd_ep_read** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -**usbd_event_notify_handler** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -USB Device 应用层接口 ----------------------- - -USB Device 控制器接口 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +USB DEVICE 控制器接口 +------------------------------- **usb_dc_init** -"""""""""""""""""" +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +``usb_dc_init`` 用来注册 USB 设备和初始化 USB 硬件相关寄存器,注册 usb 中断回调函数。在注册之前需要打开对应 USB 设备的宏定义,例如定义宏 ``BSP_USING_USB`` 方可使用 USB 设备。 -USB Device 通用接口 +.. code-block:: C + + struct device *usb_dc_init(void) + { + usb_dc_register(USB_INDEX, "usb", DEVICE_OFLAG_RDWR); + usb = device_find("usb"); + device_set_callback(usb, usb_dc_event_callback); + device_open(usb, 0); + return usb; + } + +- device 返回 USB 设备句柄 + +.. note::中断处理函数则是调用 ``usbd_event_notify_handler`` + +USB DEVICE 应用层接口 +------------------------ + +USB DEVICE 通用接口 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **usbd_desc_register** diff --git a/docs/development_guide/build/html/_sources/get_started/get_started.rst.txt b/docs/development_guide/build/html/_sources/get_started/get_started.rst.txt index d298209d..8c95ed64 100644 --- a/docs/development_guide/build/html/_sources/get_started/get_started.rst.txt +++ b/docs/development_guide/build/html/_sources/get_started/get_started.rst.txt @@ -55,39 +55,54 @@ BL706_AVB 开发板如下图所示 Sipeed RV-Debugger plus **Windows** +^^^^^^^^^^^^^^^^^^^ -- Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将驱动更换为 ``Win USB`` 驱动 +Sipeed RV-Debugger Plus 调试器在 Windows 系统中所以时我们需要将驱动更换为 ``Win USB`` 驱动 - - 1. 首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,打开 PC 的设备管理器,在端口一栏可以看到调试器被识别为两个串口(*注:不是开发板上的串口*),或者在 ``通用串行总线控制器`` 看到 ``USB Serial Converter A`` 和 ``USB Serial Converter B`` - - .. important:: **注意:** 若在设备管理器中看到的串口名称为 “``USB 串行设备(COM*)``”,说明调试器进入了 ``Boot`` 模式。请将调试器断电重新上电,注意先不要将调试器连接到目标板;此时在到设备管理器中看是否正常 +- 1. 首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,打开 PC 的设备管理器,在端口一栏可以看到调试器被识别为两个串口(*注:不是开发板上的串口*),或者在 ``通用串行总线控制器`` 看到 ``USB Serial Converter A`` 和 ``USB Serial Converter B`` .. figure:: img/sipeed_rv_debugger_1.png .. figure:: img/sipeed_rv_debugger_4.png - - 2. 从 sipeed 网站下载 ``zadig-2.4`` 替换驱动程序。下载地址:`http://dl.sipeed.com/MAIX/tools/sipeed-rv-debugger/zadig-2.4.exe `_ - - 3. 下载好双击打开 ``zadig-2.4.exe``,选择 Options 勾选 List All Devices. + .. important:: 1. 调试器的端口号必须以 ``usb serial port`` 开头,如果插了多个类似的设备,请只留一个,确认调试器端口号 + .. important:: 2. 若在设备管理器中看到的串口名称为 “``USB 串行设备(COM*)``”,说明调试器进入了 ``Boot`` 模式。请将调试器断电重新上电,注意先不要将调试器连接到目标板;此时在到设备管理器中看是否正常 + + .. figure:: img/sipeed_rv_debugger_7.png + + .. important:: 3. 若在设备管理器中没有串口,显示其他设备,请到 `FTDI 官网 `_ 下载与系统匹配的驱动 + + .. figure:: img/sipeed_rv_debugger_6.png + +- 2. 以上都没有问题后,从 sipeed 网站下载 ``zadig-2.4`` 替换驱动程序。下载地址:`http://dl.sipeed.com/MAIX/tools/sipeed-rv-debugger/zadig-2.4.exe `_ +- 3. 下载好双击打开 ``zadig-2.4.exe``,选择 Options 勾选 List All Devices. .. figure:: img/sipeed_rv_debugger_3.png - - 4. 找到 JTAG Debugger(Interface 0),然后选择替换的驱动为 ``WinUSB`` 点击 Replace Driver 替换 - - 5. 再次打开设备管理器, 看到其中一个串口被替换成通用串行总线设备就说明安装成功 +- 4. 找到 JTAG Debugger(Interface 0),然后选择替换的驱动为 ``WinUSB`` 点击 Replace Driver 替换 +- 5. 再次打开设备管理器, 看到其中一个串口被替换成通用串行总线设备就说明安装成功 .. figure:: img/sipeed_rv_debugger_2.png - - 6. 到这里 Sipeed RV-Debugger Plus 的设备驱动就更换好了,接下来就可以愉快的玩耍啦~ +- 6. 到这里 Sipeed RV-Debugger Plus 的设备驱动就更换好了,接下来就可以愉快的玩耍啦~ **可能出现的问题:** .. caution:: 1. 调试器接上时没有出现两个串口,调试器上有一个 LED 常亮,那么应该是进入了 Boot 模式。请将调试器断电重新上电,注意先不要将调试器连接到目标板;调试器上电后,正常情况下两个 LED 灯会闪烁一下熄灭;此时再看一下任务管理器中的设备是否正确。 -.. caution:: 2. 在设备管理器中没有看到任何串口,但是在``通用串行总线控制器``中看到 ``USB Serial Converter A`` 和 ``USB Serial Converter B``;遇到这种情况,请到 `FTDI 官网 `_ 下载与系统匹配的驱动,将 ``USB Serial Converter B`` 重新安装为串口;``USB Serial Converter A`` 也即 Interface 0,使用 ``zadig-2.4.exe`` 替换为 WinUSB 驱动。 - -.. caution:: 3. 如果经过上面的操作还是不能正常使用,没有出现正确的现象,那么建议从 Sipeed 官方 `GitHub `_ 仓库获取固件,重新烧写;按住调试器上的 ``Boot`` 键不要释放,将调试器插入电脑上电,使调试器进入 Boot 模式,重新刷入固件后;断电重启 +.. caution:: 2. 如果经过上面的操作还是不能正常使用,没有出现正确的现象,那么建议从 Sipeed 官方 `GitHub `_ 仓库获取固件,重新烧写;按住调试器上的 ``Boot`` 键不要释放,将调试器插入电脑上电,使调试器进入 Boot 模式,重新刷入固件后;断电重启 **Linux** +^^^^^^^^^^^^^^^^^^^ + +- 首先,将调试器 Type-C USB 接口使用 USB 数据线连接到 PC 主机,执行以下命令,查看是否存在 + +.. code-block:: bash + + $ lsusb + +.. figure:: img/sipeed_rv_debugger_8.png - 安装 Openocd 及其需要的依赖项 diff --git a/docs/development_guide/build/html/_sources/samples/basic samples/gpio/index.rst.txt b/docs/development_guide/build/html/_sources/samples/basic samples/gpio/index.rst.txt index d5f7805f..07389aeb 100644 --- a/docs/development_guide/build/html/_sources/samples/basic samples/gpio/index.rst.txt +++ b/docs/development_guide/build/html/_sources/samples/basic samples/gpio/index.rst.txt @@ -7,4 +7,4 @@ GPIO 示例 :maxdepth: 1 GPIO 输出 - 流水灯 - GPIO 中断 - 流水灯 \ No newline at end of file + GPIO 中断 - 按键检测 \ No newline at end of file diff --git a/docs/development_guide/build/html/_static/documentation_options.js b/docs/development_guide/build/html/_static/documentation_options.js index 163682bc..caf9f71d 100644 --- a/docs/development_guide/build/html/_static/documentation_options.js +++ b/docs/development_guide/build/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.3', + VERSION: '0.2', LANGUAGE: 'zh_CN', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/development_guide/build/html/api_reference/api_overview.html b/docs/development_guide/build/html/api_reference/api_overview.html index 5bec607f..6e480d9e 100644 --- a/docs/development_guide/build/html/api_reference/api_overview.html +++ b/docs/development_guide/build/html/api_reference/api_overview.html @@ -7,7 +7,7 @@ - 1. API 概述 — BL_MCU_SDK 开发指南 0.3 文档 + 1. API 概述 — BL_MCU_SDK 开发指南 0.2 文档 @@ -64,7 +64,7 @@
- 0.3 + 0.2
diff --git a/docs/development_guide/build/html/api_reference/bluetooth/api_ble.html b/docs/development_guide/build/html/api_reference/bluetooth/api_ble.html index 582ccb62..642d0043 100644 --- a/docs/development_guide/build/html/api_reference/bluetooth/api_ble.html +++ b/docs/development_guide/build/html/api_reference/bluetooth/api_ble.html @@ -7,7 +7,7 @@ - 6. BLE — BL_MCU_SDK 开发指南 0.3 文档 + 6. BLE — BL_MCU_SDK 开发指南 0.2 文档 @@ -64,7 +64,7 @@
- 0.3 + 0.2
diff --git a/docs/development_guide/build/html/api_reference/board.html b/docs/development_guide/build/html/api_reference/board.html index a05bc537..825d7d2f 100644 --- a/docs/development_guide/build/html/api_reference/board.html +++ b/docs/development_guide/build/html/api_reference/board.html @@ -7,7 +7,7 @@ - 2. Board 配置系统 — BL_MCU_SDK 开发指南 0.3 文档 + 2. Board 配置系统 — BL_MCU_SDK 开发指南 0.2 文档 @@ -64,7 +64,7 @@
- 0.3 + 0.2
diff --git a/docs/development_guide/build/html/api_reference/peripheral/api_adc.html b/docs/development_guide/build/html/api_reference/peripheral/api_adc.html index 3f83bb12..f5d90f21 100644 --- a/docs/development_guide/build/html/api_reference/peripheral/api_adc.html +++ b/docs/development_guide/build/html/api_reference/peripheral/api_adc.html @@ -7,7 +7,7 @@ - 3.8. ADC 设备 — BL_MCU_SDK 开发指南 0.3 文档 + 3.9. ADC 设备 — BL_MCU_SDK 开发指南 0.2 文档 @@ -39,8 +39,8 @@ - - + + @@ -64,7 +64,7 @@
- 0.3 + 0.2
@@ -108,24 +108,26 @@
  • 3.4. PWM 设备
  • 3.5. DMA 设备
  • 3.6. I2C 设备
  • -
  • 3.7. SPI 设备
  • -
  • 3.8. ADC 设备
    -

    3.8.3. ADC 设备参数配置表

    +

    3.9.3. ADC 设备参数配置表

    每一个 ADC 设备都有一个参数配置宏,宏定义位于 bsp/board/xxx 目录下 peripheral_config.h 文件,变量定义位于 hal_adc.c 中,因此无需用户自己定义变量。当用户打开对应设备的宏,该设备的配置才生效。例如打开宏 BSP_USING_ADC0 即生效,同时 ADC 设备就可以进行注册和使用了。

    /*参数配置宏*/
     #if defined(BSP_USING_ADC0)
    @@ -297,11 +299,11 @@
     
    -

    3.8.4. ADC 设备接口

    +

    3.9.4. ADC 设备接口

    ADC 设备接口全部遵循标准设备驱动管理层提供的接口。

    -

    3.8.4.1. ADC_register

    -

    adc_register 用来注册一个 ADC 设备,注册该设备需要使用的标准接口,在注册之前需要打开对应 ADC 设备的宏定义。例如定义宏 BSP_USING_ADC0 方可使用 ADC0 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ADC0 设备。

    +

    3.9.4.1. ADC_register

    +

    adc_register 用来注册 ADC 设备标准驱动接口,在注册之前需要打开对应 ADC 设备的宏定义。例如定义宏 BSP_USING_ADC0 方可使用 ADC0 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 ADC0 设备。

    int ADC_register(enum ADC_index_type index, const char *name, uint16_t flag);
     
    @@ -322,7 +324,7 @@
    -

    3.8.4.2. device_open

    +

    3.9.4.2. device_open

    device_open 用于 ADC 设备的打开,oflag 表示以何种方式打开。实际调用 adc_open

    int device_open(struct device *dev, uint16_t oflag);
     
    @@ -330,7 +332,7 @@
    • dev 设备句柄

    • oflag 设备的打开方式

    • -
    • return 错误码,0 表示打开成功,其他表示错误

    • +
    • return 错误码,0表示成功,其他表示失败

    oflag 可以写入以下参数:

    #define DEVICE_OFLAG_STREAM_TX  0x001 /* 设备以轮训发送模式打开 */
    @@ -343,18 +345,18 @@
     
    -

    3.8.4.3. device_close

    +

    3.9.4.3. device_close

    device_close 用于设备的关闭。实际调用 adc_close

    int device_close(struct device *dev);
     
    • dev 设备句柄

    • -
    • return 错误码,0 表示关闭成功,其他表示错误

    • +
    • return 错误码,0表示成功,其他表示失败

    -

    3.8.4.4. device_control

    +

    3.9.4.4. device_control

    device_control 用于根据命令对 ADC 设备进行控制和参数的修改。实际调用 adc_control

    int device_control(struct device *dev, int cmd, void *args);
     
    @@ -437,7 +439,7 @@
    -

    3.8.4.5. device_read

    +

    3.9.4.5. device_read

    device_read 用于 ADC 设备数据的接收,接收方式根据打开方式可以是轮询、中断、dma。实际调用 adc_read

    int device_read(struct device *dev, uint32_t pos, void *buffer, uint32_t size);
     
    @@ -451,7 +453,7 @@
    -

    3.8.4.6. device_set_callback

    +

    3.9.4.6. device_set_callback

    device_set_callback 用于注册一个ADC阈值中断回调函数。

    int device_set_callback(struct device *dev, void (*callback)(struct device *dev, void *args, uint32_t size, uint32_t event));
     
    @@ -488,8 +490,8 @@
  • 4. Shell
  • diff --git a/docs/development_guide/build/html/api_reference/peripheral/api_dac.html b/docs/development_guide/build/html/api_reference/peripheral/api_dac.html index abca4d12..c67c633e 100644 --- a/docs/development_guide/build/html/api_reference/peripheral/api_dac.html +++ b/docs/development_guide/build/html/api_reference/peripheral/api_dac.html @@ -7,7 +7,7 @@ - 3.9. DAC 设备 — BL_MCU_SDK 开发指南 0.3 文档 + 3.10. DAC 设备 — BL_MCU_SDK 开发指南 0.2 文档 @@ -39,8 +39,8 @@ - - + + @@ -64,7 +64,7 @@
    - 0.3 + 0.2
    @@ -108,16 +108,18 @@
  • 3.4. PWM 设备
  • 3.5. DMA 设备
  • 3.6. I2C 设备
  • -
  • 3.7. SPI 设备
  • -
  • 3.8. ADC 设备
  • -
  • 3.9. DAC 设备
  • 4. Shell
  • @@ -193,7 +195,7 @@
  • 3. Peripheral »
  • -
  • 3.9. DAC 设备
  • +
  • 3.10. DAC 设备
  • @@ -213,18 +215,18 @@
    -

    3.9. DAC 设备

    +

    3.10. DAC 设备

    -

    3.9.1. 简介

    +

    3.10.1. 简介

    -

    3.9.2. DAC 设备结构体定义

    +

    3.10.2. DAC 设备结构体定义

    -

    3.9.3. DAC 设备参数配置表

    +

    3.10.3. DAC 设备参数配置表

    -

    3.9.4. DAC 设备接口

    +

    3.10.4. DAC 设备接口

    @@ -234,8 +236,8 @@

    diff --git a/docs/development_guide/build/html/api_reference/peripheral/api_dma.html b/docs/development_guide/build/html/api_reference/peripheral/api_dma.html index 87b8bba4..4e996670 100644 --- a/docs/development_guide/build/html/api_reference/peripheral/api_dma.html +++ b/docs/development_guide/build/html/api_reference/peripheral/api_dma.html @@ -7,7 +7,7 @@ - 3.5. DMA 设备 — BL_MCU_SDK 开发指南 0.3 文档 + 3.5. DMA 设备 — BL_MCU_SDK 开发指南 0.2 文档 @@ -64,7 +64,7 @@
    - 0.3 + 0.2
    @@ -126,10 +126,12 @@
  • 3.6. I2C 设备
  • -
  • 3.7. SPI 设备
  • -
  • 3.8. ADC 设备
  • -
  • 3.9. DAC 设备
  • -
  • 3.10. TIMER 设备
  • +
  • 3.7. I2S 设备
  • +
  • 3.8. SPI 设备
  • +
  • 3.9. ADC 设备
  • +
  • 3.10. DAC 设备
  • +
  • 3.11. TIMER 设备
  • +
  • 3.12. USB 设备
  • 4. Shell
  • @@ -419,7 +421,7 @@

    DMA 设备接口全部遵循标准设备驱动管理层提供的接口。并且为了方便用户调用,将某些标准接口使用宏来重定义。

    3.5.4.1. dma_register

    -

    dma_register 用来注册一个 DMA 设备的一个通道,注册该设备需要使用的标准接口,在注册之前需要打开对应 DMA 设备的通道宏定义。例如定义宏 BSP_USING_DMA_CH0 方可使用 DMA 设备的 0 通道,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 DMA 设备的 0 通道。

    +

    dma_register 用来注册 DMA 设备标准驱动接口,在注册之前需要打开对应 DMA 设备的通道宏定义。例如定义宏 BSP_USING_DMA_CH0 方可使用 DMA 设备的 0 通道,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 DMA 设备的 0 通道。

    int dma_register(enum dma_index_type index, const char *name, uint16_t flag);
     
    diff --git a/docs/development_guide/build/html/api_reference/peripheral/api_gpio.html b/docs/development_guide/build/html/api_reference/peripheral/api_gpio.html index 5eeacff7..aca33081 100644 --- a/docs/development_guide/build/html/api_reference/peripheral/api_gpio.html +++ b/docs/development_guide/build/html/api_reference/peripheral/api_gpio.html @@ -7,7 +7,7 @@ - 3.2. GPIO 设备 — BL_MCU_SDK 开发指南 0.3 文档 + 3.2. GPIO 设备 — BL_MCU_SDK 开发指南 0.2 文档 @@ -64,7 +64,7 @@
    - 0.3 + 0.2
    @@ -120,10 +120,12 @@
  • 3.4. PWM 设备
  • 3.5. DMA 设备
  • 3.6. I2C 设备
  • -
  • 3.7. SPI 设备
  • -
  • 3.8. ADC 设备
  • -
  • 3.9. DAC 设备
  • -
  • 3.10. TIMER 设备
  • +
  • 3.7. I2S 设备
  • +
  • 3.8. SPI 设备
  • +
  • 3.9. ADC 设备
  • +
  • 3.10. DAC 设备
  • +
  • 3.11. TIMER 设备
  • +
  • 3.12. USB 设备
  • 4. Shell
  • diff --git a/docs/development_guide/build/html/api_reference/peripheral/api_i2c.html b/docs/development_guide/build/html/api_reference/peripheral/api_i2c.html index 3ef13524..56390bab 100644 --- a/docs/development_guide/build/html/api_reference/peripheral/api_i2c.html +++ b/docs/development_guide/build/html/api_reference/peripheral/api_i2c.html @@ -7,7 +7,7 @@ - 3.6. I2C 设备 — BL_MCU_SDK 开发指南 0.3 文档 + 3.6. I2C 设备 — BL_MCU_SDK 开发指南 0.2 文档 @@ -39,7 +39,7 @@ - + @@ -64,7 +64,7 @@
    - 0.3 + 0.2
    @@ -119,10 +119,12 @@ -
  • 3.7. SPI 设备
  • -
  • 3.8. ADC 设备
  • -
  • 3.9. DAC 设备
  • -
  • 3.10. TIMER 设备
  • +
  • 3.7. I2S 设备
  • +
  • 3.8. SPI 设备
  • +
  • 3.9. ADC 设备
  • +
  • 3.10. DAC 设备
  • +
  • 3.11. TIMER 设备
  • +
  • 3.12. USB 设备
  • 4. Shell
  • @@ -284,7 +286,7 @@

    I2C 设备标准接口当前仅使用 device_open , 并提供标准的数据收发接口。

    3.6.4.1. i2c_register

    -

    i2c_register 用来注册一个 I2C 设备,注册该设备需要使用的标准接口,在注册之前需要打开对应 I2C 设备的宏定义。例如定义宏 BSP_USING_I2C0 方可使用 I2C0 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 I2C0 设备。

    +

    i2c_register 用来注册 I2C 设备标准驱动接口,在注册之前需要打开对应 I2C 设备的宏定义。例如定义宏 BSP_USING_I2C0 方可使用 I2C0 设备,注册完成以后才可以使用其他接口,如果没有定义宏,则无法使用 I2C0 设备。

    int i2c_register(enum i2c_index_type index, const char *name, uint16_t flag);
     
    @@ -376,7 +378,7 @@