def write_kobj_types_output(fp):
    fp.write('/* Core kernel objects */\n')
    for (kobj, obj_info) in kobjects.items():
        (dep, _) = obj_info
        if (kobj == 'device'):
            continue
        if dep:
            fp.write(('#ifdef %s\n' % dep))
        fp.write(('%s,\n' % kobject_to_enum(kobj)))
        if dep:
            fp.write('#endif\n')
    fp.write('/* Driver subsystems */\n')
    for subsystem in subsystems:
        subsystem = subsystem.replace('_driver_api', '').upper()
        fp.write(('K_OBJ_DRIVER_%s,\n' % subsystem))
def write_kobj_types_output(fp):
    fp.write('/* Core kernel objects */\n')
    for (kobj, obj_info) in kobjects.items():
        (dep, _) = obj_info
        if (kobj == 'device'):
            continue
        if dep:
            fp.write(('#ifdef %s\n' % dep))
        fp.write(('%s,\n' % kobject_to_enum(kobj)))
        if dep:
            fp.write('#endif\n')
    fp.write('/* Driver subsystems */\n')
    for subsystem in subsystems:
        subsystem = subsystem.replace('_driver_api', ).upper()
        fp.write(('K_OBJ_DRIVER_%s,\n' % subsystem))