mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 02:30:44 +00:00
API changes
git-svn-id: svn://svn.cc65.org/cc65/trunk@2406 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
bc9f2678a2
commit
296b417502
@ -42,15 +42,14 @@ SER_HDR_VERSION = 3 ; Interface version
|
|||||||
SER_HDR_JUMPTAB = 4
|
SER_HDR_JUMPTAB = 4
|
||||||
SER_HDR_INSTALL = SER_HDR_JUMPTAB+0 ; INSTALL routine
|
SER_HDR_INSTALL = SER_HDR_JUMPTAB+0 ; INSTALL routine
|
||||||
SER_HDR_UNINSTALL = SER_HDR_JUMPTAB+2 ; UNINSTALL routine
|
SER_HDR_UNINSTALL = SER_HDR_JUMPTAB+2 ; UNINSTALL routine
|
||||||
SER_HDR_PARAMS = SER_HDR_JUMPTAB+4 ; PARAMS routine
|
SER_HDR_OPEN = SER_HDR_JUMPTAB+4 ; OPEN routine
|
||||||
SER_HDR_GET = SER_HDR_JUMPTAB+6 ; GET routine
|
SER_HDR_CLOSE = SER_HDR_JUMPTAB+6 ; CLOSE routine
|
||||||
SER_HDR_PUT = SER_HDR_JUMPTAB+8 ; PUT routine
|
SER_HDR_GET = SER_HDR_JUMPTAB+8 ; GET routine
|
||||||
SER_HDR_PAUSE = SER_HDR_JUMPTAB+10 ; PAUSE routine
|
SER_HDR_PUT = SER_HDR_JUMPTAB+10 ; PUT routine
|
||||||
SER_HDR_UNPAUSE = SER_HDR_JUMPTAB+12 ; UNPAUSE routine
|
SER_HDR_STATUS = SER_HDR_JUMPTAB+12 ; STATUS routine
|
||||||
SER_HDR_STATUS = SER_HDR_JUMPTAB+14 ; STATUS routine
|
SER_HDR_IOCTL = SER_HDR_JUMPTAB+14 ; IOCTL routine
|
||||||
SER_HDR_IOCTL = SER_HDR_JUMPTAB+16 ; 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
|
; Offsets into the struct passed to ser_params
|
||||||
@ -85,7 +84,7 @@ SER_BAUD_38400 = $10
|
|||||||
SER_BAUD_57600 = $11
|
SER_BAUD_57600 = $11
|
||||||
SER_BAUD_115200 = $12
|
SER_BAUD_115200 = $12
|
||||||
SER_BAUD_230400 = $13
|
SER_BAUD_230400 = $13
|
||||||
|
|
||||||
; Data bit settings
|
; Data bit settings
|
||||||
SER_BITS_5 = $00
|
SER_BITS_5 = $00
|
||||||
SER_BITS_6 = $01
|
SER_BITS_6 = $01
|
||||||
@ -125,11 +124,10 @@ SER_STATUS_DSR = $40 ; NOT data set ready
|
|||||||
|
|
||||||
.global ser_install
|
.global ser_install
|
||||||
.global ser_uninstall
|
.global ser_uninstall
|
||||||
.global ser_params
|
.global ser_open
|
||||||
|
.global ser_close
|
||||||
.global ser_get
|
.global ser_get
|
||||||
.global ser_put
|
.global ser_put
|
||||||
.global ser_pause
|
|
||||||
.global ser_unpause
|
|
||||||
.global ser_status
|
.global ser_status
|
||||||
.global ser_ioctl
|
.global ser_ioctl
|
||||||
|
|
||||||
@ -140,11 +138,10 @@ SER_STATUS_DSR = $40 ; NOT data set ready
|
|||||||
.global _ser_unload
|
.global _ser_unload
|
||||||
.global _ser_install
|
.global _ser_install
|
||||||
.global _ser_uninstall
|
.global _ser_uninstall
|
||||||
.global _ser_params
|
.global _ser_open
|
||||||
|
.global _ser_close
|
||||||
.global _ser_get
|
.global _ser_get
|
||||||
.global _ser_put
|
.global _ser_put
|
||||||
.global _ser_pause
|
|
||||||
.global _ser_unpause
|
|
||||||
.global _ser_status
|
.global _ser_status
|
||||||
.global _ser_ioctl
|
.global _ser_ioctl
|
||||||
|
|
||||||
|
@ -139,8 +139,11 @@ unsigned char __fastcall__ ser_uninstall (void);
|
|||||||
* Note: This call does not free allocated memory.
|
* Note: This call does not free allocated memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned char __fastcall__ ser_params (const struct ser_params* params);
|
unsigned char __fastcall__ ser_open (const struct ser_params* params);
|
||||||
/* Set the port parameters. This will also enable the port. */
|
/* "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);
|
unsigned char __fastcall__ ser_get (char* b);
|
||||||
/* Get a character from the serial port. If no characters are available, the
|
/* 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.
|
* 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);
|
unsigned char __fastcall__ ser_status (unsigned char* status);
|
||||||
/* Return the serial port status. */
|
/* Return the serial port status. */
|
||||||
|
|
||||||
|
@ -20,13 +20,12 @@
|
|||||||
C_OBJS = ser_load.o
|
C_OBJS = ser_load.o
|
||||||
|
|
||||||
S_OBJS = ser-kernel.o \
|
S_OBJS = ser-kernel.o \
|
||||||
|
ser_close.o \
|
||||||
ser_get.o \
|
ser_get.o \
|
||||||
ser_params.o \
|
ser_open.o \
|
||||||
ser_pause.o \
|
|
||||||
ser_put.o \
|
ser_put.o \
|
||||||
ser_status.o \
|
ser_status.o \
|
||||||
ser_unload.o \
|
ser_unload.o
|
||||||
ser_unpause.o
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
@ -24,11 +24,10 @@ _ser_drv: .res 2 ; Pointer to driver
|
|||||||
ser_vectors:
|
ser_vectors:
|
||||||
ser_install: jmp return0
|
ser_install: jmp return0
|
||||||
ser_uninstall: jmp return0
|
ser_uninstall: jmp return0
|
||||||
ser_params: jmp return0
|
ser_open: jmp return0
|
||||||
|
ser_close: jmp return0
|
||||||
ser_get: jmp return0
|
ser_get: jmp return0
|
||||||
ser_put: jmp return0
|
ser_put: jmp return0
|
||||||
ser_pause: jmp return0
|
|
||||||
ser_unpause: jmp return0
|
|
||||||
ser_status: jmp return0
|
ser_status: jmp return0
|
||||||
ser_ioctl: jmp return0
|
ser_ioctl: jmp return0
|
||||||
|
|
||||||
|
12
libsrc/serial/ser_close.s
Normal file
12
libsrc/serial/ser_close.s
Normal file
@ -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
|
||||||
|
|
||||||
|
|
24
libsrc/serial/ser_open.s
Normal file
24
libsrc/serial/ser_open.s
Normal file
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user