Jump to content
Sign in to follow this  
dspdon

Wire library missing setClock or setSpeed?

Recommended Posts

I am failing to compile some legacy Arduino projects that call Wire.setClock() (or Wire.setSpeed()).

 

Are these unsupported in the Energia IDE library implementations?

 

I looked but didn't find them in $\hardware\cc3200\libraries\Wire\Wire.c or Wire.h.

 

How else to set 400kHz I2C operation (vs default 100 kHz)?

 

--Don

 

Share this post


Link to post
Share on other sites
A review of Arduino Wire lib shows the public declaration:

    void setClock(uint32_t);

 

and something rather hardware-specific in the implementation, e.g.,


   void TwoWire::setClock(uint32_t frequency) {

     TWBR = ((F_CPU / frequency) - 16) / 2;           // <-- specific to AVR

   }

 

I'm new to the RBL CC3200 device I'm attempting to bring-up.  If anyone has modified the I2C bus speed on this device, I'll be happy to get your input.  My need is for a write-once setting at system initialization, nothing dynamic.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...