Changes between Version 3 and Version 4 of libwiimote

Show
Ignore:
Timestamp:
02/28/07 18:06:57 (6 years ago)
Author:
dsmith
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • libwiimote

    v3 v4  
    66wiimote_t *wiimote_connect(bdaddr_t bdaddr, wiimote_mesg_callback_t *mesg_callback, int *id); 
    77}}} 
     8==== Parameters ==== 
     9 bdaddr:: in: bluetooth device address of the wiimote.  Use `*BDADDR_ANY` to connect to the any (one) available wiimote. 
     10 mesg_callback:: in: message callback function 
     11 id:: out: `NULL`, or pointer to unique id 
    812==== Description ==== 
    913Connect to a wiimote. 
    10 ==== Parameters ==== 
    11  bdaddr:: 
    12   in: bluetooth device address of the wiimote.  Use `*BDADDR_ANY` to connect to the any (one) available wiimote. 
    13  mesg_callback:: 
    14   in: message callback function 
    15  id:: 
    16   out: `NULL`, or pointer to unique id 
    1714==== Return Value ==== 
    18 wiimote handle, or NULL on error 
     15wiimote handle, or `NULL` on error 
    1916---- 
    2017 
     
    2522int wiimote_disconnect(wiimote_t *wiimote); 
    2623}}} 
     24==== Parameters ==== 
     25 wiimote:: wiimote handle 
    2726==== Description ==== 
    28 Disconnect from a wiimote. 
    29 ==== Parameters ==== 
    30  wiimote:: 
    31   wiimote handle 
     27Disconnect from `wiimote`. 
    3228==== Return Value ==== 
    33 zero on success, nonzero on error 
     29zero on success or nonzero on error 
    3430---- 
    3531 
     
    4036int wiimote_command(wiimote_t *wiimote, enum wiimote_command command, unsigned char flags); 
    4137}}} 
     38==== Parameters ==== 
     39 wiimote:: wiimote handle 
     40 command:: wiimote command 
     41 flags:: command-specific flags 
    4242==== Description ==== 
    43 Issue a command to a wiimote. 
    44 ==== Parameters ==== 
    45  wiimote:: 
    46   wiimote handle 
    47  command:: 
    48   * WIIMOTE_CMD_STATUS:: 
    49       Request a status message (delivered to the message callback) 
    50   * WIIMOTE_CMD_LED:: 
    51       Set the LED state 
     43Issue command to wiimote. 
     44===== Commands and associated flags ===== 
     45 `WIIMOTE_CMD_STATUS`:: Request a status message (delivered to the message callback) (flags ignored) 
     46 `WIIMOTE_CMD_LED`:: Set the LED state.  The following flags may be bitwise ORed: 
     47 * `WIIMOTE_LED1_ON` 
     48 * `WIIMOTE_LED2_ON` 
     49 * `WIIMOTE_LED3_ON` 
     50 * `WIIMOTE_LED4_ON` 
     51 `WIIMOTE_CMD_RUMBLE`:: Set the Rumble state.  Set flags to 0 for off, anything else for on. 
     52 `WIIMOTE_CMD_RPT_MODE`:: Set the reporting mode of the wiimote, which determines which messages are delivered to the message callback. 
     53 The following flags may be bitwise ORed (Note that it may not be assumed that each flag is a single bit - specifically, `WIIMOTE_RPT_EXT = WIIMOTE_RPT_NUNCHUK | WIIMOTE_RPT_CLASSIC`): 
     54 * `WIIMOTE_RPT_STATUS` 
     55 * `WIIMOTE_RPT_BTN` 
     56 * `WIIMOTE_RPT_ACC` 
     57 * `WIIMOTE_RPT_IR` 
     58 * `WIIMOTE_RPT_NUNCHUK` 
     59 * `WIIMOTE_RPT_CLASSIC` 
     60 * `WIIMOTE_RPT_EXT` 
     61 ` 
     62==== Return Value ==== 
     63zero on success or nonzero on error 
    5264---- 
    5365 
     66=== wiimote_read === 
     67==== Synopsis ==== 
    5468{{{ 
    5569#!c 
    5670int wiimote_read(wiimote_t *wiimote, unsigned int flags, unsigned int offset, unsigned int len, unsigned char *data); 
    5771}}} 
     72==== Parameters ==== 
     73 wiimote:: wiimote handle 
     74 command:: wiimote command 
     75 flags:: command-specific flags 
    5876 
     77---- 
    5978{{{ 
    6079#!c