Arduino code on Raspberry?
Given that most likely the Arduino code is accessing AVR specific registers, probably not, unless you have some compatibility library that redefines all the low level stuff.

I also wonder if you have the same set of peripherals available on the PI (ex: PWM generators and ADCs).

I would rather follow the "spirit" of the code you already have and re-implement it natively in you language of choice.