ADXL345 interrupt

Is this the correct way of setting the DATA_READY interrupt on the UNO

//----------------------------------------------------------------------------------------------
//Write to ADXL345 registers
void writeTo(int device, byte address, byte val) {
   Wire.beginTransmission(device); //start transmission to device 
   Wire.write(address);        // send register address
   Wire.write(val);        // send value to write
   Wire.endTransmission(); //end transmission
}



//----------------------------------------------------------------------------------------------

/////////////////////////////////////////////////////////////////////////////////////////////

//ISR function
  
  void interrupt(void){

  }
  

//////////////////////////////////////////////////////////////////////////////////////////////////


//setup

attachInterrupt(0, interrupt, RISING);
  
writeTo(0x1D, 0x2E, 128); //enable data_ready only, device is 0x1D, 0x2E is INT_ENABLE register
writeTo(0x1D, 0x2F, 127); //map data_ready to INT0, device is 0x1D, 0x2F is INT_MAP register