~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to oct612x/test.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2006-10-24 22:41:01 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20061024224101-464p4n2jk16n1jrh
Tags: 1:1.2.10.dfsg-2
* bristuff-0.3.0-PRE-1v
* Remove redundant GPL LICENCE text

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
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);
 
41
 
 
42
        return 0;
 
43
}