Mercurial > public > hwos_code
comparison src/adc_lightsensor.asm @ 468:408329337b8b
minor
author | heinrichsweikamp |
---|---|
date | Fri, 25 Nov 2016 14:51:11 +0100 |
parents | 7f4c3b2e6bb7 |
children | 4fdf6886004b |
comparison
equal
deleted
inserted
replaced
467:6ca155fc1509 | 468:408329337b8b |
---|---|
455 btfsc switch_left | 455 btfsc switch_left |
456 bra piezo_config ; Restart on button press | 456 bra piezo_config ; Restart on button press |
457 | 457 |
458 btfss PIR5,TMR5IF | 458 btfss PIR5,TMR5IF |
459 bra piezo_config0 ; Wait loop | 459 bra piezo_config0 ; Wait loop |
460 | 460 |
461 bcf INTCON,GIE | |
461 movff opt_cR_button_right,WREG; right button | 462 movff opt_cR_button_right,WREG; right button |
462 btfsc flip_screen ; 180° rotation ? | 463 btfsc flip_screen ; 180° rotation ? |
463 movff opt_cR_button_left,WREG ; Yes, left button | 464 movff opt_cR_button_left,WREG ; Yes, left button |
464 rcall piezo_config_tx | 465 rcall piezo_config_tx |
465 | 466 |
466 movff opt_cR_button_left,WREG ; left button | 467 movff opt_cR_button_left,WREG ; left button |
467 btfsc flip_screen ; 180° rotation ? | 468 btfsc flip_screen ; 180° rotation ? |
468 movff opt_cR_button_right,WREG; Yes, right button | 469 movff opt_cR_button_right,WREG; Yes, right button |
469 rcall piezo_config_tx | 470 rcall piezo_config_tx |
470 | 471 |
471 movlw .200 ; reserved | 472 movlw .20 ; reserved |
472 rcall piezo_config_tx | 473 rcall piezo_config_tx |
473 movlw .200 ; reserved | 474 movlw .20 ; reserved |
474 rcall piezo_config_tx | 475 rcall piezo_config_tx |
476 bsf INTCON,GIE | |
475 return | 477 return |
476 | 478 |
477 piezo_config_tx: ; Send one byte | 479 piezo_config_tx: ; Send one byte |
478 movwf uart1_temp ; Store byte | 480 movwf uart1_temp ; Store byte |
479 movlw .8 | 481 movlw .8 |