isSPI_I2C_Idle

Top  Next

isSPI_I2C_Idle


Is SPI/I2C bus in Idle?

Since R2019b

 

Library: embeddedCreatorLib ( Dafulai Electronics) / Embedded SPI/I2C Bus Master / isSPI_I2C_Idle

 

 

isSPI_I2C_Idle

 

 


 

Description


 

Judge whether embedded SPI/I2C bus is in "Idle" State.

 

We do any "SPI/I2C bus access " must be under condition : Bus is in "Idle" State.

When embedded "SPI/I2C bus" is in "Idle" state, You can set up all sequences of writing/reading operation, and then bus will exit "Idle" state and  operate in sequences for writing/reading automatically.  We provide "this block" to check if all sequences finish.  In order to start new group of sequences operations next time, you must set  bus into "Idle" state when all sequences done.

 

Parameters


 

Please double click this block to open parameters dialog below:

 

isSPI_I2C_Idle_param

 

 

 

 

Let us explain parameters.

 

 

Peripheral  Number — tell system which SPI/I2C peripheral is used. You just choose from drop list items which are from block "emSPI_I2CMasterSetup".

 

bus type — tell system which bus is used. You just choose from drop list items: SPI bus and I2C bus.

 

Sample time in sec (-1 for inherited): — Sample time for this block. It is the same meaning as general Simulink block .

 

 

 

Ports


 

Input

 

None

 

 

Outport


 

None

 

 

Examples