Use pa_read, pa_write and pa_poll instead of system functions