API CHANGE: only allow 16bit flags for API calls. This allows us to use the upper 16bit for internal flags to be passed to the HAL functions.