Kulmapaikka:Ajankohtaista
Siirry navigaatioon
Siirry hakuun
TODO
- Steam-tilastot
- RSS-aggregoija
- Pelipalvelin status
phpinfo();
phpinfo();
phpinfo();
phpinfo();
http://www.mediawiki.org/wiki/Extension:EmbedVideo
{{#ev:youtube|of4AZ3zG0g8}}
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include "buffer.h"
#include "hw.h"
#include "main.h"
#include "usbdrv/usbdrv.h"
buf_t m324_tx_buffer;
uint16_t bytes_remaining = 0;
usbMsgLen_t usbFunctionSetup(uchar data[8])
{
usbRequest_t *rq = (void *)data;
switch(rq->bRequest)
{
case CUSTOM_RQ_WRITE_DATA:
bytes_remaining = rq->wLength.word;
if(bytes_remaining > buf_free(&m324_tx_buffer))
bytes_remaining = buf_free(&m324_tx_buffer);
return USB_NO_MSG; // Tell the driver to use usbFunctionWrite()
case CUSTOM_RQ_POWER_ON:
POWER_ON();
break;
case CUSTOM_RQ_POWER_OFF:
POWER_OFF();
break;
default:
break;
}
return 0; /* default for not implemented requests: return no data back to host */
}