Moved hardware helper functions to extensions.c