Updated to the new locm3 changed to stdint types.
This commit is contained in:
@@ -53,7 +53,7 @@ const struct usb_device_descriptor dev_descr = {
|
||||
};
|
||||
|
||||
/* I have no idea what this means. I haven't read the HID spec. */
|
||||
static const u8 hid_report_descriptor[] = {
|
||||
static const uint8_t hid_report_descriptor[] = {
|
||||
0x05, 0x01, 0x09, 0x02, 0xA1, 0x01, 0x09, 0x01,
|
||||
0xA1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x03,
|
||||
0x15, 0x00, 0x25, 0x01, 0x95, 0x03, 0x75, 0x01,
|
||||
@@ -69,8 +69,8 @@ static const u8 hid_report_descriptor[] = {
|
||||
static const struct {
|
||||
struct usb_hid_descriptor hid_descriptor;
|
||||
struct {
|
||||
u8 bReportDescriptorType;
|
||||
u16 wDescriptorLength;
|
||||
uint8_t bReportDescriptorType;
|
||||
uint16_t wDescriptorLength;
|
||||
} __attribute__((packed)) hid_report;
|
||||
} __attribute__((packed)) hid_function = {
|
||||
.hid_descriptor = {
|
||||
@@ -172,9 +172,9 @@ static const char *usb_strings[] = {
|
||||
};
|
||||
|
||||
/* Buffer to be used for control requests. */
|
||||
u8 usbd_control_buffer[128];
|
||||
uint8_t usbd_control_buffer[128];
|
||||
|
||||
static int hid_control_request(usbd_device *dev, struct usb_setup_data *req, u8 **buf, u16 *len,
|
||||
static int hid_control_request(usbd_device *dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len,
|
||||
void (**complete)(usbd_device *, struct usb_setup_data *))
|
||||
{
|
||||
(void)complete;
|
||||
@@ -186,7 +186,7 @@ static int hid_control_request(usbd_device *dev, struct usb_setup_data *req, u8
|
||||
return 0;
|
||||
|
||||
/* Handle the HID report descriptor. */
|
||||
*buf = (u8 *)hid_report_descriptor;
|
||||
*buf = (uint8_t *)hid_report_descriptor;
|
||||
*len = sizeof(hid_report_descriptor);
|
||||
|
||||
return 1;
|
||||
@@ -205,7 +205,7 @@ static void dfu_detach_complete(usbd_device *dev, struct usb_setup_data *req)
|
||||
scb_reset_core();
|
||||
}
|
||||
|
||||
static int dfu_control_request(usbd_device *dev, struct usb_setup_data *req, u8 **buf, u16 *len,
|
||||
static int dfu_control_request(usbd_device *dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len,
|
||||
void (**complete)(usbd_device *, struct usb_setup_data *))
|
||||
{
|
||||
(void)buf;
|
||||
@@ -221,7 +221,7 @@ static int dfu_control_request(usbd_device *dev, struct usb_setup_data *req, u8
|
||||
}
|
||||
#endif
|
||||
|
||||
static void hid_set_config(usbd_device *dev, u16 wValue)
|
||||
static void hid_set_config(usbd_device *dev, uint16_t wValue)
|
||||
{
|
||||
(void)wValue;
|
||||
(void)dev;
|
||||
@@ -273,7 +273,7 @@ void sys_tick_handler(void)
|
||||
{
|
||||
static int x = 0;
|
||||
static int dir = 1;
|
||||
u8 buf[4] = {0, 0, 0, 0};
|
||||
uint8_t buf[4] = {0, 0, 0, 0};
|
||||
|
||||
buf[1] = dir;
|
||||
x += dir;
|
||||
|
||||
Reference in New Issue
Block a user