ファームウェア関数一覧

I2S_Init

ヘッダ宣言

関数プロトタイプ

void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct)

動作

  • SPIx/I2Sx周辺回路のI2Sモード時の設定をします。

引数

  • SPIx
    SPIx説明
    SPI2SPI2を選択
    SPI3SPI3を選択
  • I2S_InitStruct
    stm32f10x_spi.hで定義されているI2S_InitTypeDef構造体へのポインタです。
    typedef struct
    {
     uint16_t I2S_Mode;
     uint16_t I2S_Standard;
     uint16_t I2S_DataFormat;
     uint16_t I2S_MCLKOutput;
     uint16_t I2S_AudioFreq;
     uint16_t I2S_CPOL;
    } I2S_InitTypeDef;
    • I2S_Mode
      I2S_Mode説明
      I2S_Mode_SlaveTxI2S peripheral is configured as Slave and Transmitter
      I2S_Mode_SlaveRxI2S peripheral is configured as Slave and Receiver
      I2S_Mode_MasterTxI2S peripheral is configured as Master and Transmitter
      I2S_Mode_MasterRxI2S peripheral is configured as Master and Receiver
    • I2S_Standard
      I2S_Standard説明
      I2S_Standardd_PhillipsUses the Phillips I2S standard
      I2S_Standard_MSB Usesthe MSB standard
      I2S_Standard_LSB Usesthe LSB standard
      I2S_Standard_PCMShortUses PCM mode with short frame
      I2S_Standard_PCMLongUses PCM mode with long frame
    • I2S_DataFormat
      I2S_DataFormat説明
      I2S_DataFormat_16bData are 16 bits long in 16 bits packet frame
      I2S_DataFormat_16bextendedData are 16 bits long in 32 bits packet frame
      I2S_DataFormat_24bData are 24 bits long in 32 bits packet frame
      I2S_DataFormat_32bData are 32 bits long in 32 bits packet frame
    • I2S_MCLKOutput #include(): Limit exceeded: Macro/I2S_MCLKOutput
    • I2S_AudioFreq #include(): Limit exceeded: Macro/I2S_AudioFreq
    • I2S_CPOL #include(): Limit exceeded: Macro/I2S_CPOL

出力値

  • 無し

戻り値

  • 無し

場所

呼び出し関数

  • 無し

サンプル

/* Initialize the SPI2 according to the I2S_InitStructure members */
I2S_InitTypeDef I2S_InitStructure;
I2S_InitStructure.I2S_Mode = I2S_Mode_MasterTx;
I2S_InitStructure.I2S_Standard = I2S_Standard_Phillips;
I2S_InitStructure.I2S_DataFormat = I2S__DataFormat_16bextended;
I2S_InitStructure.I2S_MCLKOutput = I2S_MCLKOutput_Enable;
I2S_InitStructure.I2S_AudioFreq = I2S_AudioFreq_16K;
I2S_InitStructure.I2S_CPOL = SPI_CPOL_Low;
I2S_Init(SPI2, &I2S_InitStructure);

参照


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2011-04-26 (火) 22:52:44