clean up warning in lpcxpresso
remove -Wpacked -Wpadded in gcc
This commit is contained in:
@@ -61,7 +61,7 @@ static uint8_t received_bytes; // set by transfer complete callback
|
||||
//--------------------------------------------------------------------+
|
||||
void tusbh_cdc_mounted_cb(uint8_t dev_addr)
|
||||
{ // application set-up
|
||||
printf("\na CDC device is mounted\n");
|
||||
printf("\na CDC device (address %d) is mounted\n", dev_addr);
|
||||
|
||||
memclr_(serial_in_buffer, sizeof(serial_in_buffer));
|
||||
memclr_(serial_out_buffer, sizeof(serial_out_buffer));
|
||||
@@ -73,11 +73,13 @@ void tusbh_cdc_mounted_cb(uint8_t dev_addr)
|
||||
|
||||
void tusbh_cdc_unmounted_cb(uint8_t dev_addr)
|
||||
{ // application tear-down
|
||||
printf("\na CDC device is unmounted\n");
|
||||
printf("\na CDC device (address %d) is unmounted \n", dev_addr);
|
||||
}
|
||||
|
||||
void tusbh_cdc_xfer_isr(uint8_t dev_addr, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes)
|
||||
{
|
||||
(void) dev_addr; // compiler warnings
|
||||
|
||||
switch ( pipe_id )
|
||||
{
|
||||
case CDC_PIPE_DATA_IN:
|
||||
@@ -119,6 +121,8 @@ void cdc_serial_app_init(void)
|
||||
//------------- main task -------------//
|
||||
OSAL_TASK_FUNCTION( cdc_serial_app_task ) (void* p_task_para)
|
||||
{
|
||||
(void) p_task_para;
|
||||
|
||||
OSAL_TASK_LOOP_BEGIN
|
||||
|
||||
//------------- send characters got from uart terminal to the first CDC device -------------//
|
||||
|
||||
@@ -206,11 +206,11 @@ void cli_poll(char ch)
|
||||
//------------- Separate Command & Parameter -------------//
|
||||
putchar('\n');
|
||||
char* p_space = strchr(cli_buffer, ' ');
|
||||
uint32_t command_len = (p_space == NULL) ? strlen(cli_buffer) : (p_space - cli_buffer);
|
||||
uint32_t command_len = (p_space == NULL) ? strlen(cli_buffer) : (uint32_t) (p_space - cli_buffer);
|
||||
char* p_para = (p_space == NULL) ? (cli_buffer+command_len) : (p_space+1); // point to NULL-character or after space
|
||||
|
||||
//------------- Find entered command in lookup table & execute it -------------//
|
||||
uint32_t cmd_id;
|
||||
uint8_t cmd_id;
|
||||
for(cmd_id = CLI_CMDTYPE_COUNT - 1; cmd_id > CLI_CMDTYPE_unknown; cmd_id--)
|
||||
{
|
||||
if( 0 == strncmp(cli_buffer, cli_string_tbl[cmd_id], command_len) ) break;
|
||||
@@ -230,8 +230,9 @@ void cli_poll(char ch)
|
||||
//--------------------------------------------------------------------+
|
||||
// UNKNOWN Command
|
||||
//--------------------------------------------------------------------+
|
||||
cli_error_t cli_cmd_unknown(char * para)
|
||||
cli_error_t cli_cmd_unknown(char * p_para)
|
||||
{
|
||||
(void) p_para;
|
||||
puts("unknown command, please type \"help\" for list of supported commands");
|
||||
return CLI_ERROR_NONE;
|
||||
}
|
||||
@@ -239,10 +240,12 @@ cli_error_t cli_cmd_unknown(char * para)
|
||||
//--------------------------------------------------------------------+
|
||||
// HELP command
|
||||
//--------------------------------------------------------------------+
|
||||
cli_error_t cli_cmd_help(char * para)
|
||||
cli_error_t cli_cmd_help(char * p_para)
|
||||
{
|
||||
(void) p_para;
|
||||
|
||||
puts("current supported commands are:");
|
||||
for(uint32_t cmd_id = CLI_CMDTYPE_help+1; cmd_id < CLI_CMDTYPE_COUNT; cmd_id++)
|
||||
for(uint8_t cmd_id = CLI_CMDTYPE_help+1; cmd_id < CLI_CMDTYPE_COUNT; cmd_id++)
|
||||
{
|
||||
printf("%s\t%s\n", cli_string_tbl[cmd_id], cli_description_tbl[cmd_id]);
|
||||
}
|
||||
@@ -255,6 +258,7 @@ cli_error_t cli_cmd_help(char * para)
|
||||
//--------------------------------------------------------------------+
|
||||
cli_error_t cli_cmd_clear(char* p_para)
|
||||
{
|
||||
(void) p_para;
|
||||
printf(ANSI_ERASE_SCREEN(2) ANSI_CURSOR_POSITION(1,1) );
|
||||
return CLI_ERROR_NONE;
|
||||
}
|
||||
|
||||
@@ -67,8 +67,7 @@ static inline void process_kbd_report(hid_keyboard_report_t const * report);
|
||||
void tusbh_hid_keyboard_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application set-up
|
||||
|
||||
puts("\na Keyboard device is mounted");
|
||||
printf("\na Keyboard device (address %d) is mounted\n", dev_addr);
|
||||
|
||||
osal_queue_flush(queue_kbd_hdl);
|
||||
tusbh_hid_keyboard_get_report(dev_addr, (uint8_t*) &usb_keyboard_report); // first report
|
||||
@@ -77,7 +76,7 @@ void tusbh_hid_keyboard_mounted_cb(uint8_t dev_addr)
|
||||
void tusbh_hid_keyboard_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application tear-down
|
||||
puts("\na Keyboard device is unmounted");
|
||||
printf("\na Keyboard device (address %d) is unmounted\n", dev_addr);
|
||||
}
|
||||
|
||||
void tusbh_hid_keyboard_isr(uint8_t dev_addr, tusb_event_t event)
|
||||
@@ -115,6 +114,8 @@ void keyboard_app_init(void)
|
||||
//------------- main task -------------//
|
||||
OSAL_TASK_FUNCTION( keyboard_app_task ) (void* p_task_para)
|
||||
{
|
||||
(void) p_task_para;
|
||||
|
||||
hid_keyboard_report_t kbd_report;
|
||||
tusb_error_t error;
|
||||
|
||||
|
||||
@@ -66,8 +66,7 @@ static inline void process_mouse_report(hid_mouse_report_t const * p_report);
|
||||
void tusbh_hid_mouse_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application set-up
|
||||
|
||||
puts("\na Mouse device is mounted");
|
||||
printf("\na Mouse device (address %d) is mounted\n", dev_addr);
|
||||
|
||||
osal_queue_flush(queue_mouse_hdl);
|
||||
(void) tusbh_hid_mouse_get_report(dev_addr, (uint8_t*) &usb_mouse_report); // first report
|
||||
@@ -76,7 +75,7 @@ void tusbh_hid_mouse_mounted_cb(uint8_t dev_addr)
|
||||
void tusbh_hid_mouse_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application tear-down
|
||||
puts("\na Mouse device is unmounted\n");
|
||||
printf("\na Mouse device (address %d) is unmounted\n", dev_addr);
|
||||
}
|
||||
|
||||
void tusbh_hid_mouse_isr(uint8_t dev_addr, tusb_event_t event)
|
||||
@@ -116,6 +115,8 @@ void mouse_app_init(void)
|
||||
//------------- main task -------------//
|
||||
OSAL_TASK_FUNCTION( mouse_app_task ) (void* p_task_para)
|
||||
{
|
||||
(void) p_task_para;
|
||||
|
||||
tusb_error_t error;
|
||||
hid_mouse_report_t mouse_report;
|
||||
|
||||
|
||||
@@ -132,7 +132,9 @@ void tusbh_msc_unmounted_cb(uint8_t dev_addr)
|
||||
|
||||
void tusbh_msc_isr(uint8_t dev_addr, tusb_event_t event, uint32_t xferred_bytes)
|
||||
{
|
||||
|
||||
(void) dev_addr;
|
||||
(void) event;
|
||||
(void) xferred_bytes;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -147,6 +149,8 @@ void msc_app_init(void)
|
||||
//------------- main task -------------//
|
||||
OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para)
|
||||
{
|
||||
(void) p_task_para;
|
||||
|
||||
OSAL_TASK_LOOP_BEGIN
|
||||
|
||||
bool is_any_disk_mounted;
|
||||
|
||||
Reference in New Issue
Block a user