/* Copyright 1997 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* File: dialler.h * Purpose: Interface to Dialler SWIs, status codes etc. * Author: B Laughton * History: 07-Feb-97: BAL: created * 25-Feb-97: BAL: added reason code masks courtesy of AH * added R0 bit mask for entry to SWI Dialler_Status */ #ifndef dialler_h #define dialler_h /* ============================================================================= * Include header files */ /* CLib */ #include "kernel.h" /* ============================================================================= * Define contants */ #ifndef Dialler_Dial #define Dialler_Dial 0x04c6c0 #define Dialler_HangUp 0x04c6c1 #define Dialler_Status 0x04c6c2 #define Dialler_Answering 0x04c6c3 #define Dialler_Configure 0x04c6c4 #define Dialler_Register 0x04c6c5 #define Dialler_Arbitrate 0x04c6c6 #define Dialler_Timeout 0x04c6c7 #define Dialler_ResetCounter 0x04c6c8 #endif /* Bit masks for r0 flags word on entry to SWI Dialler_Status */ #define Dialler_Status_ConnectTime (1u<<0) #define Dialler_Status_StatusString (1u<<1) /* SWI Dialler_Arbitrate entry and exit values */ #define Dialler_Arbitrate_RequestIOAccess 0 #define Dialler_Arbitrate_RelinquishAccess 1 #define Dialler_IOAccessGranted_BlockDrivers 0 #define Dialler_IOAccessGranted_DualSerial 1 #define Dialler_IOAccessDenied_ActiveClient 64 #define Dialler_IOAccessDenied_NotConnected 65 #define Service_DiallerStatus 0xb4 /* Reason code masks */ #define Dialler_MajorReasonCodeMask 0xffff0000 #define Dialler_MinorReasonCodeMask 0x0000ff00 #define Dialler_GeneralInfoMask 0x000000ff /* Major reason code (top two bytes of status word) */ #define Dialler_StateChanged 0x00010000 #define Dialler_LineDropped 0x00020000 #define Dialler_StatusChanged 0x00040000 /* Minor reason code (2nd byte of status word) */ #define Dialler_ConnectedFlagsMask 0x00000300 #define Dialler_Disconnected 0x00000000 #define Dialler_Connected 0x00000200 #define Dialler_ConnectedOutgoing 0x00000200 #define Dialler_ConnectedIncoming 0x00000300 #define Dialler_RelinquishAccess 0x00000400 #define Dialler_DiallerDroppedLine 0x00000000 #define Dialler_RemoteDroppedLine 0x00000800 /* General info (1st byte of status word) */ enum { Dialler_ExecutingScript_Dial = 1, Dialler_ExecutingScript_Hangup, Dialler_ExecutingScript_Answer, Dialler_AbortedScript_Syntax, Dialler_AbortedScript_Timeout, Dialler_AbortedScript_NoCarrier, Dialler_AbortedScript_Error, Dialler_AbortedScript_NoDialtone, Dialler_AbortedScript_Busy, Dialler_AbortedScript_NoAnswer }; #endif