port registration for MEGA2560

HI every body

i find some code in internet and i do not understand this problem for my mega2560:

// Define PORT
#define PORT_DRDY PORTL // Pin 49 on Arduino Mega
#define PIN_DRDY PINL
#define PINDEX_DRDY PL0
#define DDR_DRDY DDRL

#define PORT_CS PORTB // Pin 53 on Arduino Mega
#define PIN_CS PINB
#define PINDEX_CS PB0
#define DDR_CS DDRB

#define PORT_RESET PORTL // PIN 48 on Arduino Mega
#define PIN_REST PINL
#define PINDEX_RESET PL1
#define DDR_RESET DDRL

i receive this errors:

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp: In constructor 'ADS1256::ADS1256(float, float, bool)':

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:16:12: error: lvalue required as left operand of assignment

DDR_DRDY &= ~(1 << PINDEX_DRDY);

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:19:10: error: lvalue required as left operand of assignment

DDR_CS |= (1 << PINDEX_CS);

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:23:15: error: lvalue required as left operand of assignment

DDR_RESET |= (1 << PINDEX_RESET);

^

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:90,

from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28,

from C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.h:109,

from C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:7:

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp: At global scope:

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.h:16:17: error: expected unqualified-id before 'volatile'

#define PORT_CS PORTB // Pin 53 on Arduino Mega

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:239:5: note: in expansion of macro 'PORT_CS'

} PORT_CS &= ~(1 << PINDEX_CS); }

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.h:16:17: error: expected ')' before 'volatile'

#define PORT_CS PORTB // Pin 53 on Arduino Mega

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:239:5: note: in expansion of macro 'PORT_CS'

} PORT_CS &= ~(1 << PINDEX_CS); }

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.h:16:17: error: expected ')' before 'volatile'

#define PORT_CS PORTB // Pin 53 on Arduino Mega

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:239:5: note: in expansion of macro 'PORT_CS'

} PORT_CS &= ~(1 << PINDEX_CS); }

^

C:\Users.....\Documents\Arduino\libraries\ADS1256-master\ADS1256.cpp:239:35: error: expected declaration before '}' token

} PORT_CS &= ~(1 << PINDEX_CS); }

^

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

this files that attached are my code and i have to program my board for setup an ads1256 board

thanks for help me

ADS1256-master.zip (6.95 KB)

You cannot change the value of a number that is defined.i

#define DDR_CS

DDR_CS can't be changed, can't be an lvalue.

byte DDR_CS = 0;  // declare a variable

Now DDR_CS can be changed, can be an lvalue.

What is lvalue?