| 1 |
/* |
| 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 |
| 7 |
build this program. |
| 8 |
*/ |
| 9 |
#include "oct6100api/oct6100_api.h" |
| 10 |
|
| 11 |
int main(int argc, char **argv) |
| 12 |
{ |
| 13 |
tPOCT6100_INSTANCE_API pApiInstance; |
| 14 |
UINT32 ulResult; |
| 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; |
| 24 |
tOCT6100_API_GET_CAPACITY_PINS CapacityPins; |
| 25 |
|
| 26 |
Oct6100ChannelModifyDef(&modify); |
| 27 |
ulResult = Oct6100ChannelModify(pApiInstance, &modify); |
| 28 |
Oct6100InterruptServiceRoutineDef(&InterruptFlags); |
| 29 |
Oct6100InterruptServiceRoutine(pApiInstance, &InterruptFlags); |
| 30 |
Oct6100EventGetToneDef(&tonesearch); |
| 31 |
ulResult = Oct6100EventGetTone(pApiInstance, &tonesearch); |
| 32 |
Oct6100ChipOpenDef(&ChipOpen); |
| 33 |
Oct6100GetInstanceSizeDef(&InstanceSize); |
| 34 |
ulResult = Oct6100GetInstanceSize(&ChipOpen, &InstanceSize); |
| 35 |
ulResult = Oct6100ChipOpen(pApiInstance, &ChipOpen); |
| 36 |
Oct6100ChannelOpenDef(&ChannelOpen); |
| 37 |
ulResult = Oct6100ChannelOpen(pApiInstance, &ChannelOpen); |
| 38 |
Oct6100ToneDetectionEnableDef(&enable); |
| 39 |
Oct6100ToneDetectionEnable(pApiInstance, &enable); |
| 40 |
Oct6100ChipCloseDef(&ChipClose); |
| 41 |
ulResult = Oct6100ChipClose(pApiInstance, &ChipClose); |
| 42 |
Oct6100ApiGetCapacityPinsDef(&CapacityPins); |
| 43 |
ulResult = Oct6100ApiGetCapacityPins(&CapacityPins); |
| 44 |
|
| 45 |
return 0; |
| 46 |
} |