diff options
Diffstat (limited to 'usb_extra.c')
| -rw-r--r-- | usb_extra.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usb_extra.c b/usb_extra.c index 94c317d98..9bc0c3f5f 100644 --- a/usb_extra.c +++ b/usb_extra.c | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | #include <avr/interrupt.h> | 1 | #include <avr/interrupt.h> |
| 2 | #include "usb_extra.h" | 2 | #include "usb_extra.h" |
| 3 | 3 | ||
| 4 | int8_t usb_extra_send(uint8_t bits) | 4 | |
| 5 | int8_t usb_extra_send(uint8_t report_id, uint8_t bits) | ||
| 5 | { | 6 | { |
| 6 | uint8_t intr_state, timeout; | 7 | uint8_t intr_state, timeout; |
| 7 | 8 | ||
| @@ -24,10 +25,20 @@ int8_t usb_extra_send(uint8_t bits) | |||
| 24 | UENUM = EXTRA_ENDPOINT; | 25 | UENUM = EXTRA_ENDPOINT; |
| 25 | } | 26 | } |
| 26 | 27 | ||
| 27 | UEDATX = 1; // report id | 28 | UEDATX = report_id; |
| 28 | UEDATX = bits; | 29 | UEDATX = bits; |
| 29 | 30 | ||
| 30 | UEINTX = 0x3A; | 31 | UEINTX = 0x3A; |
| 31 | SREG = intr_state; | 32 | SREG = intr_state; |
| 32 | return 0; | 33 | return 0; |
| 33 | } | 34 | } |
| 35 | |||
| 36 | int8_t usb_extra_audio_send(uint8_t bits) | ||
| 37 | { | ||
| 38 | return usb_extra_send(1, bits); | ||
| 39 | } | ||
| 40 | |||
| 41 | int8_t usb_extra_system_send(uint8_t bits) | ||
| 42 | { | ||
| 43 | return usb_extra_send(2, bits); | ||
| 44 | } | ||
