firmware, lib: update comments, doc