I put CC2533 I2C code in CC2541 simpleBLEPeripheral project to use I2C.
But when I try to use HalI2CRead function, Error[e46] comes out.
Error[e46]: "HalI2CRead::?relay" referred in simpleBLEPeripheral (C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\ble\SimpleBLEPeripheral\CC2541DB\CC2541\Obj\simpleBLEPeripheral.r51
I already put #include "hal_i2c.h" and hal_i2c.c" and copy those two files into the C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\ble\SimpleBLEPeripheral\Source.
I don't know what is the problem.
Have you added hal_i2c.c and hal_i2c.h to your project in the ide? You should only be including the .h file. Is #include "hal_i2c.h" at the top of your simpleBLEPeripheral file?
In addition, the search path to the i2c header should be known to the compiler.
You can check whether the to i2c files is also included in IAR search paths by opening
project options->C/C++ Compiler->Preprocessor->Additional include directories (sub window).
First, I erased #include "hal_i2c.c".
And I check that project options, but it seems that IAR cannot be connected i2c file.
What I did was I paste hal_i2c.h files to all of the directories.
But it still show me same error, e46.
What is the problem?
Bomi ShimAnd I check that project options, but it seems that IAR cannot be connected i2c file.
I solved the problem.
I put those two lines in <simpleBLEPeripheral.c>, <hal_i2c.h> and <ioCC2541.h>.
#define HAL_I2C TRUE
#define HAL_I2C_MASTER TRUE
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.