/* Gets the last frame number from the driver  */
sl_status_t sl_usbd_core_get_device_frame_number(uint16_t *p_frame_nbr)
/* Gets the last frame number from the driver  */
sl_status_t sl_usbd_core_get_device_frame_number(uint16_t *p_frame_nbr)
{
  sli_usbd_device_t     *p_dev;
  if (p_frame_nbr == NULL) {
    return SL_STATUS_INVALID_PARAMETER;
  }
  p_dev = &usbd_ptr->device;
  if (p_dev->state == SL_USBD_DEVICE_STATE_NONE) {
    *p_frame_nbr = 0;
    return SL_STATUS_INVALID_STATE;
  }
  sli_usbd_driver_get_frame_number(p_frame_nbr);
  return SL_STATUS_OK;
}