Treball de Recerca - Recercat
Treball de Recerca - Recercat
Treball de Recerca - Recercat
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
⋅ int cwiid_set_mesg_callback(cwiid_wiimote_t *wiimote,<br />
cwiid_mesg_callback_t *callback);<br />
Rep un punter a una estructura wiimote i un punter a la funció que es cridarà quan<br />
es rebi un missatge. Retorna un valor diferent <strong>de</strong> zero en cas d’error. Marca la funció<br />
especificada com al gallet per als events <strong>de</strong>l comandament.<br />
⋅ int cwiid_command(cwiid_wiimote_t *wiimote, enum cwiid_command<br />
command, int flags);<br />
Rep un punter a una estructura wiimote, l’acció que s’ha d’executar i opcions<br />
específiques per a algunes accions. Retorna un valor diferent <strong>de</strong> zero en cas d’error.<br />
Executa l’acció requerida al comandament especificat. Les accions po<strong>de</strong>n ser:<br />
⋅ CWIID_CMD_STATUS<br />
Demana l’estat <strong>de</strong>l comandament. Les opcions són ignora<strong>de</strong>s.<br />
⋅ CWIID_CMD_LED<br />
Activa els LED especificats per les opcions:<br />
⋅ CWIID_LED1_ON<br />
⋅ CWIID_LED2_ON<br />
⋅ CWIID_LED3_ON<br />
⋅ CWIID_LED4_ON<br />
S’utilitzen com a bits i po<strong>de</strong>n ser uni<strong>de</strong>s amb l’operador binari OR (|).<br />
⋅ CWIID_CMD_RUMBLE<br />
Activa la vibració el comandament<br />
⋅ CWIID_CMD_RPT_MODE<br />
Activa el mo<strong>de</strong> d’informe <strong>de</strong>l comandament. Les opcions són:<br />
⋅ CWIID_RPT_STATUS<br />
⋅ CWIID_RPT_BTN<br />
⋅ CWIID_RPT_ACC<br />
⋅ CWIID_RPT_IR<br />
⋅ CWIID_RPT_NUNCHUK<br />
⋅ CWIID_RPT_CLASSIC<br />
⋅ CWIID_RPT_EXT<br />
S’utilitzen com a bits i po<strong>de</strong>n ser uni<strong>de</strong>s amb l’operador binari OR (|).<br />
23