summaryrefslogtreecommitdiff
path: root/drivers/dahdi/oct612x/test.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-08-13 19:38:32 +0000
committerShaun Ruffell <sruffell@digium.com>2010-08-13 19:38:32 +0000
commitd0bee2cdc4164114734d9a9ff13be63908181d22 (patch)
tree721282d1724d8279fb4189d284c1ff4cfa02ff55 /drivers/dahdi/oct612x/test.c
parentdbd50c8eb5dd7d0cdc386a7acc09423f1f448517 (diff)
wct4xxp: Move 'oct612x' from an svn:external directly into dahdi-linux.
From http://svn.digium.com/svn/octasic_api/oct612x/tags/PR49-03/software@44 This is only currently maintained as part of DAHDI linux so it makes sense to have it directly in DAHDI linux. This obliterates any chance of having 0 checkpatch.pl errors between the 2.3.0 and 2.4.0 releases. Oh well... Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9138 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/oct612x/test.c')
-rw-r--r--drivers/dahdi/oct612x/test.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/dahdi/oct612x/test.c b/drivers/dahdi/oct612x/test.c
new file mode 100644
index 0000000..0105e58
--- /dev/null
+++ b/drivers/dahdi/oct612x/test.c
@@ -0,0 +1,46 @@
+/*
+ NOTE: This is not intended to be a functional program. Its only purpose
+ is to act as a tool to find out what portions of the Octasic API kit we
+ actually need to link into our drivers. As such, it references every API
+ call that the actual drivers use, and we let the compiler and linker tell
+ us what parts of each API module are actually needed to successfully
+ build this program.
+ */
+#include "oct6100api/oct6100_api.h"
+
+int main(int argc, char **argv)
+{
+ tPOCT6100_INSTANCE_API pApiInstance;
+ UINT32 ulResult;
+ tOCT6100_CHANNEL_MODIFY modify;
+ tOCT6100_INTERRUPT_FLAGS InterruptFlags;
+ tOCT6100_TONE_EVENT tonefound;
+ tOCT6100_EVENT_GET_TONE tonesearch;
+ tOCT6100_CHIP_OPEN ChipOpen;
+ tOCT6100_GET_INSTANCE_SIZE InstanceSize;
+ tOCT6100_CHANNEL_OPEN ChannelOpen;
+ tOCT6100_TONE_DETECTION_ENABLE enable;
+ tOCT6100_CHIP_CLOSE ChipClose;
+ tOCT6100_API_GET_CAPACITY_PINS CapacityPins;
+
+ Oct6100ChannelModifyDef(&modify);
+ ulResult = Oct6100ChannelModify(pApiInstance, &modify);
+ Oct6100InterruptServiceRoutineDef(&InterruptFlags);
+ Oct6100InterruptServiceRoutine(pApiInstance, &InterruptFlags);
+ Oct6100EventGetToneDef(&tonesearch);
+ ulResult = Oct6100EventGetTone(pApiInstance, &tonesearch);
+ Oct6100ChipOpenDef(&ChipOpen);
+ Oct6100GetInstanceSizeDef(&InstanceSize);
+ ulResult = Oct6100GetInstanceSize(&ChipOpen, &InstanceSize);
+ ulResult = Oct6100ChipOpen(pApiInstance, &ChipOpen);
+ Oct6100ChannelOpenDef(&ChannelOpen);
+ ulResult = Oct6100ChannelOpen(pApiInstance, &ChannelOpen);
+ Oct6100ToneDetectionEnableDef(&enable);
+ Oct6100ToneDetectionEnable(pApiInstance, &enable);
+ Oct6100ChipCloseDef(&ChipClose);
+ ulResult = Oct6100ChipClose(pApiInstance, &ChipClose);
+ Oct6100ApiGetCapacityPinsDef(&CapacityPins);
+ ulResult = Oct6100ApiGetCapacityPins(&CapacityPins);
+
+ return 0;
+}