Other Parts Discussed in Thread: SYSCONFIG
Hello, Unresolved symbol first referred at:
|
|
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello, Unresolved symbol first referred at:
|
|
Hi,
Actually the table of structures I2S_Config named I2S_config[] is NOT defined in I2S.h (I agree it is not easy to see).
So, to solve your issue, you need to define the table I2S_config[] somewhere. You are lucky, SysConfig does this for you :) You may want to review the i2secho example to see how this is done.
Best regards,
Hi Clément,
Thank you for your quick response,
I added the type definitions and includes as follows:
typedef struct I2S_Config {
/* Pointer to a driver specific data object */
void *object;
/* Pointer to a driver specific hardware attributes structure */
void const *hwAttrs;
} I2S_Config;
/* I2S_Config structure defined in the board file */
extern const I2S_Config I2S_config[];
typedef struct I2S_Config *I2S_Handle;
#include "system.h"
#include "HalApi/I2SHal.h" //protoypes
if I remove #include <ti/drivers/I2S.h>, I'll get a warning #225-D: function "I2S_init" declared implicitly and error #20: identifier "I2S_Params" is undefined.
If I include the I2s.h then I get that I2S_Config is redfined.
BR
Hi,
This is not exactly what I meant. Please review the i2secho example available in your SDK.
There, you can review how SysConfig is used to enable the I2S module. You will also notice that at build time, Sysonfig generate the file ti_drivers_config.c where the table I2S_config[] is declared:
/* * =============================== I2S =============================== */ #include <ti/drivers/I2S.h> #include <ti/drivers/i2s/I2SCC26XX.h> #define CONFIG_I2S_COUNT 1 I2SCC26XX_Object i2sCC26XXObjects[CONFIG_I2S_COUNT]; const I2SCC26XX_HWAttrs i2sCC26XXHWAttrs[CONFIG_I2S_COUNT] = { /* CONFIG_I2S_0 */ /* CC3200 Audio BoosterPack I2S */ { .pinSD1 = IOID_1, .pinSD0 = IOID_0, .pinSCK = IOID_30, .pinMCLK = PIN_UNASSIGNED, .pinWS = IOID_29, .intPriority = 0x40 } }; /* * ======== I2S_config ======== */ const I2S_Config I2S_config[CONFIG_I2S_COUNT] = { /* CONFIG_I2S_0 */ /* CC3200 Audio BoosterPack I2S */ { .object = &i2sCC26XXObjects[CONFIG_I2S_0], .hwAttrs = &i2sCC26XXHWAttrs[CONFIG_I2S_0] }, }; const uint_least8_t I2S_count = CONFIG_I2S_COUNT;
Regards,