Refactor code to build and run on both sam7x and sam7s cpu.