Just some fundamental programming

//Aditional sparkfun.cpp and sparkfun.h
#include "sparkfun.h"
//I have writtten a function in sparkfun.cpp
//Ex
//
//void read(){
//do_something();
//}

sparkfun gyro;

void setup() {
// setup code here, to run once:
pinMode(LED, OUTPUT);
pinMode(interruptPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(7), handle_interrupt, CHANGE);
gyro.begin;
}

void loop() {
//put your main code here, to run repeatedly:
//Condition-1 -> needs to call a function in sparkfun.cpp called read()
gyro.read();
}

handle_interrupt(){
//Condition-2 -> needs to call a function in sparkfun.cpp called write()
gyro.write();
}

//How is this to be compiled without error?

void setup() 
{
}

void loop() 
{
}