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:
parent
54196a0d76
commit
39e7ba9d49
5
usb.c
5
usb.c
@ -604,6 +604,11 @@ ISR(USB_COM_vect)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char usb_interruptReady(void)
|
||||||
|
{
|
||||||
|
return interrupt_data_len == -1;
|
||||||
|
}
|
||||||
|
|
||||||
void usb_interruptSend(void *data, int len)
|
void usb_interruptSend(void *data, int len)
|
||||||
{
|
{
|
||||||
uint8_t sreg = SREG;
|
uint8_t sreg = SREG;
|
||||||
|
1
usb.h
1
usb.h
@ -198,6 +198,7 @@ struct usb_parameters {
|
|||||||
struct usb_hid_parameters hid_params[MAX_HID_INTERFACES];
|
struct usb_hid_parameters hid_params[MAX_HID_INTERFACES];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
char usb_interruptReady(void);
|
||||||
void usb_interruptSend(void *data, int len); // EP1
|
void usb_interruptSend(void *data, int len); // EP1
|
||||||
void usb_init(const struct usb_parameters *params);
|
void usb_init(const struct usb_parameters *params);
|
||||||
void usb_doTasks(void);
|
void usb_doTasks(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user