iq81342_7seg.c (227309) | iq81342_7seg.c (236987) |
---|---|
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 IQ81342. 40 */ 41 42#include <sys/cdefs.h> | 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 IQ81342. 40 */ 41 42#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/iq81342_7seg.c 227309 2011-11-07 15:43:11Z ed $"); | 43__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/iq81342_7seg.c 236987 2012-06-13 04:38:09Z imp $"); |
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#include <sys/sysctl.h> 51 --- 150 unchanged lines hidden (view full) --- 202 * | # 203 * | # 204 * | # 205 * +-----+ 206 */ 207 ~(SEG_D|SEG_E), 208}; 209 | 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#include <sys/sysctl.h> 51 --- 150 unchanged lines hidden (view full) --- 202 * | # 203 * | # 204 * | # 205 * +-----+ 206 */ 207 ~(SEG_D|SEG_E), 208}; 209 |
210static uint8_t | 210static uint8_t |
211iq81342_7seg_xlate(char c) 212{ 213 uint8_t rv; 214 215 if (c >= '0' && c <= '9') 216 rv = digitmap[c - '0']; 217 else if (c == '.') 218 rv = (uint8_t) ~SEG_DP; --- 113 unchanged lines hidden (view full) --- 332 * | | | | 333 * +-----+ +-----+ 334 */ 335 { SEG_B, SEG_F }, 336}; 337 338static SYSCTL_NODE(_hw, OID_AUTO, sevenseg, CTLFLAG_RD, 0, "7 seg"); 339static int freq = 20; | 211iq81342_7seg_xlate(char c) 212{ 213 uint8_t rv; 214 215 if (c >= '0' && c <= '9') 216 rv = digitmap[c - '0']; 217 else if (c == '.') 218 rv = (uint8_t) ~SEG_DP; --- 113 unchanged lines hidden (view full) --- 332 * | | | | 333 * +-----+ +-----+ 334 */ 335 { SEG_B, SEG_F }, 336}; 337 338static SYSCTL_NODE(_hw, OID_AUTO, sevenseg, CTLFLAG_RD, 0, "7 seg"); 339static int freq = 20; |
340SYSCTL_INT(_hw_sevenseg, OID_AUTO, freq, CTLFLAG_RW, &freq, 0, | 340SYSCTL_INT(_hw_sevenseg, OID_AUTO, freq, CTLFLAG_RW, &freq, 0, |
341 "7 Seg update frequency"); 342static void 343iq81342_7seg_snake(void) 344{ 345 static int snakefreq; 346 int cur = snakestate; 347 348 snakefreq++; --- 43 unchanged lines hidden --- | 341 "7 Seg update frequency"); 342static void 343iq81342_7seg_snake(void) 344{ 345 static int snakefreq; 346 int cur = snakestate; 347 348 snakefreq++; --- 43 unchanged lines hidden --- |