diff options
author | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-05-09 15:16:37 +0000 |
---|---|---|
committer | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-05-09 15:16:37 +0000 |
commit | a6df8e6c034709f554d1179192515b0216ea9c0b (patch) | |
tree | b3a86872f81a81fce70773372f64fd03487bed0d | |
parent | bfa3dfc97b8028dd38b0bbe5c9f9ae5ab1e0d80d (diff) |
Added comments, and a new function to control the infrared LED.
-rw-r--r-- | sys/arch/zaurus/dev/zaurus_scoop.c | 26 | ||||
-rw-r--r-- | sys/arch/zaurus/dev/zaurus_scoopvar.h | 3 |
2 files changed, 27 insertions, 2 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_scoop.c b/sys/arch/zaurus/dev/zaurus_scoop.c index e46e28e93a1..5902e030271 100644 --- a/sys/arch/zaurus/dev/zaurus_scoop.c +++ b/sys/arch/zaurus/dev/zaurus_scoop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_scoop.c,v 1.8 2005/04/15 01:05:51 pascoe Exp $ */ +/* $OpenBSD: zaurus_scoop.c,v 1.9 2005/05/09 15:16:36 uwe Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de> @@ -132,6 +132,9 @@ scoop_gpio_pin_ctl(struct scoop_softc *sc, int pin, int flags) bus_space_write_2(sc->sc_iot, sc->sc_ioh, SCOOP_GPCR, rv); } +/* + * Turn the LCD background light and contrast signal on or off. + */ void scoop_set_backlight(int on, int cont) { @@ -151,6 +154,23 @@ scoop_set_backlight(int on, int cont) #endif } +/* + * Turn the infrared LED on or off (must be on while transmitting). + */ +void +scoop_set_irled(int on) +{ + if (scoop_cd.cd_ndevs > 1 && scoop_cd.cd_devs[1] != NULL) + /* IR_ON is inverted */ + scoop_gpio_pin_write(scoop_cd.cd_devs[1], + SCOOP1_IR_ON, !on); +} + +/* + * Turn the green and orange LEDs on or off. If the orange LED is on, + * then it is wired to indicate if A/C is connected. The green LED has + * no such predefined function. + */ void scoop_led_set(int led, int on) { @@ -165,6 +185,10 @@ scoop_led_set(int led, int on) } } +/* + * Mute or unmute audio signals going to the internal speaker (and + * the headphone jack as well?) + */ void scoop_audio_set(int on) { diff --git a/sys/arch/zaurus/dev/zaurus_scoopvar.h b/sys/arch/zaurus/dev/zaurus_scoopvar.h index 20c02284a49..19d094248d3 100644 --- a/sys/arch/zaurus/dev/zaurus_scoopvar.h +++ b/sys/arch/zaurus/dev/zaurus_scoopvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_scoopvar.h,v 1.7 2005/04/15 01:05:51 pascoe Exp $ */ +/* $OpenBSD: zaurus_scoopvar.h,v 1.8 2005/05/09 15:16:36 uwe Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de> @@ -20,6 +20,7 @@ #define SCOOP_LED_ORANGE (1<<1) void scoop_set_backlight(int, int); +void scoop_set_irled(int); void scoop_led_set(int, int); void scoop_battery_temp_adc(int); void scoop_charge_battery(int, int); |