We could. The enum has one big advantage over using just a number for identifying the device you want to use: You know already during compile time, if your used devices do exist. And as HW peripherals are always static in existence, this makes a lot of return value checks unnecessary.