dip.inc
author Tero Marttila <terom@fixme.fi>
Fri, 14 May 2010 18:19:59 +0300
changeset 32 7ceb76b5a104
parent 30 5226e512755c
permissions -rw-r--r--
semi-broken Timer_Update mechanism
;;
;; Reading DIP switches from SPI
;;

.set DIP_BUFFER = spi_inbuf + 1

;; Read state of dip switches
;;  Output: r16
DIP_Read8:
		; update
;		rcall		SPI_SendRecv
		
		; get bits
		lds			r16, DIP_BUFFER

		ret