View previous topic :: View next topic |
Author |
Message |
reesesm2000
Joined: 18 Sep 2022 Posts: 12
|
i2c_write_slave |
Posted: Thu Oct 13, 2022 2:46 pm |
|
|
I found this comment in the Recent Changes page.
5.089 Added a new i2c_write_slave() function so slaves can push data to the master in an ISR without waiting
Looking at the latest manual dated Nov 2021, there is no mention of i2c_write_slave. How do I find out what this function actually does that is different to i2c_write? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Thu Oct 13, 2022 2:55 pm |
|
|
Two ways right off:
1. In the IDE click on the Question mark in the upper right corner then choose Index and search for I2C_WRITE_SLAVE
2. In the PICC directory double click the CCSC.CHM file then select Index and search. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19520
|
|
Posted: Fri Oct 14, 2022 1:36 am |
|
|
It is exactly the same as the I2c_write function, except it returns immediately.
The standard i2c_write, waits for the byte to be clocked out. Hence in an
ISR, when loading data that the master has requested, the old i2c_write
resulted in the ISR not exiting immediately. This one allows the ISR to
exit and the slave to get on with other things while the master reads this
byte.
As Jay says, the internal 'built in' manual does have it. |
|
|
|