mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 23:43:23 +00:00
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).
This commit is contained in:
parent
983225ae60
commit
5732be224c
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user