dip.inc
changeset 89 1b3cea759eff
parent 88 c923295ee520
child 90 13c2deb919d1
equal deleted inserted replaced
88:c923295ee520 89:1b3cea759eff
     1 ;;
       
     2 ;; Reading DIP switches from SPI
       
     3 ;;
       
     4 
       
     5 .set DIP_BUFFER = spi_inbuf + 1
       
     6 
       
     7 ;; Read state of dip switches
       
     8 ;;  Output: r16
       
     9 DIP_Read8:
       
    10 		; update
       
    11 ;		rcall		SPI_SendRecv
       
    12 		
       
    13 		; get bits
       
    14 		lds			r16, DIP_BUFFER
       
    15 
       
    16 		ret
       
    17