CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

i2c_write_slave

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
reesesm2000



Joined: 18 Sep 2022
Posts: 12

View user's profile Send private message

i2c_write_slave
PostPosted: Thu Oct 13, 2022 2:46 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Oct 13, 2022 2:55 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Oct 14, 2022 1:36 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group