Convert remaining code to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99 integer types. This handles the remaining includes and kernel, plus touching up various points that we skipped because of include dependancies. We also convert the PRI printf formatters in the arch code over to normal formatters. Jira: ZEP-2051 Change-Id: Iecbb12601a3ee4ea936fd7ddea37788a645b08b0 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
d9a1e367b2
commit
cc334c7273
132 changed files with 1420 additions and 1429 deletions
|
@ -51,11 +51,11 @@
|
|||
|
||||
/** setup packet definitions */
|
||||
struct usb_setup_packet {
|
||||
uint8_t bmRequestType; /**< characteristics of the specific request */
|
||||
uint8_t bRequest; /**< specific request */
|
||||
uint16_t wValue; /**< request specific parameter */
|
||||
uint16_t wIndex; /**< request specific parameter */
|
||||
uint16_t wLength; /**< length of data transferred in data phase */
|
||||
u8_t bmRequestType; /**< characteristics of the specific request */
|
||||
u8_t bRequest; /**< specific request */
|
||||
u16_t wValue; /**< request specific parameter */
|
||||
u16_t wIndex; /**< request specific parameter */
|
||||
u16_t wLength; /**< length of data transferred in data phase */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ typedef void (*usb_status_callback)(enum usb_dc_status_code status_code);
|
|||
/**
|
||||
* Callback function signature for the USB Endpoint status
|
||||
*/
|
||||
typedef void (*usb_ep_callback)(uint8_t ep,
|
||||
typedef void (*usb_ep_callback)(u8_t ep,
|
||||
enum usb_dc_ep_cb_status_code cb_status);
|
||||
|
||||
/**
|
||||
|
@ -74,7 +74,7 @@ typedef void (*usb_ep_callback)(uint8_t ep,
|
|||
* interface number specified in the device descriptor table
|
||||
*/
|
||||
typedef int (*usb_request_handler) (struct usb_setup_packet *detup,
|
||||
int32_t *transfer_len, uint8_t **payload_data);
|
||||
s32_t *transfer_len, u8_t **payload_data);
|
||||
|
||||
/*
|
||||
* USB Endpoint Configuration
|
||||
|
@ -92,7 +92,7 @@ struct usb_ep_cfg_data {
|
|||
* IN EP = 0x80 | \<endpoint number\>
|
||||
* OUT EP = 0x00 | \<endpoint number\>
|
||||
*/
|
||||
uint8_t ep_addr;
|
||||
u8_t ep_addr;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -116,12 +116,12 @@ struct usb_interface_cfg_data {
|
|||
* command set. This data area may be used for USB IN or OUT
|
||||
* communications
|
||||
*/
|
||||
uint8_t *payload_data;
|
||||
u8_t *payload_data;
|
||||
/**
|
||||
* This data area, allocated by the application, is used to store
|
||||
* Vendor specific payload
|
||||
*/
|
||||
uint8_t *vendor_data;
|
||||
u8_t *vendor_data;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -137,13 +137,13 @@ struct usb_cfg_data {
|
|||
* USB device description, see
|
||||
* http://www.beyondlogic.org/usbnutshell/usb5.shtml#DeviceDescriptors
|
||||
*/
|
||||
const uint8_t *usb_device_description;
|
||||
const u8_t *usb_device_description;
|
||||
/** Callback to be notified on USB connection status change */
|
||||
usb_status_callback cb_usb_status;
|
||||
/** USB interface (Class) handler and storage space */
|
||||
struct usb_interface_cfg_data interface;
|
||||
/** Number of individual endpoints in the device configuration */
|
||||
uint8_t num_endpoints;
|
||||
u8_t num_endpoints;
|
||||
/**
|
||||
* Pointer to an array of endpoint structs of length equal to the
|
||||
* number of EP associated with the device description,
|
||||
|
@ -210,8 +210,8 @@ int usb_disable(void);
|
|||
*
|
||||
* @return 0 on success, negative errno code on fail
|
||||
*/
|
||||
int usb_write(uint8_t ep, const uint8_t *data, uint32_t data_len,
|
||||
uint32_t *bytes_ret);
|
||||
int usb_write(u8_t ep, const u8_t *data, u32_t data_len,
|
||||
u32_t *bytes_ret);
|
||||
|
||||
/*
|
||||
* @brief read data from the specified endpoint
|
||||
|
@ -230,8 +230,8 @@ int usb_write(uint8_t ep, const uint8_t *data, uint32_t data_len,
|
|||
*
|
||||
* @return 0 on success, negative errno code on fail
|
||||
*/
|
||||
int usb_read(uint8_t ep, uint8_t *data, uint32_t max_data_len,
|
||||
uint32_t *ret_bytes);
|
||||
int usb_read(u8_t ep, u8_t *data, u32_t max_data_len,
|
||||
u32_t *ret_bytes);
|
||||
|
||||
/*
|
||||
* @brief set STALL condition on the specified endpoint
|
||||
|
@ -244,7 +244,7 @@ int usb_read(uint8_t ep, uint8_t *data, uint32_t max_data_len,
|
|||
*
|
||||
* @return 0 on success, negative errno code on fail
|
||||
*/
|
||||
int usb_ep_set_stall(uint8_t ep);
|
||||
int usb_ep_set_stall(u8_t ep);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -258,7 +258,7 @@ int usb_ep_set_stall(uint8_t ep);
|
|||
*
|
||||
* @return 0 on success, negative errno code on fail
|
||||
*/
|
||||
int usb_ep_clear_stall(uint8_t ep);
|
||||
int usb_ep_clear_stall(u8_t ep);
|
||||
|
||||
/**
|
||||
* @brief read data from the specified endpoint
|
||||
|
@ -278,8 +278,8 @@ int usb_ep_clear_stall(uint8_t ep);
|
|||
*
|
||||
* @return 0 on success, negative errno code on fail.
|
||||
*/
|
||||
int usb_ep_read_wait(uint8_t ep, uint8_t *data, uint32_t max_data_len,
|
||||
uint32_t *read_bytes);
|
||||
int usb_ep_read_wait(u8_t ep, u8_t *data, u32_t max_data_len,
|
||||
u32_t *read_bytes);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -295,6 +295,6 @@ int usb_ep_read_wait(uint8_t ep, uint8_t *data, uint32_t max_data_len,
|
|||
*
|
||||
* @return 0 on success, negative errno code on fail.
|
||||
*/
|
||||
int usb_ep_read_continue(uint8_t ep);
|
||||
int usb_ep_read_continue(u8_t ep);
|
||||
|
||||
#endif /* USB_DEVICE_H_ */
|
||||
|
|
|
@ -85,8 +85,8 @@
|
|||
|
||||
/** USB descriptor header */
|
||||
struct usb_desc_header {
|
||||
uint8_t bLength; /**< descriptor length */
|
||||
uint8_t bDescriptorType; /**< descriptor type */
|
||||
u8_t bLength; /**< descriptor length */
|
||||
u8_t bDescriptorType; /**< descriptor type */
|
||||
};
|
||||
|
||||
#define DESC_DEVICE 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue