fix compiler warnings

This commit is contained in:
hathach 2018-08-23 20:54:51 +07:00
parent 4e349c798d
commit 23c7c2102b
6 changed files with 9 additions and 9 deletions

View File

@ -96,10 +96,10 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr);
bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr); bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr);
//------------- Control Endpoint -------------// //------------- Control Endpoint -------------//
bool dcd_control_xfer (uint8_t rhport, tusb_dir_t dir, uint8_t * buffer, uint16_t length); bool dcd_control_xfer (uint8_t rhport, uint8_t dir, uint8_t * buffer, uint16_t length);
// Note input dir is value of direction bit in setup packet (i.e DATA stage direction) // Note input dir is value of direction bit in setup packet (i.e DATA stage direction)
static inline bool dcd_control_status(uint8_t rhport, tusb_dir_t dir) static inline bool dcd_control_status(uint8_t rhport, uint8_t dir)
{ {
// status direction is reversed to one in the setup packet // status direction is reversed to one in the setup packet
return dcd_control_xfer(rhport, 1-dir, NULL, 0); return dcd_control_xfer(rhport, 1-dir, NULL, 0);

View File

@ -85,7 +85,7 @@ typedef TaskHandle_t osal_task_t;
static inline osal_task_t osal_task_create(osal_task_def_t* taskdef) static inline osal_task_t osal_task_create(osal_task_def_t* taskdef)
{ {
return xTaskCreateStatic(taskdef->func, taskdef->strname, taskdef->stack_sz, NULL, taskdef->prio, taskdef->buf, &taskdef->stask); return xTaskCreateStatic(taskdef->func, taskdef->strname, taskdef->stack_sz, NULL, taskdef->prio, (StackType_t*) taskdef->buf, &taskdef->stask);
} }
static inline void osal_task_delay(uint32_t msec) static inline void osal_task_delay(uint32_t msec)
@ -113,7 +113,7 @@ typedef QueueHandle_t osal_queue_t;
static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef) static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
{ {
return xQueueCreateStatic(qdef->depth, qdef->item_sz, qdef->buf, &qdef->sq); return xQueueCreateStatic(qdef->depth, qdef->item_sz, (uint8_t*) qdef->buf, &qdef->sq);
} }
static inline void osal_queue_receive (osal_queue_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error) static inline void osal_queue_receive (osal_queue_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error)

View File

@ -200,7 +200,7 @@ static void xact_control_start(void)
_dcd.control.actual_len += xact_len; _dcd.control.actual_len += xact_len;
} }
bool dcd_control_xfer (uint8_t rhport, tusb_dir_t dir, uint8_t * buffer, uint16_t length) bool dcd_control_xfer (uint8_t rhport, uint8_t dir, uint8_t * buffer, uint16_t length)
{ {
(void) rhport; (void) rhport;
@ -210,7 +210,7 @@ bool dcd_control_xfer (uint8_t rhport, tusb_dir_t dir, uint8_t * buffer, uint16_
_dcd.control.total_len = length; _dcd.control.total_len = length;
_dcd.control.actual_len = 0; _dcd.control.actual_len = 0;
_dcd.control.buffer = buffer; _dcd.control.buffer = buffer;
_dcd.control.dir = (uint8_t) dir; _dcd.control.dir = dir;
xact_control_start(); xact_control_start();
}else }else

View File

@ -381,7 +381,7 @@ void dcd_control_stall(uint8_t rhport)
dcd_data.qhd[0][0].stall = dcd_data.qhd[1][0].stall = 1; dcd_data.qhd[0][0].stall = dcd_data.qhd[1][0].stall = 1;
} }
bool dcd_control_xfer(uint8_t rhport, tusb_dir_t dir, uint8_t * p_buffer, uint16_t length, bool int_on_complete) bool dcd_control_xfer(uint8_t rhport, uint8_t dir, uint8_t * p_buffer, uint16_t length, bool int_on_complete)
{ {
(void) rhport; (void) rhport;

View File

@ -380,7 +380,7 @@ void dcd_control_stall(uint8_t rhport)
sie_write(SIE_CMDCODE_ENDPOINT_SET_STATUS+0, 1, SIE_SET_ENDPOINT_STALLED_MASK | SIE_SET_ENDPOINT_CONDITION_STALLED_MASK); sie_write(SIE_CMDCODE_ENDPOINT_SET_STATUS+0, 1, SIE_SET_ENDPOINT_STALLED_MASK | SIE_SET_ENDPOINT_CONDITION_STALLED_MASK);
} }
bool dcd_control_xfer(uint8_t rhport, tusb_dir_t dir, uint8_t * p_buffer, uint16_t length, bool int_on_complete) bool dcd_control_xfer(uint8_t rhport, uint8_t dir, uint8_t * p_buffer, uint16_t length, bool int_on_complete)
{ {
(void) rhport; (void) rhport;

View File

@ -232,7 +232,7 @@ static inline uint8_t qtd_find_free(uint8_t rhport)
// control transfer does not need to use qtd find function // control transfer does not need to use qtd find function
// follows UM 24.10.8.1.1 Setup packet handling using setup lockout mechanism // follows UM 24.10.8.1.1 Setup packet handling using setup lockout mechanism
bool dcd_control_xfer(uint8_t rhport, tusb_dir_t dir, uint8_t * p_buffer, uint16_t length) bool dcd_control_xfer(uint8_t rhport, uint8_t dir, uint8_t * p_buffer, uint16_t length)
{ {
LPC_USB0_Type* const lpc_usb = LPC_USB[rhport]; LPC_USB0_Type* const lpc_usb = LPC_USB[rhport];
dcd_data_t* const p_dcd = dcd_data_ptr[rhport]; dcd_data_t* const p_dcd = dcd_data_ptr[rhport];