AnsweredAssumed Answered

K66 and Teensy 3.6 software issue

Question asked by Carlos Pereyra on Oct 10, 2018
Latest reply on Oct 14, 2018 by Mark Butcher

I am currently using a Teensy 3.6 with a K66 micro controller chip to do basic I2C operations. In setting up the start signal to the slave, I am setting up the I2C0_C1 register with some predefined constants such as 'I2C_C1_IICEN_MASK'.

 

Here's a snippet of my code.

I2C0_C1 |= I2C_C1_IICEN_MASK; // Enable

I2C I2C0_C1 |= I2C_C1_TX_MASK; // TX mode

I2C0_C1 |= I2C_C1_MST_MASK; // Start signal

When running this in the Arduino 1.8.5 IDE I get the following error.

"error: 'I2C_C1_IICEN_MASK' was not declared in this scope"

It seems that many other projects use 'I2C_C1_IICEN_MASK' definition, but I am not sure which library defines this variable. Is this something I need to define myself? I can do the bitwise masking myself, but it seemed better practice to use the conventions others are using. Thanks again, if someone could tell me where 'I2C_C1_IICEN_MASK' is defined or how to find, that would be great. Thanks!

Outcomes