##### Shinobi Library - Get Peripheral Data Function

# pdTmrAlarm

Peripheral alarm

### FORMAT

`

  Sint32 pdTmrAlarm( port, *data )
  Uint32 port
  Uint8 *data

`

### PARAMETER

  `port` | Port number
  `data` | Alarm data(4 bytes)

### RETURN

  PDD_TMRERR_OK | "Get time" request success |
  PDD_TMRERR_NO_TIMER | No device with a timer is connected |
  PDD_TMRERR_BUSY | Device busy |

### DESCRIPTION

  Sounds the alarm in a device, such as visual memory, that has a timer.

  Of the four bytes of alarm data, the upper two bytes are for buzzer 1 and the lower two bytes are for buzzer 2.

  To prevent both buzzers from sounding, write "00h" to both of the two bytes.

  Port numbers specified in `port` are as follows.

  PDD_PORT_A1 | Control port A expansion socket 1
  PDD_PORT_A2 | Control port A expansion socket 2
  PDD_PORT_B1 | Control port B expansion socket 1
  PDD_PORT_B2 | Control port B expansion socket 2
  PDD_PORT_C1 | Control port C expansion socket 1
  PDD_PORT_C2 | Control port C expansion socket 2
  PDD_PORT_D1 | Control port D expansion socket 1
  PDD_PORT_D2 | Control port D expansion socket 2

### EXAMPLE

        Uint8  data[4];
        Uint32 ret;
        data[0] = 0xc0;
        data[1] = 0x80;
        data[2] = 0x00;
        data[3] = 0x00;
        ret = pdTmrAlarm(PDD_PORT_A1, data);
        if (ret != PDD_TMRERR_OK) {
          /* Did not sound */
        }

### NOTE

  Because only buzzer 1 is currently supported, do not use buzzer 2.

pdTmrAlarm

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999