Deleted Added
sdiff udiff text old ( 140308 ) new ( 140350 )
full compact
1/* $NetBSD: iq31244_7seg.c,v 1.2 2003/07/15 00:25:01 lukem Exp $ */
2
3/*-
4 * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
5 * All rights reserved.
6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 *

--- 26 unchanged lines hidden (view full) ---

35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38/*
39 * Support for the 7-segment display on the Intel IQ31244.
40 */
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/iq31244_7seg.c 140308 2005-01-15 18:55:22Z cognet $");
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/module.h>
49#include <sys/bus.h>
50
51#include <machine/bus.h>
52
53#include <arm/xscale/i80321/iq80321reg.h>
54#include <arm/xscale/i80321/iq80321var.h>
55
56#define WRITE(x, v) *((__volatile uint8_t *) (x)) = (v)
57

--- 270 unchanged lines hidden (view full) ---

328 * | | | |
329 * | | | |
330 * | | | |
331 * +-----+ +-----+
332 */
333 { ~SEG_B, ~SEG_F },
334};
335
336static void
337iq31244_7seg_snake(void)
338{
339 static int snakefreq;
340 int cur = snakestate;
341
342 snakefreq++;
343 if ((snakefreq & (0xff)))
344 return;
345 WRITE(IQ80321_7SEG_MSB, snakemap[cur][0]);
346 WRITE(IQ80321_7SEG_LSB, snakemap[cur][1]);
347
348 snakestate = (cur + 1) & 7;
349}
350
351struct iq31244_7seg_softc {

--- 34 unchanged lines hidden ---