Hi, hoping for someone to help me with this code. This is from a micrcontroller from MAXQ615 and I did manage to convert it for Arduino mega but I keep getting the same error of "lvalue required as unary & operand" Thank you.
#include <Arduino.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <string.h>
#include <stdio.h>
/***** Definitions *****/
#define RS 0x01
#define EN 0x02
#define I2CCN
#define I2CST
#define READ
#define I2C_VERSION 2
// I2CCN bit mask definitions
#define I2C_ENABLE 0x0001 // I2CCN.0:I2CEN bit mask
#define MASTER_MODE 0x0002 // I2CCN.1:I2CMST bit mask
#define MASTER_RECV_MODE 0x0004 // I2CCN.2:I2CMODE bit mask
#define I2C_ACK 0x0020 // I2CCN.5:I2CACK bit mask
#define I2C_START 0x0040 // I2CCN.6:I2CSTART bit mask
#define I2C_STOP 0x0080 // I2CCN.7:I2CSTOP bit mask
#define MASTER_RESET 0x8000 // I2CCN.16:I2CRST bit mask
// I2CST bit mask definitions
#define TRANSMIT_COMPLETE 0x0002 // I2CST.1:I2CTXI bit mask
#define __RECEIVE & READ 0x0004 // I2CST.2:I2CRXI bit mask
#define I2C_TIMEOUT 0x0010 // I2CST.4:I2CTOI bit mask
#define NACK_RECEIVED 0x0080 // I2CST.7:I2CNACKI bit mask
#define I2C_BUSY 0x4000 // I2CST.14:I2CBUSY bit mask
// Special character definitions
#define DOWN 0x01
#define SPEAKER 0x02
#define POINT 0x03
#define DELTA 0x04
#define OHM 0x05
#define ARROW 0x06
#define ARROWP 0x07
/// 8-bit signed data type
typedef signed char int8_t;
/// 8-bit unsigned data type
typedef unsigned char uint8_t;
/// 16-bit signed data type
typedef signed int int16_t;
/// 16-bit unsigned data type
typedef unsigned int uint16_t;
/// 32-bit signed data type
typedef signed long int32_t;
/// 32-bit unsigned data type
typedef unsigned long uint32_t;
/// boolean data type
typedef bool boolean;
// function prototypes
void i2c_slave_init(uint16_t slave_address);
uint8_t i2c_slave_recv(void);
int i2c_slave_send(uint8_t data_byte); // not used
void i2c_acknowledge(int ackval); // not used
void lcd_init(void);
void locate_cursor(char pos); // not used
void lcd_comm_wr(char cmd);
void lcd_data_wr(char dat);
void delay_us(unsigned int delay);
void lcd_pstring(char *str); // not used
void write_lcd(void);
int dispDefineChar(int charnum, char values[]);
char sevenSeg2char(uint8_t input);