Port low level

Most important functions added & working
volatile in function parameter?