How to send a non constant buffer over i2c?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to send a non constant buffer over i2c?

ソリューションへジャンプ
528件の閲覧回数
coder_72
Contributor I

Hello everybody,

i have a question about the MCUXPRESSO SDK. Can i send a non constant buffer(uint8_t) as a I2C Slave? I do not found a function to send a uint8_t buffer from a slave to master after a master request.

Thanks for your answers.

ラベル(2)
0 件の賞賛
返信
1 解決策
499件の閲覧回数
frank_m
Senior Contributor III

No, you can't.

I2C is a bus with a strict master-slave design. Only the master device can initiate transfers.

> Can i send a non constant buffer ...

I assume with "non constant" you mean of onknown length.
The usual method here is to execute consecutive (multi-byte) reads until the slave device returns NACK.

I2C memory and MEMS sensor devices are good examples for such protocols.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
500件の閲覧回数
frank_m
Senior Contributor III

No, you can't.

I2C is a bus with a strict master-slave design. Only the master device can initiate transfers.

> Can i send a non constant buffer ...

I assume with "non constant" you mean of onknown length.
The usual method here is to execute consecutive (multi-byte) reads until the slave device returns NACK.

I2C memory and MEMS sensor devices are good examples for such protocols.

0 件の賞賛
返信