Use can_peak.c/h or can_virtual.c/h as an example, and adapt it to your driver API.
Execute configure script and choose -can=mydriver