ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/AmigaOS/serial_amiga.cpp
(Generate patch)

Comparing BasiliskII/src/AmigaOS/serial_amiga.cpp (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.6 by jlachmann, 2002-06-23T08:27:05Z

# Line 1 | Line 1
1   /*
2   *  serial_amiga.cpp - Serial device driver, AmigaOS specific stuff
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2001 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 26 | Line 26
26   #include <dos/dostags.h>
27   #include <devices/serial.h>
28   #include <devices/parallel.h>
29 + #define __USE_SYSBASE
30   #include <proto/exec.h>
31   #include <proto/dos.h>
32 + #include <inline/exec.h>
33 + #include <inline/dos.h>
34  
35   #include "sysdeps.h"
36   #include "cpu_emulation.h"
# Line 85 | Line 88 | public:
88          {
89          }
90  
91 <        virtual int16 Open(uint16 config);
92 <        virtual int16 PrimeIn(uint32 pb, uint32 dce);
93 <        virtual int16 PrimeOut(uint32 pb, uint32 dce);
94 <        virtual int16 Control(uint32 pb, uint32 dce, uint16 code);
95 <        virtual int16 Status(uint32 pb, uint32 dce, uint16 code);
96 <        virtual int16 Close(void);
91 >        virtual int16 open(uint16 config);
92 >        virtual int16 prime_in(uint32 pb, uint32 dce);
93 >        virtual int16 prime_out(uint32 pb, uint32 dce);
94 >        virtual int16 control(uint32 pb, uint32 dce, uint16 code);
95 >        virtual int16 status(uint32 pb, uint32 dce, uint16 code);
96 >        virtual int16 close(void);
97  
98   private:
99          bool configure(uint16 config);
# Line 147 | Line 150 | void SerialExit(void)
150   *  Open serial port
151   */
152  
153 < int16 ASERDPort::Open(uint16 config)
153 > int16 ASERDPort::open(uint16 config)
154   {
155          // Don't open NULL name devices
156          if (device_name == NULL)
# Line 166 | Line 169 | int16 ASERDPort::Open(uint16 config)
169          proc_arg = this;
170          SetSignal(0, SIGF_SINGLE);
171          serial_proc = CreateNewProcTags(
172 <                NP_Entry, serial_func,
173 <                NP_Name, "Basilisk II Serial Task",
172 >                NP_Entry, (ULONG)serial_func,
173 >                NP_Name, (ULONG)"Basilisk II Serial Task",
174                  NP_Priority, 1,
175                  TAG_END
176          );
# Line 199 | Line 202 | open_error:
202   *  Read data from port
203   */
204  
205 < int16 ASERDPort::PrimeIn(uint32 pb, uint32 dce)
205 > int16 ASERDPort::prime_in(uint32 pb, uint32 dce)
206   {
207          // Send input command to serial process
208          D(bug("primein\n"));
# Line 215 | Line 218 | int16 ASERDPort::PrimeIn(uint32 pb, uint
218   *  Write data to port
219   */
220  
221 < int16 ASERDPort::PrimeOut(uint32 pb, uint32 dce)
221 > int16 ASERDPort::prime_out(uint32 pb, uint32 dce)
222   {
223          // Send output command to serial process
224          D(bug("primeout\n"));
# Line 231 | Line 234 | int16 ASERDPort::PrimeOut(uint32 pb, uin
234   *      Control calls
235   */
236  
237 < int16 ASERDPort::Control(uint32 pb, uint32 dce, uint16 code)
237 > int16 ASERDPort::control(uint32 pb, uint32 dce, uint16 code)
238   {
239          D(bug("control(%ld)\n", (uint32)code));
240          switch (code) {
# Line 326 | Line 329 | int16 ASERDPort::Control(uint32 pb, uint
329   *      Status calls
330   */
331  
332 < int16 ASERDPort::Status(uint32 pb, uint32 dce, uint16 code)
332 > int16 ASERDPort::status(uint32 pb, uint32 dce, uint16 code)
333   {
334          D(bug("status(%ld)\n", (uint32)code));
335          switch (code) {
# Line 381 | Line 384 | int16 ASERDPort::Status(uint32 pb, uint3
384   *      Close serial port
385   */
386  
387 < int16 ASERDPort::Close()
387 > int16 ASERDPort::close()
388   {
389          // Stop process
390          if (serial_proc) {
# Line 669 | Line 672 | __saveds void ASERDPort::serial_func(voi
672                  ((IOExtPar *)read_io)->io_ParFlags = PARF_SHARED;
673          else
674                  read_io->io_SerFlags = SERF_SHARED | SERF_7WIRE;
675 <        if (OpenDevice((UBYTE *)dev_name, dev_unit, (struct IORequest *)read_io, 0) || read_io->IOSer.io_Device == NULL)
675 >        if (OpenDevice((UBYTE *) dev_name, dev_unit, (struct IORequest *)read_io, 0) || read_io->IOSer.io_Device == NULL)
676                  goto quit;
677          opened = true;
678  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines