0

I'm using I2C communication between a Cypress PSoC and an external slave. I've assigned the SCB block for I2C on my TopDesign file, however, programming in C the compiler doesn't let me use the function SCB_I2CMasterReadBuf(etc etc etc) as it says it has not been declared (but it might be, because I'm using the right block).

How can I solve this? Regards, Julio.

Julio
  • 119
  • 1
  • 9
  • Generally speaking, you ensure that a function's declaration is visible by `#include`ing the appropriate header file beforehand, preferably at the beginning of the source file. That does assume, of course, that you are going to link the function to your code, probably by linking a library containing it. – John Bollinger Oct 31 '16 at 20:30
  • In PSOC Creator, make sure the *name of your SCB* is actually SCB. PSoC creator will use the name you enter for the block as part of the function names. Check the "generated header files" in the project. Also, make sure you include "project.h", the header that holds all generated hardware headers. – tofro Oct 31 '16 at 21:08

0 Answers0