diff options
| author | hathach <[email protected]> | 2014-03-10 13:13:13 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-10 13:13:13 +0700 |
| commit | ad72db5aeacf7d969f5c091c59a2f279eaf1c19c (patch) | |
| tree | 328b462bcd4443e1eadba638509ebb4076b36b04 /demos/host/src | |
| parent | 1c73d2f923aade6c6640d41c4b9dc3ec8865d3da (diff) | |
change IAR TUSB_CFG_ATTR_USBRAM to _Pragma("location=\".ahb_sram1\"") instead of @ .ahb_sram1 so that we can place it before the variable for a cleaner code
change pipe xfer API buffer from void* to uint8_t*
change FIFO_DEF to have a separated buffer to be compatible with IAR\
refractor IAR data alignment pragma
Diffstat (limited to 'demos/host/src')
| -rw-r--r-- | demos/host/src/cdc_serial_app.c | 4 | ||||
| -rw-r--r-- | demos/host/src/cli.c | 2 | ||||
| -rw-r--r-- | demos/host/src/keyboard_app.c | 2 | ||||
| -rw-r--r-- | demos/host/src/mouse_app.c | 2 | ||||
| -rw-r--r-- | demos/host/src/msc_app.c | 2 | ||||
| -rw-r--r-- | demos/host/src/tusb_config.h | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/demos/host/src/cdc_serial_app.c b/demos/host/src/cdc_serial_app.c index db97bd87c..208cb28a6 100644 --- a/demos/host/src/cdc_serial_app.c +++ b/demos/host/src/cdc_serial_app.c @@ -51,8 +51,8 @@ OSAL_SEM_DEF(serial_semaphore); static osal_semaphore_handle_t sem_hdl;
-static uint8_t serial_in_buffer[32] TUSB_CFG_ATTR_USBRAM;
-static uint8_t serial_out_buffer[32] TUSB_CFG_ATTR_USBRAM;
+TUSB_CFG_ATTR_USBRAM static uint8_t serial_in_buffer[32];
+TUSB_CFG_ATTR_USBRAM static uint8_t serial_out_buffer[32];
static uint8_t received_bytes; // set by transfer complete callback
diff --git a/demos/host/src/cli.c b/demos/host/src/cli.c index 8816d43ba..d67379b9b 100644 --- a/demos/host/src/cli.c +++ b/demos/host/src/cli.c @@ -135,8 +135,8 @@ static cli_cmdfunc_t cli_command_tbl[] = //--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
+TUSB_CFG_ATTR_USBRAM uint8_t fileread_buffer[CLI_FILE_READ_BUFFER];
static char cli_buffer[CLI_MAX_BUFFER];
-uint8_t fileread_buffer[CLI_FILE_READ_BUFFER] TUSB_CFG_ATTR_USBRAM;
static char volume_label[20];
static inline void drive_number2letter(char * p_path) ATTR_ALWAYS_INLINE;
diff --git a/demos/host/src/keyboard_app.c b/demos/host/src/keyboard_app.c index 907ae8c2e..c004059ef 100644 --- a/demos/host/src/keyboard_app.c +++ b/demos/host/src/keyboard_app.c @@ -56,7 +56,7 @@ OSAL_TASK_DEF(keyboard_app_task, 128, KEYBOARD_APP_TASK_PRIO); OSAL_QUEUE_DEF(queue_kbd_def, QUEUE_KEYBOARD_REPORT_DEPTH, hid_keyboard_report_t);
static osal_queue_handle_t queue_kbd_hdl;
-static hid_keyboard_report_t usb_keyboard_report TUSB_CFG_ATTR_USBRAM;
+TUSB_CFG_ATTR_USBRAM static hid_keyboard_report_t usb_keyboard_report;
static inline uint8_t keycode_to_ascii(uint8_t modifier, uint8_t keycode) ATTR_CONST ATTR_ALWAYS_INLINE;
static inline void process_kbd_report(hid_keyboard_report_t const * report);
diff --git a/demos/host/src/mouse_app.c b/demos/host/src/mouse_app.c index 60b91f4d2..4fabd4f36 100644 --- a/demos/host/src/mouse_app.c +++ b/demos/host/src/mouse_app.c @@ -56,7 +56,7 @@ OSAL_TASK_DEF(mouse_app_task, 128, MOUSE_APP_TASK_PRIO); OSAL_QUEUE_DEF(queue_mouse_def, QUEUE_MOUSE_REPORT_DEPTH, hid_mouse_report_t);
static osal_queue_handle_t queue_mouse_hdl;
-static hid_mouse_report_t usb_mouse_report TUSB_CFG_ATTR_USBRAM;
+TUSB_CFG_ATTR_USBRAM static hid_mouse_report_t usb_mouse_report;
static inline void process_mouse_report(hid_mouse_report_t const * p_report);
diff --git a/demos/host/src/msc_app.c b/demos/host/src/msc_app.c index b7e909cee..5bd66c9d6 100644 --- a/demos/host/src/msc_app.c +++ b/demos/host/src/msc_app.c @@ -57,7 +57,7 @@ //--------------------------------------------------------------------+
OSAL_TASK_DEF(msc_app_task, 512, MSC_APP_TASK_PRIO);
-static FATFS fatfs[TUSB_CFG_HOST_DEVICE_MAX] TUSB_CFG_ATTR_USBRAM;
+TUSB_CFG_ATTR_USBRAM static FATFS fatfs[TUSB_CFG_HOST_DEVICE_MAX];
//--------------------------------------------------------------------+
// tinyusb callback (ISR context)
diff --git a/demos/host/src/tusb_config.h b/demos/host/src/tusb_config.h index 3315897cf..e12f020a6 100644 --- a/demos/host/src/tusb_config.h +++ b/demos/host/src/tusb_config.h @@ -115,7 +115,7 @@ #elif defined __ICCARM__ // compiled with IAR
- #define TUSB_CFG_ATTR_USBRAM @ ".ahb_sram1"
+ #define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
#else
|
