cancel
Showing results for 
Search instead for 
Did you mean: 

What is I2C Enable Listen do?

achin
Associate II
Posted on March 09, 2017 at 21:44

What exactly does this mode do? I see it in the API, but I see no explanation of what it does. 

3 REPLIES 3
john doe
Lead
Posted on March 10, 2017 at 05:25

its for slave mode. it is described in the user manual.

Enable/disable the Address listen mode in slave I2C mode using

HAL_I2C_EnableListen

_IT() HAL_I2C_DisableListen_IT()

When address slave I2C match, HAL_I2C_AddrCallback() is executed and

user can add his own code to check the Address Match Code and the

transmission direction request by master (Write/Read).

At Listen mode end HAL_I2C_ListenCpltCallback() is executed and user can

add his own code by customization of function pointer

HAL_I2C_ListenCpltCallback()

achin
Associate II
Posted on June 02, 2017 at 20:52

For example when you use a range of addresses where the address contains also a command.