diff options
| author | hathach <[email protected]> | 2018-11-14 16:03:58 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-11-14 16:03:58 +0700 |
| commit | 5732be224c69c35efdc44f250e83e42cf52e2526 (patch) | |
| tree | 4057cfdc1da2abceedf22107525b7ef429b51358 | |
| parent | 983225ae606653202c4f1bba8e34a4a9825daa2a (diff) | |
update example for PR. correct share_control definition
- rename dcd,hal to dcd_samd51, hal_samd51 since some IDE has issue with
duplicated names (e.g keil, ses).
| -rw-r--r-- | examples/device/device_composite/src/msc_flash_qspi.c | 2 | ||||
| -rw-r--r-- | src/device/control.c | 2 | ||||
| -rw-r--r-- | src/device/control.h | 2 | ||||
| -rw-r--r-- | src/portable/microchip/samd21/dcd_samd21.c (renamed from src/portable/microchip/samd21/dcd.c) | 0 | ||||
| -rw-r--r-- | src/portable/microchip/samd21/hal_samd21.c (renamed from src/portable/microchip/samd21/hal.c) | 0 | ||||
| -rw-r--r-- | src/portable/microchip/samd51/dcd_samd51.c (renamed from src/portable/microchip/samd51/dcd.c) | 0 | ||||
| -rw-r--r-- | src/portable/microchip/samd51/hal_samd51.c (renamed from src/portable/microchip/samd51/hal.c) | 0 |
7 files changed, 4 insertions, 2 deletions
diff --git a/examples/device/device_composite/src/msc_flash_qspi.c b/examples/device/device_composite/src/msc_flash_qspi.c index 53bdc5a71..30adf1d92 100644 --- a/examples/device/device_composite/src/msc_flash_qspi.c +++ b/examples/device/device_composite/src/msc_flash_qspi.c @@ -61,7 +61,7 @@ int32_t tud_msc_read10_cb(uint8_t lun, uint32_t lba, uint32_t offset, void* buff // Callback invoked when received WRITE10 command. // Process data in buffer to disk's storage and return number of written bytes -int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, void* buffer, uint32_t bufsize) +int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t* buffer, uint32_t bufsize) { uint32_t addr = lba * CFG_TUD_MSC_BLOCK_SZ + offset; diff --git a/src/device/control.c b/src/device/control.c index 5856f0628..26dd8fb35 100644 --- a/src/device/control.c +++ b/src/device/control.c @@ -48,6 +48,8 @@ control_t control_state;
+CFG_TUSB_ATTR_USBRAM CFG_TUSB_MEM_ALIGN uint8_t _shared_control_buffer[64];
+
void controld_reset(uint8_t rhport) {
control_state.current_stage = CONTROL_STAGE_SETUP;
}
diff --git a/src/device/control.h b/src/device/control.h index 881c99ead..633ccb60c 100644 --- a/src/device/control.h +++ b/src/device/control.h @@ -61,7 +61,7 @@ typedef struct { uint8_t config;
} control_t;
-CFG_TUSB_ATTR_USBRAM CFG_TUSB_MEM_ALIGN uint8_t _shared_control_buffer[64];
+extern uint8_t _shared_control_buffer[64];
tusb_error_t controld_process_setup_request(uint8_t rhport, tusb_control_request_t const * const p_request);
diff --git a/src/portable/microchip/samd21/dcd.c b/src/portable/microchip/samd21/dcd_samd21.c index 33cbc8d92..33cbc8d92 100644 --- a/src/portable/microchip/samd21/dcd.c +++ b/src/portable/microchip/samd21/dcd_samd21.c diff --git a/src/portable/microchip/samd21/hal.c b/src/portable/microchip/samd21/hal_samd21.c index 524840be2..524840be2 100644 --- a/src/portable/microchip/samd21/hal.c +++ b/src/portable/microchip/samd21/hal_samd21.c diff --git a/src/portable/microchip/samd51/dcd.c b/src/portable/microchip/samd51/dcd_samd51.c index e67fbd295..e67fbd295 100644 --- a/src/portable/microchip/samd51/dcd.c +++ b/src/portable/microchip/samd51/dcd_samd51.c diff --git a/src/portable/microchip/samd51/hal.c b/src/portable/microchip/samd51/hal_samd51.c index d8c71a7fe..d8c71a7fe 100644 --- a/src/portable/microchip/samd51/hal.c +++ b/src/portable/microchip/samd51/hal_samd51.c |
