Once the OS calls HAL_InitDevices, the HAL is free to register as many devices it wants, whenever it wants. However it’s usually best to register all the devices inside the implementation of HAL_InitDevices, to ensure that they’re made available to the OS as early as possible during initialisation.
RISCOS_AddDevice is the entry point that the HAL should use to register a device with the OS.
Note that it is not possible for the HAL to deregister devices.
SWI OS_Hardware 2 should be used to register devices.
SWI OS_Hardware 3 should be used to deregister devices.
SWI OS_Hardware 4 can be used to search the device list for devices of a specific type.
Service_Hardware is issued by the OS when devices are registered and deregistered.