Lightweight USB stack for embedded devices