pc: Generate init functions with a macro