chiark / gitweb /
Send HELLO as a result of all slaves being online. Do not crash if slave is slow...
[trains.git] / detpic / morse.messages
index 2111b5bdf80896d0626fa0ddeee7b92772d9a933..d9eeb0e3b5f80a9d847baf858a691df4c1fbe60d 100644 (file)
 # buffer space somewhere so that each one is read once and that value
 # remembered.
 
-# Main message listing.  Kept sorted by morse for easy reference.
-# ---------------------------------------------------------------
-
-# Miscellaneous
-E                              ; `expected'; we were told to panic
-
-# Problematic interrupts
-IH     INTCON,INTCON3,PIR1,PIR2,PIR3 ; Interrupt source not found (high pri.)
-IL     INTCON,INTCON3,PIR1,PIR2,PIR3 ; Interrupt source not found (low pri.)
-IP     INTCON                  ; Interrupt of priority supposedly disabled
-
 # Temporary entries for testing and development
 TM     PIE1,SSPSTAT,SSPCON1,SSPCON2 ; Master got I2C interrupt
-TS     PIE1,SSPSTAT,SSPCON1,SSPCON2 ; Slave got I2C interrupt
+TI0                            ; for iwj
 TI1                            ; for iwj
 TI2                            ; for iwj
 TI3                            ; for iwj
 TI4                            ; for iwj
 TI5                            ; for iwj
-ZM     i2clib:st,:sspstat,:sspcon1,:sspcon2 ; for testing
-ZS     i2clib:st,:sspstat,:sspcon1,:st_orig ; for testing
-X      test-sofar:ch           ; bad character received from host
+TI6                            ; for iwj
+TI7                            ; for iwj
+TI8                            ; for iwj
+TI9                            ; for iwj
+
+# Main message listing.  Kept sorted by section for easy reference.
+# -----------------------------------------------------------------
+
+# Miscellaneous
+E                              ; `expected'; we were told to panic
+T                              ; master paniced because slave paniced
+
+# Regarding communications from the host
+HX     ::t                     ; host sent unknown command
+HW     ::t                     ; host sent message which was too long
+HO                             ; host RS232 read overrun
+HF                             ; host RS232 framing error
+HN                             ; host sent too much NMRA - buffers full
+HM                             ; host sent too much NMRA - ack count overflow
+HB                             ; data for host overran buffer
+HP                             ; host sent >2-byte PING command
+
+# Regarding communications by master with slaves
+MX                             ; slave (or intern) sent bad extra byte
+MR     mascan:b,mascan:cslot   ; reversers set byte with zz bit set
+MD                             ; i2cmu_done !
+
+# Problematic interrupts
+IH     INTCON,INTCON3,PIR1,PIR2,PIR3 ; Interrupt source not found (high pri.)
+IL     INTCON,INTCON3,PIR1,PIR2,PIR3 ; Interrupt source not found (low pri.)
 
-# Unimplemented things
-UP
-UL
-UM
-UE
+# W - watchdog
+WX                                     ; bad watchdog command
 
 # Messages for i2clib, S*
-SM     i2clib:st,:sspstat,:sspcon1,:sspcon2 ; m.,i., ctrlr bad state
-SS     i2clib:st,SSPSTAT,SSPCON1,:st_orig ; s.,i., controller bad state
-SK     i2clib:slave                    ; m. couldn't address slave (no ack)
-SN     i2clib:slave                    ; improper slave number
-SW     i2clib:st                       ; improper i2cm_write_start
-SF     i2clib:st                       ; improper i2cmu_write_next_byte Z
-SR     i2clib:st                       ; improper i2cm_read_start
-SA     i2clib:st                       ; improper i2cm_read_another
-SD     i2clib:st                       ; impr. i2cm_read_done/i2cs_read_data
+SM     i2clib+panic:st,:sspstat,:sspcon1,:sspcon2 ; m.,i., ctrlr bad state
+SS     SSPSTAT,SSPCON1                 ; s.,i., controller bad state
+SW     i2clib+panic:slave              ; m.: slave didn't ack addr for write
+SN     i2clib+panic:slave              ; improper slave number
+SO     i2clib+panic:slave              ; improper next slave number
+SB     i2clib+panic:st                 ; improper i2cm_{read,write}_start
+SF     i2clib+panic:st                 ; improper i2cmu_write_next_byte Z
+SA     i2clib+panic:st                 ; improper i2cm_read_another
+SD     i2clib+panic:st                 ; impr. i2cm_read_done/i2cs_read_data
+# used in mascan.asm
+SC     i2clib+panic:slave              ; slave didn't ack read: crashed
+ST     i2clib+panic:slave              ; slave didn't ack read: didn't start
+SP     i2clib+panic:slave              ; slave didn't ack read: in panic read
 
 # Messages for slave detection/i2c
-DW                                     ; slave write (nyi)
 DQ     FSR2L,::outmsg_end              ; previous slave read incomplete
 DR     FSR2L,::outmsg_end              ; slave read overrun
 DX     ::t                             ; slave received wrong message byte
+DB     detect:message_buffer           ; slave_add_short_message overrun
+DF     ::t                             ; slave pic2detinfo[0] invalid bits
+DG     ::t                             ; too many slaves in pic2detinfo
+DJ     mascan:cslot,mascan:cbyte,::v   ; det msg 2nd byte has top bit set
+DM     detect:buf0                     ; master has MM bit set in buf0
 
-# Messages for specific peripherals
+# Messages for specific peripherals:
+# R - Reversers (polarity)
 RS     FSR0L                           ; POLARITY message too short
 RL     FSR0L                           ; POLARITY message too long
+RF                                     ; master board has no reversers
+RG                                     ; too many reversers boards
 
+# P - Points
 PB     points:pointmsg                 ; Firing point when already busy
 PI     points:pointmsg,T3CON           ; Unexpected Timer 3 interrupt
 PU     points:pointmsg                 ; Firing nonexistent point
+PC                                     ; Firing point when CDU empty
+PS     points:pointslave,points:pointmsg ; Firing point on nonexistent board
 PF     ::t                             ; Flash mentions point not on board
+PX                                     ; Host sent >2-byte POINT command
+PM                                     ; Firing point when master/CDU busy
+PQ                                     ; POINTED when already charging
+PA                                     ; POINTED when already firing