From 9019c901dd7b4e37006eb1f0442a57dacc0b3f0c Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 18 Nov 2010 22:35:49 +0900 Subject: add system controls(power down/wake up) from generic desktop page(HID) --- usb_extra.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'usb_extra.c') diff --git a/usb_extra.c b/usb_extra.c index 94c317d981..9bc0c3f5f3 100644 --- a/usb_extra.c +++ b/usb_extra.c @@ -1,7 +1,8 @@ #include #include "usb_extra.h" -int8_t usb_extra_send(uint8_t bits) + +int8_t usb_extra_send(uint8_t report_id, uint8_t bits) { uint8_t intr_state, timeout; @@ -24,10 +25,20 @@ int8_t usb_extra_send(uint8_t bits) UENUM = EXTRA_ENDPOINT; } - UEDATX = 1; // report id + UEDATX = report_id; UEDATX = bits; UEINTX = 0x3A; SREG = intr_state; return 0; } + +int8_t usb_extra_audio_send(uint8_t bits) +{ + return usb_extra_send(1, bits); +} + +int8_t usb_extra_system_send(uint8_t bits) +{ + return usb_extra_send(2, bits); +} -- cgit v1.2.3