Mercurial > public > hwos_code
comparison src/comm.asm @ 475:237afdfb4918
2.12 release candidate...
buttons invertable via PC command (OSTC+ only)
author | heinrichsweikamp |
---|---|
date | Fri, 13 Jan 2017 13:08:17 +0100 |
parents | 0491a84fd0b8 |
children | afa7b66a6a84 |
comparison
equal
deleted
inserted
replaced
474:2880aa1264f5 | 475:237afdfb4918 |
---|---|
1058 movff opt_safety_stop_reset, TXREG1 ; RCREG1=0x46 | 1058 movff opt_safety_stop_reset, TXREG1 ; RCREG1=0x46 |
1059 dcfsnz WREG | 1059 dcfsnz WREG |
1060 clrf TXREG1 ; RCREG1=0x47, ignore conservatism for standard hwOS | 1060 clrf TXREG1 ; RCREG1=0x47, ignore conservatism for standard hwOS |
1061 dcfsnz WREG | 1061 dcfsnz WREG |
1062 movff opt_diveTimeout, TXREG1 ; RCREG1=0x48 | 1062 movff opt_diveTimeout, TXREG1 ; RCREG1=0x48 |
1063 dcfsnz WREG | |
1064 movff button_polarity, TXREG1 ; RCREG1=0x49 | |
1063 | 1065 |
1064 | 1066 |
1065 comm_read_abort: | 1067 comm_read_abort: |
1066 comm_read_done: | 1068 comm_read_done: |
1067 bra comm_download_mode0 ; Done. Loop with timeout reset | 1069 bra comm_download_mode0 ; Done. Loop with timeout reset |
1361 movff RCREG1, opt_safety_stop_reset ; RCREG1=0x46 | 1363 movff RCREG1, opt_safety_stop_reset ; RCREG1=0x46 |
1362 dcfsnz WREG | 1364 dcfsnz WREG |
1363 nop ; RCREG1=0x47, ignore conservatism for standard hwOS | 1365 nop ; RCREG1=0x47, ignore conservatism for standard hwOS |
1364 dcfsnz WREG | 1366 dcfsnz WREG |
1365 movff RCREG1, opt_diveTimeout ; RCREG1=0x48 | 1367 movff RCREG1, opt_diveTimeout ; RCREG1=0x48 |
1368 dcfsnz WREG | |
1369 bra comm_write_button_polarity ; RCREG1=0x49 | |
1366 | 1370 |
1367 | 1371 |
1368 comm_write_abort: | 1372 comm_write_abort: |
1369 ; Check Options, gases and diluents | 1373 ; Check Options, gases and diluents |
1370 call option_check_all ; Check all options (and reset if not within their min/max boundaries) | 1374 call option_check_all ; Check all options (and reset if not within their min/max boundaries) |
1501 return ; OK | 1505 return ; OK |
1502 movlw .1 ; not OK, set to 1st | 1506 movlw .1 ; not OK, set to 1st |
1503 movwf day | 1507 movwf day |
1504 return | 1508 return |
1505 | 1509 |
1510 comm_write_button_polarity: | |
1511 ; Store RCREG1 into EEPROM .897 | |
1512 movlw LOW .897 | |
1513 movwf EEADR | |
1514 movlw HIGH .897 | |
1515 movwf EEADRH | |
1516 movff RCREG1,EEDATA | |
1517 movff EEDATA,button_polarity ; 0xFF (Both normal), 0x00 (Both inverted), 0x01 (Left inverted only), 0x02 (Right inverted only) | |
1518 call write_eeprom ; EEDATA into EEPROM@EEADR | |
1519 clrf EEADRH ; Reset EEADRH | |
1520 goto comm_download_mode0 ; Done. Loop with timeout reset | |
1521 | |
1506 ;---------------------------------------------------------------------------- | 1522 ;---------------------------------------------------------------------------- |
1507 END | 1523 END |