dip.inc
author Tero Marttila <terom@paivola.fi>
Fri, 11 Apr 2014 14:42:30 +0300
changeset 65 625f34328820
parent 30 5226e512755c
permissions -rw-r--r--
dmx: split out dmx.c module; implement console
;;
;; 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