adapted slightly general from only supporting qhy9 to support ic8300.