File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,10 @@ static struct hid_device_info {
89
89
const struct hid_ops * ops ;
90
90
} hid_device ;
91
91
92
- static void usb_set_hid_report_size (u16_t report_desc_size )
92
+ static void usb_set_hid_report_size (u16_t size )
93
93
{
94
- UNALIGNED_PUT ( sys_cpu_to_le16 ( report_desc_size ) ,
95
- & (hid_cfg .if0_hid .subdesc [0 ].wDescriptorLength ));
94
+ sys_put_le16 ( size ,
95
+ ( u8_t * ) & (hid_cfg .if0_hid .subdesc [0 ].wDescriptorLength ));
96
96
}
97
97
98
98
static void hid_status_cb (enum usb_dc_status_code status , const u8_t * param )
Original file line number Diff line number Diff line change @@ -409,9 +409,8 @@ static int usb_fix_descriptor(struct usb_desc_header *head)
409
409
410
410
LOG_DBG ("Now the wTotalLength is %d" ,
411
411
(u8_t * )head - (u8_t * )cfg_descr );
412
- cfg_descr -> wTotalLength =
413
- sys_cpu_to_le16 ((u8_t * )head -
414
- (u8_t * )cfg_descr );
412
+ sys_put_le16 ((u8_t * )head - (u8_t * )cfg_descr ,
413
+ (u8_t * )& cfg_descr -> wTotalLength );
415
414
cfg_descr -> bNumInterfaces = numof_ifaces ;
416
415
}
417
416
You can’t perform that action at this time.
0 commit comments