/* Writes a 24-bit value to the descriptor buffer  */
sl_status_t sl_usbd_core_write_24b_to_descriptor_buf(uint32_t val)
/* Writes a 24-bit value to the descriptor buffer  */
sl_status_t sl_usbd_core_write_24b_to_descriptor_buf(uint32_t val)
{
  sli_usbd_device_t *p_dev;
  sl_status_t  status;
  p_dev = &usbd_ptr->device;
  status = *(p_dev->desc_buf_status_ptr);
  if (status == SL_STATUS_OK) {
    uint8_t buf[3u];
    buf[0u] = (uint8_t)(val         & 0xFFu);
    buf[1u] = (uint8_t)((val >> 8u)  & 0xFFu);
    buf[2u] = (uint8_t)((val >> 16u) & 0xFFu);
    usbd_core_write_to_descriptor_buf(p_dev, &buf[0u], 3u);
  }
  return status;
}