serial: add static directive to local functions