mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-07 05:54:11 +08:00
Merge pull request #2788 from dp111/cppcheck
make function prototypes match functions( found by cppcheck)
This commit is contained in:
commit
3eea46056e
@ -98,7 +98,7 @@ bool tuc_pd_data_received_cb(uint8_t rhport, pd_header_t const* header, uint8_t
|
|||||||
pd_pdo_fixed_t const* fixed = (pd_pdo_fixed_t const*) &pdo;
|
pd_pdo_fixed_t const* fixed = (pd_pdo_fixed_t const*) &pdo;
|
||||||
uint32_t const voltage_mv = fixed->voltage_50mv*50;
|
uint32_t const voltage_mv = fixed->voltage_50mv*50;
|
||||||
uint32_t const current_ma = fixed->current_max_10ma*10;
|
uint32_t const current_ma = fixed->current_max_10ma*10;
|
||||||
printf("[Fixed] %lu mV %lu mA\r\n", voltage_mv, current_ma);
|
printf("[Fixed] %"PRIu32" mV %"PRIu32" mA\r\n", voltage_mv, current_ma);
|
||||||
|
|
||||||
if (voltage_mv <= VOLTAGE_MAX_MV && current_ma >= CURRENT_MAX_MA) {
|
if (voltage_mv <= VOLTAGE_MAX_MV && current_ma >= CURRENT_MAX_MA) {
|
||||||
// Found a suitable PDO
|
// Found a suitable PDO
|
||||||
|
@ -59,7 +59,7 @@ typedef struct dhcp_config
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
err_t dhserv_init(const dhcp_config_t *config);
|
err_t dhserv_init(const dhcp_config_t *c);
|
||||||
void dhserv_free(void);
|
void dhserv_free(void);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -154,14 +154,14 @@ void tu_fifo_config_mutex(tu_fifo_t *f, osal_mutex_t wr_mutex, osal_mutex_t rd_m
|
|||||||
#define tu_fifo_config_mutex(_f, _wr_mutex, _rd_mutex)
|
#define tu_fifo_config_mutex(_f, _wr_mutex, _rd_mutex)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool tu_fifo_write (tu_fifo_t* f, void const * p_data);
|
bool tu_fifo_write (tu_fifo_t* f, void const * data);
|
||||||
uint16_t tu_fifo_write_n (tu_fifo_t* f, void const * p_data, uint16_t n);
|
uint16_t tu_fifo_write_n (tu_fifo_t* f, void const * data, uint16_t n);
|
||||||
#ifdef TUP_MEM_CONST_ADDR
|
#ifdef TUP_MEM_CONST_ADDR
|
||||||
uint16_t tu_fifo_write_n_const_addr_full_words (tu_fifo_t* f, const void * data, uint16_t n);
|
uint16_t tu_fifo_write_n_const_addr_full_words (tu_fifo_t* f, const void * data, uint16_t n);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool tu_fifo_read (tu_fifo_t* f, void * p_buffer);
|
bool tu_fifo_read (tu_fifo_t* f, void * buffer);
|
||||||
uint16_t tu_fifo_read_n (tu_fifo_t* f, void * p_buffer, uint16_t n);
|
uint16_t tu_fifo_read_n (tu_fifo_t* f, void * buffer, uint16_t n);
|
||||||
#ifdef TUP_MEM_CONST_ADDR
|
#ifdef TUP_MEM_CONST_ADDR
|
||||||
uint16_t tu_fifo_read_n_const_addr_full_words (tu_fifo_t* f, void * buffer, uint16_t n);
|
uint16_t tu_fifo_read_n_const_addr_full_words (tu_fifo_t* f, void * buffer, uint16_t n);
|
||||||
#endif
|
#endif
|
||||||
|
@ -137,7 +137,7 @@ bool tud_control_xfer(uint8_t rhport, tusb_control_request_t const* request, voi
|
|||||||
void usbd_control_reset(void);
|
void usbd_control_reset(void);
|
||||||
void usbd_control_set_request(tusb_control_request_t const* request);
|
void usbd_control_set_request(tusb_control_request_t const* request);
|
||||||
void usbd_control_set_complete_callback(usbd_control_xfer_cb_t fp);
|
void usbd_control_set_complete_callback(usbd_control_xfer_cb_t fp);
|
||||||
bool usbd_control_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
|
bool usbd_control_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
|
||||||
|
|
||||||
void usbd_control_reset(void) {
|
void usbd_control_reset(void) {
|
||||||
tu_varclr(&_ctrl_xfer);
|
tu_varclr(&_ctrl_xfer);
|
||||||
|
@ -632,14 +632,14 @@ void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
|
|||||||
const UNITY_FLAGS_T flags);
|
const UNITY_FLAGS_T flags);
|
||||||
|
|
||||||
#ifndef UNITY_EXCLUDE_SETJMP_H
|
#ifndef UNITY_EXCLUDE_SETJMP_H
|
||||||
UNITY_NORETURN void UnityFail(const char* message, const UNITY_LINE_TYPE line);
|
UNITY_NORETURN void UnityFail(const char* msg, const UNITY_LINE_TYPE line);
|
||||||
UNITY_NORETURN void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
|
UNITY_NORETURN void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line);
|
||||||
#else
|
#else
|
||||||
void UnityFail(const char* message, const UNITY_LINE_TYPE line);
|
void UnityFail(const char* msg, const UNITY_LINE_TYPE line);
|
||||||
void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
|
void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void UnityMessage(const char* message, const UNITY_LINE_TYPE line);
|
void UnityMessage(const char* msg, const UNITY_LINE_TYPE line);
|
||||||
|
|
||||||
#ifndef UNITY_EXCLUDE_FLOAT
|
#ifndef UNITY_EXCLUDE_FLOAT
|
||||||
void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
|
void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user