Ero sivun ”Kulmapaikka:Ajankohtaista” versioiden välillä
Siirry navigaatioon
Siirry hakuun
Ei muokkausyhteenvetoa |
p (Esimerkki uudesta ja mahtavasta syntaxhighlighterista) |
||
(5 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 4: | Rivi 4: | ||
* Pelipalvelin status | * Pelipalvelin status | ||
< | <source lang="php"> | ||
phpinfo(); | |||
phpinfo(); | |||
phpinfo(); | |||
phpinfo(); | |||
</source> | |||
http://www.mediawiki.org/wiki/Extension:EmbedVideo | |||
<source lang=" | {{#ev:youtube|of4AZ3zG0g8}} | ||
<source lang="cpp" collapse="true"> | |||
#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 */ | |||
} | |||
</source> |
Nykyinen versio 10. huhtikuuta 2013 kello 17.30
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 */
}