Function open

  • 打开SPI控制器,建立标准SPI总线

    Returns

    SPI总线对象

    Parameters

    • portId: SpiId

      SPI控制器ID

    • sclk: Byte

      用于SCLK的引脚编号

    • mosi: null | Byte

      用于MOSI的引脚编号

    • miso: null | Byte

      用于MISO的引脚编号

    • Optional dma: number

      DMA缓存大小, 0表示不启用

    Returns SpiBus