2
NOTE: This is not intended to be a functional program. Its only purpose
3
is to act as a tool to find out what portions of the Octasic API kit we
4
actually need to link into our drivers. As such, it references every API
5
call that the actual drivers use, and we let the compiler and linker tell
6
us what parts of each API module are actually needed to successfully
9
#include "oct6100api/oct6100_api.h"
11
int main(int argc, char **argv)
13
tPOCT6100_INSTANCE_API pApiInstance;
15
tOCT6100_CHANNEL_MODIFY modify;
16
tOCT6100_INTERRUPT_FLAGS InterruptFlags;
17
tOCT6100_TONE_EVENT tonefound;
18
tOCT6100_EVENT_GET_TONE tonesearch;
19
tOCT6100_CHIP_OPEN ChipOpen;
20
tOCT6100_GET_INSTANCE_SIZE InstanceSize;
21
tOCT6100_CHANNEL_OPEN ChannelOpen;
22
tOCT6100_TONE_DETECTION_ENABLE enable;
23
tOCT6100_CHIP_CLOSE ChipClose;
25
Oct6100ChannelModifyDef(&modify);
26
ulResult = Oct6100ChannelModify(pApiInstance, &modify);
27
Oct6100InterruptServiceRoutineDef(&InterruptFlags);
28
Oct6100InterruptServiceRoutine(pApiInstance, &InterruptFlags);
29
Oct6100EventGetToneDef(&tonesearch);
30
ulResult = Oct6100EventGetTone(pApiInstance, &tonesearch);
31
Oct6100ChipOpenDef(&ChipOpen);
32
Oct6100GetInstanceSizeDef(&InstanceSize);
33
ulResult = Oct6100GetInstanceSize(&ChipOpen, &InstanceSize);
34
ulResult = Oct6100ChipOpen(pApiInstance, &ChipOpen);
35
Oct6100ChannelOpenDef(&ChannelOpen);
36
ulResult = Oct6100ChannelOpen(pApiInstance, &ChannelOpen);
37
Oct6100ToneDetectionEnableDef(&enable);
38
Oct6100ToneDetectionEnable(pApiInstance, &enable);
39
Oct6100ChipCloseDef(&ChipClose);
40
ulResult = Oct6100ChipClose(pApiInstance, &ChipClose);