Lock access to AES hardware unit AES hardware unit can only be used by one consumer at a time. esp_aes_xxx API calls automatically manage locking & unlocking of hardware, this function is only needed if you want to call ets_aes_xxx functions directly.