Error in the SPI definition

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
HjH
Posts: 108
Joined: Sat Jul 03, 2010 4:38 pm
Been thanked: 2 times
Contact:

Error in the SPI definition

Post by HjH »

Hallo,

the controler is a 24FJ128GA010 on the explorer board.
I will write in a SPI EEPROM
The programm compiled with following errors:
Explorer_Test1.c: In function 'FCD_SPI_Legacy0_SPI_Init':
Explorer_Test1.c:990: error: 'SPI1CON' undeclared (first use in this function)
Explorer_Test1.c:990: error: (Each undeclared identifier is reported only once
Explorer_Test1.c:990: error: for each function it appears in.)
Explorer_Test1.c:991: error: 'SPI1CONbits' undeclared (first use in this function)

can you help me
Explorer_Test1 with error.fcf_pic16
(16.53 KiB) Downloaded 263 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Error in the SPI definition

Post by Benj »

Hello,

In your Project options -> Supplementary code window please add the following lines of code.

#define SPI1CON SPI1CON1
#define SPI1CONbits SPI1CON1bits

This should then let you compile correctly.

Post Reply