Ero sivun ”Kulmapaikka:Ajankohtaista” versioiden välillä
Siirry navigaatioon
Siirry hakuun
pEi muokkausyhteenvetoa |
p (Testataan youtube-extensiota) |
||
Rivi 11: | Rivi 11: | ||
</code> | </code> | ||
{{#ev:youtube|of4AZ3zG0g8}} | |||
<code c n> | <code c n> |
Versio 18. joulukuuta 2012 kello 22.37
TODO
- Steam-tilastot
- RSS-aggregoija
- Pelipalvelin status
phpinfo();
phpinfo();
phpinfo();
phpinfo();
{{#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 */
}