1
0
mirror of https://github.com/raphnet/gc_n64_usb-v3 synced 2024-12-21 23:08:53 -05:00

Add a function to test if USB interrupt send would block

This commit is contained in:
Raphael Assenat 2015-10-17 17:43:44 -04:00
parent 54196a0d76
commit 39e7ba9d49
2 changed files with 6 additions and 0 deletions

5
usb.c
View File

@ -604,6 +604,11 @@ ISR(USB_COM_vect)
#endif
}
char usb_interruptReady(void)
{
return interrupt_data_len == -1;
}
void usb_interruptSend(void *data, int len)
{
uint8_t sreg = SREG;

1
usb.h
View File

@ -198,6 +198,7 @@ struct usb_parameters {
struct usb_hid_parameters hid_params[MAX_HID_INTERFACES];
};
char usb_interruptReady(void);
void usb_interruptSend(void *data, int len); // EP1
void usb_init(const struct usb_parameters *params);
void usb_doTasks(void);