Skip to content

Commit

Permalink
Update irritating url opening on first boot, lol :)
Browse files Browse the repository at this point in the history
  • Loading branch information
LouDnl committed Feb 23, 2025
1 parent 6af2a55 commit a608cbd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ enum
extern char dtype, ntype, cdc, asid, midi, wusb;

/* WebUSB globals */
#define URL "/github.com/LouDnl/USBSID-Pico"
#define URL "/usbsid.loudai.nl"
enum
{
VENDOR_REQUEST_WEBUSB = 1,
Expand Down
11 changes: 6 additions & 5 deletions src/usbsid.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,10 +725,13 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
case VENDOR_REQUEST_WEBUSB:
/* Match vendor request in BOS descriptor
* Get landing page url and return it
* if on default config first boot
*/
// Disabled for now due to constant opening of url on plugin of device
/* return tud_control_xfer(rhport, request, (void*)(uintptr_t) &desc_url, desc_url.bLength); */
return tud_control_status(rhport, request);
if (usbsid_config.default_config == 1) {
return tud_control_xfer(rhport, request, (void*)(uintptr_t) &desc_url, desc_url.bLength);
} else {
return tud_control_status(rhport, request);
}
case VENDOR_REQUEST_MICROSOFT:
if (request->wIndex == 7) {
/* Get Microsoft OS 2.0 compatible descriptor */
Expand Down Expand Up @@ -824,8 +827,6 @@ void core1_main(void)

int main()
{
(void)desc_url; /* NOTE: Remove if going to use it */

#if PICO_RP2040
/* System clock @ 125MHz */
set_sys_clock_pll(1500000000, 6, 2);
Expand Down

0 comments on commit a608cbd

Please sign in to comment.