You can download LPCOpen for LPC40xx devices, LPCOpen is an extensive collection of free software libraries (drivers and middleware) and example programs that enable developers to create multifunctional products based on LPC microcontrollers.

After download it you will find a CAN example that you can use as reference in the following path: \LPCXpresso_8.2.2_650\lpcxpresso\Examples\LPCOpen\lpcopen_2_10_lpcxpresso_ea_devkit_4088\periph_can\example .