[[ファームウェア関数一覧>ファームウェア関数一覧#aa40dd64]]
*I2S_Init [#cb598e7c]
#contents
**ヘッダ宣言 [#iede0e13]

**関数プロトタイプ [#a647c501]
 void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct)
**動作 [#q2d2d172]
-SPIx/I2Sx周辺回路のI2Sモード時の設定をします。
**引数 [#q25c28ce]
-SPIx&br;
#include(Macro/SPIxI2S,notitle)
-I2S_InitStruct&br;
'''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
#include(Macro/I2S_Mode,notitle)
--I2S_Standard
#include(Macro/I2S_Standard,notitle)
--I2S_DataFormat
#include(Macro/I2S_DataFormat,notitle)
--I2S_MCLKOutput
#include(Macro/I2S_MCLKOutput,notitle)
--I2S_AudioFreq
#include(Macro/I2S_AudioFreq,notitle)
--I2S_CPOL
#include(Macro/I2S clock idle state,notitle)
#include(Macro/I2S_CPOL,notitle)

**出力値 [#z3526490]
-無し
**戻り値 [#b33abbbe]
-無し
**場所 [#z0443c99]
**呼び出し関数 [#g2035a47]
-無し
**サンプル [#c875551f]
 /* 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);
**参照 [#i588a8db]
-

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS