]> git.sur5r.net Git - cc65/commitdiff
API changes
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 22 Aug 2003 11:23:48 +0000 (11:23 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 22 Aug 2003 11:23:48 +0000 (11:23 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2406 b7a2c559-68d2-44c3-8de9-860c34a00d81

asminc/ser-kernel.inc
include/serial.h
libsrc/serial/Makefile
libsrc/serial/ser-kernel.s
libsrc/serial/ser_close.s [new file with mode: 0644]
libsrc/serial/ser_open.s [new file with mode: 0644]
libsrc/serial/ser_pause.s [deleted file]
libsrc/serial/ser_unpause.s [deleted file]

index 938799cc625d95548179da45380c9ac5cfbbbf02..30aa9b0f588f11b60f9594444ea46664bb495cfd 100644 (file)
@@ -42,15 +42,14 @@ SER_HDR_VERSION         = 3             ; Interface version
 SER_HDR_JUMPTAB         = 4
 SER_HDR_INSTALL         = SER_HDR_JUMPTAB+0     ; INSTALL routine
 SER_HDR_UNINSTALL       = SER_HDR_JUMPTAB+2     ; UNINSTALL routine
-SER_HDR_PARAMS          = SER_HDR_JUMPTAB+4     ; PARAMS routine
-SER_HDR_GET             = SER_HDR_JUMPTAB+6     ; GET routine
-SER_HDR_PUT             = SER_HDR_JUMPTAB+8     ; PUT routine
-SER_HDR_PAUSE           = SER_HDR_JUMPTAB+10    ; PAUSE routine
-SER_HDR_UNPAUSE         = SER_HDR_JUMPTAB+12    ; UNPAUSE routine
-SER_HDR_STATUS          = SER_HDR_JUMPTAB+14    ; STATUS routine
-SER_HDR_IOCTL           = SER_HDR_JUMPTAB+16    ; IOCTL routine
+SER_HDR_OPEN            = SER_HDR_JUMPTAB+4     ; OPEN routine
+SER_HDR_CLOSE           = SER_HDR_JUMPTAB+6     ; CLOSE routine
+SER_HDR_GET             = SER_HDR_JUMPTAB+8     ; GET routine
+SER_HDR_PUT             = SER_HDR_JUMPTAB+10     ; PUT routine
+SER_HDR_STATUS          = SER_HDR_JUMPTAB+12    ; STATUS routine
+SER_HDR_IOCTL           = SER_HDR_JUMPTAB+14    ; IOCTL routine
 
-SER_HDR_JUMPCOUNT       = 9                     ; Number of jump vectors
+SER_HDR_JUMPCOUNT       = 8                     ; Number of jump vectors
 
 ;------------------------------------------------------------------------------
 ; Offsets into the struct passed to ser_params
@@ -85,7 +84,7 @@ SER_BAUD_38400                =       $10
 SER_BAUD_57600                 =       $11
 SER_BAUD_115200                =       $12
 SER_BAUD_230400                =       $13
-                                   
+
 ; Data bit settings
 SER_BITS_5                     =       $00
 SER_BITS_6                     =       $01
@@ -125,11 +124,10 @@ SER_STATUS_DSR            =       $40     ; NOT data set ready
 
         .global ser_install
         .global ser_uninstall
-        .global ser_params
+        .global ser_open
+        .global ser_close
         .global ser_get
         .global ser_put
-        .global ser_pause
-        .global ser_unpause
         .global ser_status
         .global ser_ioctl
 
@@ -140,11 +138,10 @@ SER_STATUS_DSR            =       $40     ; NOT data set ready
         .global _ser_unload
         .global _ser_install
         .global _ser_uninstall
-        .global _ser_params
+        .global _ser_open
+        .global _ser_close
         .global _ser_get
         .global _ser_put
-        .global _ser_pause
-        .global _ser_unpause
         .global _ser_status
         .global _ser_ioctl
 
index 5079a96d8ad29a24ab44b7db43cc41596f7ad62f..23934e9264b4599f5288e2864d8b7b02e2e8d91f 100644 (file)
@@ -139,8 +139,11 @@ unsigned char __fastcall__ ser_uninstall (void);
  * Note: This call does not free allocated memory.
  */
 
-unsigned char __fastcall__ ser_params (const struct ser_params* params);
-/* Set the port parameters. This will also enable the port. */
+unsigned char __fastcall__ ser_open (const struct ser_params* params);
+/* "Open" the port by setting the port parameters and enable interrupts. */
+
+unsigned char __fastcall__ ser_close (void);
+/* "Close" the port. Clear buffers and and disable interrupts. */
 
 unsigned char __fastcall__ ser_get (char* b);
 /* Get a character from the serial port. If no characters are available, the
@@ -153,12 +156,6 @@ unsigned char __fastcall__ ser_put (char b);
  * SER_ERR_OVERFLOW if there is no space left in the transmit buffer.
  */
 
-unsigned char __fastcall__ ser_pause (void);
-/* Assert flow control and disable interrupts. */
-
-unsigned char __fastcall__ ser_unpause (void);
-/* Re-enable interrupts and release flow control */
-
 unsigned char __fastcall__ ser_status (unsigned char* status);
 /* Return the serial port status. */
 
index 10af8bb070af4c749f723dad6aa989250d6cbd0c..e1dbfbd009ace059d3485d9ca78efe3ddda053b2 100644 (file)
 C_OBJS =        ser_load.o
 
 S_OBJS =               ser-kernel.o    \
+                ser_close.o     \
                 ser_get.o       \
-                ser_params.o    \
-                ser_pause.o     \
+                ser_open.o      \
                 ser_put.o       \
                 ser_status.o    \
-               ser_unload.o    \
-                ser_unpause.o
+               ser_unload.o
 
 
 #--------------------------------------------------------------------------
index 8d9159d131707e739bbbddfb29d096e4a18198a3..daa6580a3a93585b48418bb8856d2415ee617ee4 100644 (file)
@@ -24,11 +24,10 @@ _ser_drv:       .res    2                   ; Pointer to driver
 ser_vectors:
 ser_install:           jmp     return0
 ser_uninstall:         jmp     return0
-ser_params:     jmp     return0
+ser_open:       jmp     return0
+ser_close:      jmp     return0
 ser_get:        jmp     return0
 ser_put:        jmp     return0
-ser_pause:      jmp     return0
-ser_unpause:    jmp     return0
 ser_status:     jmp     return0
 ser_ioctl:      jmp     return0
 
diff --git a/libsrc/serial/ser_close.s b/libsrc/serial/ser_close.s
new file mode 100644 (file)
index 0000000..b49419a
--- /dev/null
@@ -0,0 +1,12 @@
+;
+; Ullrich von Bassewitz, 2003-08-22
+;
+; unsigned char __fastcall__ ser_close (void);
+; /* "Close" the port. Clear buffers and and disable interrupts. */
+
+
+        .include        "ser-kernel.inc"
+
+        _ser_close      = ser_close
+
+                                   
diff --git a/libsrc/serial/ser_open.s b/libsrc/serial/ser_open.s
new file mode 100644 (file)
index 0000000..22ac98d
--- /dev/null
@@ -0,0 +1,24 @@
+;
+; Ullrich von Bassewitz, 2003-08-22
+;
+; unsigned char __fastcall__ ser_open (const struct ser_params* params);
+; /* "Open" the port by setting the port parameters and enable interrupts. */
+
+
+
+        .importzp       ptr1
+
+        .include        "ser-kernel.inc"
+
+
+
+.proc   _ser_open
+
+        sta     ptr1
+        stx     ptr1+1                  ; Save pointer to params
+        jmp     ser_open                ; Call the driver
+
+.endproc
+
+
+
diff --git a/libsrc/serial/ser_pause.s b/libsrc/serial/ser_pause.s
deleted file mode 100644 (file)
index c77d0ac..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-;
-; Ullrich von Bassewitz, 2003-04-18
-;
-; unsigned char __fastcall__ ser_pause (void);
-; /* Assert flow control and disable interrupts. */
-
-
-
-        .include        "ser-kernel.inc"
-
-        _ser_pause      = ser_pause
-
diff --git a/libsrc/serial/ser_unpause.s b/libsrc/serial/ser_unpause.s
deleted file mode 100644 (file)
index 31ad422..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-;
-; Ullrich von Bassewitz, 2003-04-18
-;
-; unsigned char __fastcall__ ser_unpause (void);
-; /* Re-enable interrupts and release flow control */
-
-
-        .include        "ser-kernel.inc"
-
-        _ser_unpause    = ser_unpause
-