1 /* Humusoft data acquisition library.
3 * Example that demonstrates using HudaqDOWriteMultipleBits.
4 * This function allows to influence only selected bits from
8 /* Copyright 2002-2007 Humusoft s.r.o. */
15 int main(int argc, char* argv[])
19 /* open a handle to the first MF624 device in the system */
20 h = HudaqOpenDevice("MF624", 1, 0);
23 printf("\nData acquisition device not found.\n");
27 /* HudaqOpenDevice initializes all digital output bits to 0 */
29 /* Set first and fifth bits to value '1'. */
30 HudaqDOWriteMultipleBits(h, 0, 0x11, 0x11);
31 printf("\nBits 1 and 5 are set. Press any key to continue.");
34 /* Reset bit 1 and set bit 6. */
35 HudaqDOWriteMultipleBits(h, 0, 0x21, 0x20);
36 printf("\nBit 1 is reset and bit 6 is set. Press any key to continue.");
40 /* close the device handle */