summaryrefslogtreecommitdiffstats
path: root/bsps/lm32/include/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/lm32/include/bsp')
-rw-r--r--bsps/lm32/include/bsp/irq.h47
-rw-r--r--bsps/lm32/include/bsp/milkymist_ac97.h76
-rw-r--r--bsps/lm32/include/bsp/milkymist_buttons.h59
-rw-r--r--bsps/lm32/include/bsp/milkymist_dmx.h68
-rw-r--r--bsps/lm32/include/bsp/milkymist_flash.h64
-rw-r--r--bsps/lm32/include/bsp/milkymist_gpio.h59
-rw-r--r--bsps/lm32/include/bsp/milkymist_ir.h59
-rw-r--r--bsps/lm32/include/bsp/milkymist_memcard.h32
-rw-r--r--bsps/lm32/include/bsp/milkymist_midi.h59
-rw-r--r--bsps/lm32/include/bsp/milkymist_pfpu.h72
-rw-r--r--bsps/lm32/include/bsp/milkymist_tmu.h98
-rw-r--r--bsps/lm32/include/bsp/milkymist_usbinput.h71
-rw-r--r--bsps/lm32/include/bsp/milkymist_versions.h53
-rw-r--r--bsps/lm32/include/bsp/milkymist_video.h90
14 files changed, 907 insertions, 0 deletions
diff --git a/bsps/lm32/include/bsp/irq.h b/bsps/lm32/include/bsp/irq.h
new file mode 100644
index 0000000000..b1ccd66339
--- /dev/null
+++ b/bsps/lm32/include/bsp/irq.h
@@ -0,0 +1,47 @@
+/**
+ * @file
+ *
+ * @ingroup bsp_interrupt
+ *
+ * @brief BSP interrupt support for LM32.
+ */
+
+/*
+ * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
+ *
+ * Copyright (c) 2008, 2009, 2010
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * D-82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef LIBBSP_LM32_IRQ_CONFIG_H
+#define LIBBSP_LM32_IRQ_CONFIG_H
+
+#include <stdint.h>
+
+/**
+ * @addtogroup bsp_interrupt
+ *
+ * @{
+ */
+
+/**
+ * @brief Minimum vector number.
+ */
+#define BSP_INTERRUPT_VECTOR_MIN 0
+
+/**
+ * @brief Maximum vector number.
+ */
+#define BSP_INTERRUPT_VECTOR_MAX 31
+
+/** @} */
+
+#endif /* LIBBSP_LM32_IRQ_CONFIG_H */
diff --git a/bsps/lm32/include/bsp/milkymist_ac97.h b/bsps/lm32/include/bsp/milkymist_ac97.h
new file mode 100644
index 0000000000..37415a1f5e
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_ac97.h
@@ -0,0 +1,76 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_ac97 lm32_milkymist_shared
+ * @brief Milkymist AC97 driver
+ */
+
+/* milkymist_ac97.h
+ *
+ * Milkymist AC97 driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_ac97 Milkymist AC97
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist AC97 driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_AC97_H_
+#define __MILKYMIST_AC97_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Ioctls. 0x41 is 'A' */
+#define SOUND_MIXER_MIC 0x0
+#define SOUND_MIXER_LINE 0x1
+#define SOUND_MIXER_READ(x) (0x4100+x)
+#define SOUND_MIXER_WRITE(x) (0x4110+x)
+
+#define SOUND_SND_SUBMIT_PLAY 0x4120
+#define SOUND_SND_COLLECT_PLAY 0x4121
+#define SOUND_SND_SUBMIT_RECORD 0x4122
+#define SOUND_SND_COLLECT_RECORD 0x4123
+
+struct snd_buffer {
+ unsigned int nsamples;
+ void *user;
+ unsigned int samples[];
+};
+
+rtems_device_driver ac97_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver ac97_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver ac97_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define AC97_DRIVER_TABLE_ENTRY {ac97_initialize, \
+ac97_open, NULL, NULL, NULL, ac97_control}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_AC97_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_buttons.h b/bsps/lm32/include/bsp/milkymist_buttons.h
new file mode 100644
index 0000000000..de6ee51438
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_buttons.h
@@ -0,0 +1,59 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_buttons lm32_milkymist_shared
+ * @brief Milkymist buttons driver
+ */
+
+/* milkymist_buttons.h
+ *
+ * Milkymist buttons driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2011 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_buttons Milkymist buttons
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist buttons driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_BUTTONS_H_
+#define __MILKYMIST_BUTTONS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rtems_device_driver buttons_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver buttons_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver buttons_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define BUTTONS_DRIVER_TABLE_ENTRY { buttons_initialize, \
+buttons_open, NULL, buttons_read, NULL, NULL}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_BUTTONS_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_dmx.h b/bsps/lm32/include/bsp/milkymist_dmx.h
new file mode 100644
index 0000000000..a933e3423f
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_dmx.h
@@ -0,0 +1,68 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_dmx lm32_milkymist_shared
+ * @brief Milkymist DMX512 driver
+ */
+
+/* milkymist_dmx.h
+ *
+ * Milkymist DMX512 driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_dmx Milkymist DMX512
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist DMX512 driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_DMX_H_
+#define __MILKYMIST_DMX_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DMX_SET_THRU 0x4400
+#define DMX_GET_THRU 0x4401
+
+rtems_device_driver dmx_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dmx_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dmx_write(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dmx_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define DMX_DRIVER_TABLE_ENTRY {dmx_initialize, \
+NULL, NULL, dmx_read, dmx_write, dmx_control}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_DMX_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_flash.h b/bsps/lm32/include/bsp/milkymist_flash.h
new file mode 100644
index 0000000000..2acf855096
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_flash.h
@@ -0,0 +1,64 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_flash lm32_milkymist_shared
+ * @brief Milkymist Flash
+ */
+
+/* milkymist_flash.h
+ *
+ * Copyright (C) 2010 Sebastien Bourdeauducq
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ */
+
+/**
+ * @defgroup lm32_milkymist_flash Milkymist Flash
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist Flash
+ * @{
+ */
+
+#ifndef __MILKYMIST_FLASH_H_
+#define __MILKYMIST_FLASH_H_
+
+/* Ioctls */
+#define FLASH_GET_SIZE 0x4600
+#define FLASH_GET_BLOCKSIZE 0x4601
+#define FLASH_ERASE_BLOCK 0x4602
+
+struct flash_partition {
+ unsigned int start_address;
+ unsigned int length;
+};
+
+rtems_device_driver flash_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver flash_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver flash_write(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver flash_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define FLASH_DRIVER_TABLE_ENTRY {flash_initialize, \
+NULL, NULL, flash_read, flash_write, flash_control}
+
+#endif /* __MILKYMIST_FLASH_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_gpio.h b/bsps/lm32/include/bsp/milkymist_gpio.h
new file mode 100644
index 0000000000..1e30b9c280
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_gpio.h
@@ -0,0 +1,59 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_gpio lm32_milkymist_shared
+ * @brief Milkymist GPIO driver
+ */
+
+/* milkymist_gpio.h
+ *
+ * Milkymist GPIO driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_gpio Milkymist GPIO
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist GPIO driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_GPIO_H_
+#define __MILKYMIST_GPIO_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rtems_device_driver gpio_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver gpio_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver gpio_write(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define GPIO_DRIVER_TABLE_ENTRY { gpio_initialize, \
+NULL, NULL, gpio_read, gpio_write, NULL}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_GPIO_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_ir.h b/bsps/lm32/include/bsp/milkymist_ir.h
new file mode 100644
index 0000000000..4df7f3550c
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_ir.h
@@ -0,0 +1,59 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_ir lm32_milkymist_shared
+ * @brief Milkymist RC5 IR driver
+ */
+
+/* milkymist_ir.h
+ *
+ * Milkymist RC5 IR driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_ir Milkymist IR
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist RC5 IR driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_IR_H_
+#define __MILKYMIST_IR_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rtems_device_driver ir_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver ir_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver ir_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define IR_DRIVER_TABLE_ENTRY {ir_initialize, \
+ir_open, NULL, ir_read, NULL, NULL}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_IR_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_memcard.h b/bsps/lm32/include/bsp/milkymist_memcard.h
new file mode 100644
index 0000000000..713b45be07
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_memcard.h
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_memcard lm32_milkymist_shared
+ * @brief Milkymist memory card driver
+ */
+
+/* milkymist_memcard.h
+ *
+ * Milkymist memory card driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_memcard Milkymist memory card
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist memory card driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_MEMCARD_H_
+#define __MILKYMIST_MEMCARD_H_
+
+rtems_status_code memcard_register(void);
+
+#endif /* __MILKYMIST_MEMCARD_H_ */
+
+/** @} */
diff --git a/bsps/lm32/include/bsp/milkymist_midi.h b/bsps/lm32/include/bsp/milkymist_midi.h
new file mode 100644
index 0000000000..da53de6af5
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_midi.h
@@ -0,0 +1,59 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_midi lm32_milkymist_shared
+ * @brief Milkymist MIDI driver
+ */
+
+/* milkymist_midi.h
+ *
+ * Milkymist MIDI driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_midi Milkymist MIDI
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist MIDI driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_MIDI_H_
+#define __MILKYMIST_MIDI_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rtems_device_driver midi_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver midi_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver midi_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define MIDI_DRIVER_TABLE_ENTRY {midi_initialize, \
+midi_open, NULL, midi_read, NULL, NULL}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_MIDI_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_pfpu.h b/bsps/lm32/include/bsp/milkymist_pfpu.h
new file mode 100644
index 0000000000..73ea5fa28e
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_pfpu.h
@@ -0,0 +1,72 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_pfpu lm32_milkymist_shared
+ * @brief Milkymist PFPU driver
+ */
+
+/* milkymist_pfpu.h
+ *
+ * Milkymist PFPU driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_pfpu Milkymist PFPU
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist PFPU driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_PFPU_H_
+#define __MILKYMIST_PFPU_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Ioctls */
+#define PFPU_EXECUTE 0x4600
+
+#define PFPU_PROGSIZE (2048)
+#define PFPU_REG_COUNT (128)
+
+struct pfpu_td {
+ unsigned int *output;
+ unsigned int hmeshlast;
+ unsigned int vmeshlast;
+ unsigned int *program;
+ unsigned int progsize;
+ float *registers;
+ /** @brief shall we update the "registers" array after completion */
+ bool update;
+ /** @brief shall we invalidate L1 data cache after completion */
+ bool invalidate;
+};
+
+rtems_device_driver pfpu_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver pfpu_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define PFPU_DRIVER_TABLE_ENTRY {pfpu_initialize, \
+NULL, NULL, NULL, NULL, pfpu_control}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_PFPU_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_tmu.h b/bsps/lm32/include/bsp/milkymist_tmu.h
new file mode 100644
index 0000000000..94f8394ef7
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_tmu.h
@@ -0,0 +1,98 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_tmu lm32_milkymist_shared
+ * @brief Milkymist TMU driver
+ */
+
+/* milkymist_tmu.h
+ *
+ * Milkymist TMU driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_tmu Milkymist TMU
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist TMU driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_TMU_H_
+#define __MILKYMIST_TMU_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Ioctls */
+#define TMU_EXECUTE 0x5400
+#define TMU_EXECUTE_NONBLOCK 0x5401
+#define TMU_EXECUTE_WAIT 0x5402
+
+struct tmu_vertex {
+ int x;
+ int y;
+} __attribute__((packed));
+
+struct tmu_td {
+ unsigned int flags;
+ unsigned int hmeshlast;
+ unsigned int vmeshlast;
+ unsigned int brightness;
+ unsigned short chromakey;
+ struct tmu_vertex *vertices;
+ unsigned short *texfbuf;
+ unsigned int texhres;
+ unsigned int texvres;
+ unsigned int texhmask;
+ unsigned int texvmask;
+ unsigned short *dstfbuf;
+ unsigned int dsthres;
+ unsigned int dstvres;
+ int dsthoffset;
+ int dstvoffset;
+ unsigned int dstsquarew;
+ unsigned int dstsquareh;
+ unsigned int alpha;
+
+ bool invalidate_before;
+ bool invalidate_after;
+};
+
+#define TMU_BRIGHTNESS_MAX (63)
+#define TMU_MASK_NOFILTER (0x3ffc0)
+#define TMU_MASK_FULL (0x3ffff)
+#define TMU_FIXEDPOINT_SHIFT (6)
+#define TMU_ALPHA_MAX (63)
+#define TMU_MESH_MAXSIZE (128)
+
+#define TMU_FLAG_CHROMAKEY (2)
+#define TMU_FLAG_ADDITIVE (4)
+
+rtems_device_driver tmu_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver tmu_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define TMU_DRIVER_TABLE_ENTRY {tmu_initialize, \
+NULL, NULL, NULL, NULL, tmu_control}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_TMU_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_usbinput.h b/bsps/lm32/include/bsp/milkymist_usbinput.h
new file mode 100644
index 0000000000..04c376fa8a
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_usbinput.h
@@ -0,0 +1,71 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_usbinput lm32_milkymist_shared
+ * @brief Milkymist USB input devices driver
+ */
+
+/* milkymist_usbinput.h
+ *
+ * Milkymist USB input devices driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010, 2012 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_usbinput Milkymist USB input devices
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist USB input devices driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_USBINPUT_H_
+#define __MILKYMIST_USBINPUT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Ioctls */
+#define USBINPUT_LOAD_FIRMWARE 0x5500
+
+struct usbinput_firmware_description {
+ const unsigned char *data;
+ int length;
+};
+
+rtems_device_driver usbinput_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver usbinput_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver usbinput_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver usbinput_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define USBINPUT_DRIVER_TABLE_ENTRY {usbinput_initialize, \
+usbinput_open, NULL, usbinput_read, NULL, usbinput_control}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_USBINPUT_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_versions.h b/bsps/lm32/include/bsp/milkymist_versions.h
new file mode 100644
index 0000000000..3b5063f306
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_versions.h
@@ -0,0 +1,53 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_versions lm32_milkymist_shared
+ * @brief Milkymist versioning driver
+ */
+
+/* milkymist_versions.h
+ *
+ * Milkymist versioning driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_versions Milkymist versioning
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist versioning driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_VERSIONS_H_
+#define __MILKYMIST_VERSIONS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rtems_device_driver versions_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver versions_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define VERSIONS_DRIVER_TABLE_ENTRY {versions_initialize, \
+NULL, NULL, versions_read, NULL, NULL}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_VERSIONS_H_ */
diff --git a/bsps/lm32/include/bsp/milkymist_video.h b/bsps/lm32/include/bsp/milkymist_video.h
new file mode 100644
index 0000000000..6ec3cc0a83
--- /dev/null
+++ b/bsps/lm32/include/bsp/milkymist_video.h
@@ -0,0 +1,90 @@
+/**
+ * @file
+ * @ingroup lm32_milkymist_video lm32_milkymist_shared
+ * @brief Milkymist video input driver
+ */
+
+/* milkymist_video.h
+ *
+ * Milkymist video input driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ *
+ * COPYRIGHT (c) 2010, 2011 Sebastien Bourdeauducq
+ */
+
+/**
+ * @defgroup lm32_milkymist_video Milkymist Video
+ * @ingroup lm32_milkymist_shared
+ * @brief Milkymist video input driver
+ * @{
+ */
+
+#ifndef __MILKYMIST_VIDEO_H_
+#define __MILKYMIST_VIDEO_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Ioctls */
+#define VIDEO_BUFFER_LOCK 0x5600
+#define VIDEO_BUFFER_UNLOCK 0x5601
+
+#define VIDEO_SET_BRIGHTNESS 0x5602
+#define VIDEO_GET_BRIGHTNESS 0x5603
+#define VIDEO_SET_CONTRAST 0x5604
+#define VIDEO_GET_CONTRAST 0x5605
+#define VIDEO_SET_HUE 0x5606
+#define VIDEO_GET_HUE 0x5607
+#define VIDEO_GET_SIGNAL 0x5608
+
+#define VIDEO_SET_REGISTER 0x5609
+#define VIDEO_GET_REGISTER 0x560a
+
+#define VIDEO_SET_FORMAT 0x560b
+
+enum {
+ VIDEO_FORMAT_CVBS6 = 0,
+ VIDEO_FORMAT_CVBS5,
+ VIDEO_FORMAT_CVBS4,
+ VIDEO_FORMAT_SVIDEO,
+ VIDEO_FORMAT_COMPONENT,
+};
+
+rtems_device_driver video_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver video_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver video_close(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver video_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define VIDEO_DRIVER_TABLE_ENTRY {video_initialize, \
+video_open, video_close, NULL, NULL, video_control}
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_VIDEO_H_ */