- move disconnection handle to enum task --> move tusbh_xxx_unmount is invoked in non-isr context
This commit is contained in:
@@ -460,7 +460,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>25</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>151</TopLine>
|
||||
<TopLine>152</TopLine>
|
||||
<CurrentLine>160</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\src\main.c</PathWithFileName>
|
||||
@@ -492,7 +492,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>127</TopLine>
|
||||
<TopLine>128</TopLine>
|
||||
<CurrentLine>135</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\src\keyboard_app.c</PathWithFileName>
|
||||
@@ -524,7 +524,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>1</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>53</TopLine>
|
||||
<TopLine>66</TopLine>
|
||||
<CurrentLine>86</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\src\rndis_app.c</PathWithFileName>
|
||||
@@ -556,7 +556,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>33</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>73</TopLine>
|
||||
<TopLine>74</TopLine>
|
||||
<CurrentLine>77</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\src\cli.c</PathWithFileName>
|
||||
@@ -612,7 +612,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>44</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>82</TopLine>
|
||||
<TopLine>95</TopLine>
|
||||
<CurrentLine>106</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\bsp\boards\printf_retarget.c</PathWithFileName>
|
||||
@@ -794,10 +794,10 @@
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>24</ColumnNumber>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>11</CurrentLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\tinyusb\host\hub.c</PathWithFileName>
|
||||
<FilenameWithoutPath>hub.c</FilenameWithoutPath>
|
||||
@@ -810,10 +810,10 @@
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<ColumnNumber>19</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<CurrentLine>18</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\tinyusb\host\usbh.c</PathWithFileName>
|
||||
<FilenameWithoutPath>usbh.c</FilenameWithoutPath>
|
||||
@@ -826,10 +826,10 @@
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>56</ColumnNumber>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>562</TopLine>
|
||||
<CurrentLine>578</CurrentLine>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\tinyusb\host\ehci\ehci.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ehci.c</FilenameWithoutPath>
|
||||
@@ -988,7 +988,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>240</TopLine>
|
||||
<TopLine>241</TopLine>
|
||||
<CurrentLine>249</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\tinyusb\class\msc_host.c</PathWithFileName>
|
||||
@@ -1060,7 +1060,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>3</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>572</TopLine>
|
||||
<TopLine>573</TopLine>
|
||||
<CurrentLine>580</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_cgu.c</PathWithFileName>
|
||||
@@ -1116,7 +1116,7 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>145</TopLine>
|
||||
<TopLine>146</TopLine>
|
||||
<CurrentLine>151</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName>
|
||||
@@ -1138,9 +1138,9 @@
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>51</ColumnNumber>
|
||||
<ColumnNumber>52</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>111</TopLine>
|
||||
<TopLine>107</TopLine>
|
||||
<CurrentLine>108</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\vendor\fatfs\diskio.c</PathWithFileName>
|
||||
|
||||
@@ -62,15 +62,16 @@ void tusbh_cdc_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application set-up
|
||||
|
||||
printf("a CDC device is mounted\n");
|
||||
printf("\na CDC device is mounted\n");
|
||||
|
||||
osal_queue_flush(queue_hdl);
|
||||
tusbh_cdc_receive(dev_addr, buffer_in, sizeof(buffer_in), true); // first report
|
||||
}
|
||||
|
||||
void tusbh_cdc_unmounted_isr(uint8_t dev_addr)
|
||||
void tusbh_cdc_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application tear-down
|
||||
printf("\na CDC device is unmounted\n");
|
||||
}
|
||||
|
||||
void tusbh_cdc_xfer_isr(uint8_t dev_addr, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes)
|
||||
|
||||
@@ -71,15 +71,16 @@ void tusbh_hid_keyboard_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application set-up
|
||||
|
||||
printf("a keyboard device is mounted\n");
|
||||
puts("\na Keyboard device is mounted");
|
||||
|
||||
osal_queue_flush(queue_kbd_hdl);
|
||||
tusbh_hid_keyboard_get_report(dev_addr, (uint8_t*) &usb_keyboard_report); // first report
|
||||
}
|
||||
|
||||
void tusbh_hid_keyboard_unmounted_isr(uint8_t dev_addr)
|
||||
void tusbh_hid_keyboard_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application tear-down
|
||||
puts("\na Keyboard device is unmounted");
|
||||
}
|
||||
|
||||
void tusbh_hid_keyboard_isr(uint8_t dev_addr, tusb_event_t event)
|
||||
|
||||
@@ -71,15 +71,16 @@ void tusbh_hid_mouse_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application set-up
|
||||
|
||||
printf("a mouse device is mounted\n");
|
||||
puts("\na Mouse device is mounted");
|
||||
|
||||
osal_queue_flush(queue_mouse_hdl);
|
||||
(void) tusbh_hid_mouse_get_report(dev_addr, (uint8_t*) &usb_mouse_report); // first report
|
||||
}
|
||||
|
||||
void tusbh_hid_mouse_unmounted_isr(uint8_t dev_addr)
|
||||
void tusbh_hid_mouse_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application tear-down
|
||||
puts("\na Mouse device is unmounted\n");
|
||||
}
|
||||
|
||||
void tusbh_hid_mouse_isr(uint8_t dev_addr, tusb_event_t event)
|
||||
|
||||
@@ -65,7 +65,7 @@ static FATFS fatfs[TUSB_CFG_HOST_DEVICE_MAX] TUSB_CFG_ATTR_USBRAM;
|
||||
//--------------------------------------------------------------------+
|
||||
void tusbh_msc_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
printf("an msc device is mounted\n");
|
||||
puts("\na MassStorage device is mounted");
|
||||
|
||||
//------------- Disk Information -------------//
|
||||
// SCSI VendorID[8] & ProductID[16] from Inquiry Command
|
||||
@@ -110,11 +110,11 @@ void tusbh_msc_mounted_cb(uint8_t dev_addr)
|
||||
}
|
||||
}
|
||||
|
||||
void tusbh_msc_unmounted_isr(uint8_t dev_addr)
|
||||
void tusbh_msc_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// unmount disk
|
||||
disk_state[dev_addr-1] = STA_NOINIT;
|
||||
puts("--");
|
||||
puts("\na MassStorage device is unmounted");
|
||||
}
|
||||
|
||||
void tusbh_msc_isr(uint8_t dev_addr, tusb_event_t event, uint32_t xferred_bytes)
|
||||
|
||||
@@ -51,7 +51,7 @@ void tusbh_cdc_rndis_mounted_cb(uint8_t dev_addr)
|
||||
{ // application set-up
|
||||
uint8_t mac_address[6];
|
||||
|
||||
printf("a RNDIS device is mounted\n");
|
||||
printf("\nan RNDIS device is mounted\n");
|
||||
tusbh_cdc_rndis_get_mac_addr(dev_addr, mac_address);
|
||||
|
||||
printf("MAC Address ");
|
||||
@@ -59,9 +59,10 @@ void tusbh_cdc_rndis_mounted_cb(uint8_t dev_addr)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void tusbh_cdc_rndis_unmounted_isr(uint8_t dev_addr)
|
||||
void tusbh_cdc_rndis_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application tear-down
|
||||
printf("\nan RNDIS device is unmounted\n");
|
||||
}
|
||||
|
||||
void rndis_app_init(void)
|
||||
|
||||
Reference in New Issue
Block a user