summaryrefslogtreecommitdiffstats
path: root/firmware/target/sh/archos/recorder/backlight-target.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-04-12 22:12:13 +0000
committerJens Arnold <amiconn@rockbox.org>2007-04-12 22:12:13 +0000
commit47bf6c5a5ad1fd9143ab87328793b285230f74a3 (patch)
tree5199f2225a3dfc438bb1c4c5e9906f14664dfa43 /firmware/target/sh/archos/recorder/backlight-target.h
parent734278b7d1fde5e177c6842f49c16b9df8c353fa (diff)
downloadrockbox-47bf6c5a5ad1fd9143ab87328793b285230f74a3.tar.gz
rockbox-47bf6c5a5ad1fd9143ab87328793b285230f74a3.zip
Moved archos backlight code to target tree. Changed old mutlivalue CONFIG_BACKLIGHT to a simple HAVE_BACKLIGHT.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13136 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/sh/archos/recorder/backlight-target.h')
-rw-r--r--firmware/target/sh/archos/recorder/backlight-target.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/firmware/target/sh/archos/recorder/backlight-target.h b/firmware/target/sh/archos/recorder/backlight-target.h
new file mode 100644
index 0000000000..834d10bdc6
--- /dev/null
+++ b/firmware/target/sh/archos/recorder/backlight-target.h
@@ -0,0 +1,39 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2007 by Jens Arnold
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#ifndef BACKLIGHT_TARGET_H
+#define BACKLIGHT_TARGET_H
+
+#include "config.h"
+#include "rtc.h"
+
+#define __backlight_init() true
+
+static inline void __backlight_on(void)
+{
+ /* Enable square wave */
+ rtc_write(0x0a, rtc_read(0x0a) | 0x40);
+}
+
+static inline void __backlight_off(void)
+{
+ /* Disable square wave */
+ rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
+}
+
+#endif