X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=asminc%2Fser-kernel.inc;h=546587515d1310968db74b08b2e8ac2cef4fde5b;hb=a01c4231f20a27cea7022e8d2a9b8e4124fb65ca;hp=5d448775f2bcd2549b825edc410790d6d137717c;hpb=e941b34947b6344f25f21e329f356412d9880e45;p=cc65 diff --git a/asminc/ser-kernel.inc b/asminc/ser-kernel.inc index 5d448775f..546587515 100644 --- a/asminc/ser-kernel.inc +++ b/asminc/ser-kernel.inc @@ -39,16 +39,17 @@ .struct SER_HDR ID .byte 3 ; Contains 0x73, 0x65, 0x72 ("ser") VERSION .byte 1 ; Interface version + LIBREF .addr ; Library reference JUMPTAB .struct - INSTALL .word ; INSTALL routine - UNINSTALL .word ; UNINSTALL routine - OPEN .word ; OPEN routine - CLOSE .word ; CLOSE routine - GET .word ; GET routine - PUT .word ; PUT routine - STATUS .word ; STATUS routine - IOCTL .word ; IOCTL routine - IRQ .word ; IRQ routine + SER_INSTALL .addr ; SER_INSTALL routine + SER_UNINSTALL .addr ; SER_UNINSTALL routine + SER_OPEN .addr ; SER_OPEN routine + SER_CLOSE .addr ; SER_CLOSE routine + SER_GET .addr ; SER_GET routine + SER_PUT .addr ; SER_PUT routine + SER_STATUS .addr ; SER_STATUS routine + SER_IOCTL .addr ; SER_IOCTL routine + SER_IRQ .addr ; SER_IRQ routine .endstruct .endstruct @@ -56,7 +57,7 @@ ;------------------------------------------------------------------------------ ; The SER API version, stored SER_HDR::VERSION -SER_API_VERSION = $00 +SER_API_VERSION = $02 ;------------------------------------------------------------------------------ ; ser_params @@ -74,59 +75,62 @@ SER_API_VERSION = $00 ; Baudrate SER_BAUD_45_5 = $00 -SER_BAUD_50 = $01 +SER_BAUD_50 = $01 SER_BAUD_75 = $02 -SER_BAUD_110 = $03 -SER_BAUD_134_5 = $04 +SER_BAUD_110 = $03 +SER_BAUD_134_5 = $04 SER_BAUD_150 = $05 -SER_BAUD_300 = $06 -SER_BAUD_600 = $07 -SER_BAUD_1200 = $08 +SER_BAUD_300 = $06 +SER_BAUD_600 = $07 +SER_BAUD_1200 = $08 SER_BAUD_1800 = $09 -SER_BAUD_2400 = $0A +SER_BAUD_2400 = $0A SER_BAUD_3600 = $0B -SER_BAUD_4800 = $0C +SER_BAUD_4800 = $0C SER_BAUD_7200 = $0D -SER_BAUD_9600 = $0E -SER_BAUD_19200 = $0F -SER_BAUD_38400 = $10 -SER_BAUD_57600 = $11 -SER_BAUD_115200 = $12 -SER_BAUD_230400 = $13 +SER_BAUD_9600 = $0E +SER_BAUD_19200 = $0F +SER_BAUD_38400 = $10 +SER_BAUD_57600 = $11 +SER_BAUD_115200 = $12 +SER_BAUD_230400 = $13 +SER_BAUD_31250 = $14 +SER_BAUD_62500 = $15 +SER_BAUD_56_875 = $16 ; Data bit settings -SER_BITS_5 = $00 -SER_BITS_6 = $01 -SER_BITS_7 = $02 -SER_BITS_8 = $03 +SER_BITS_5 = $00 +SER_BITS_6 = $01 +SER_BITS_7 = $02 +SER_BITS_8 = $03 ; Stop bit settings -SER_STOP_1 = $00 -SER_STOP_2 = $01 +SER_STOP_1 = $00 +SER_STOP_2 = $01 ; Parity -SER_PAR_NONE = $00 -SER_PAR_ODD = $01 -SER_PAR_EVEN = $02 -SER_PAR_MARK = $03 -SER_PAR_SPACE = $04 +SER_PAR_NONE = $00 +SER_PAR_ODD = $01 +SER_PAR_EVEN = $02 +SER_PAR_MARK = $03 +SER_PAR_SPACE = $04 ; Handshake SER_HS_NONE = $00 ; No handshake SER_HS_HW = $01 ; Hardware (RTS/CTS) handshake SER_HS_SW = $02 ; Software handshake -; Bit masks to mask out things from the status returned by rs232_status -SER_STATUS_PE = $01 ; Parity error -SER_STATUS_FE = $02 ; Framing error -SER_STATUS_OE = $04 ; Overrun error -SER_STATUS_DCD = $20 ; NOT data carrier detect -SER_STATUS_DSR = $40 ; NOT data set ready +; Bit masks to mask out things from the status returned by ser_status +SER_STATUS_PE = $01 ; Parity error +SER_STATUS_FE = $02 ; Framing error +SER_STATUS_OE = $04 ; Overrun error +SER_STATUS_DCD = $20 ; NOT data carrier detect +SER_STATUS_DSR = $40 ; NOT data set ready ;------------------------------------------------------------------------------ ; Variables - .global _ser_drv ; Pointer to driver + .global _ser_drv ; Pointer to driver ;------------------------------------------------------------------------------ ; Driver entry points @@ -139,11 +143,12 @@ SER_STATUS_DSR = $40 ; NOT data set ready .global ser_put .global ser_status .global ser_ioctl - .global ser_irq + .global ser_irq ;------------------------------------------------------------------------------ ; C callable functions + .global _ser_load_driver .global _ser_unload .global _ser_install .global _ser_uninstall @@ -155,4 +160,3 @@ SER_STATUS_DSR = $40 ; NOT data set ready .global _ser_ioctl .global _ser_clear_ptr -