hardware managment is improved

Added some function to driver and a small bugfix to code in order to
clean the compiler warning