port | Port number |
data | Alarm data(4 bytes) |
PDD_TMRERR_OK | "Get time" request success | |
PDD_TMRERR_NO_TIMER | No device with a timer is connected | |
PDD_TMRERR_BUSY | Device busy |
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 |
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 */ }