includes for $PREFIX..../include

git-svn-id: http://www.coolstreamtech.de/coolstream_public_svn/CROSSENVIROMENT/coolstream@17 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 4dc1d7147a
Author: [CST] Lucian <lucian@coolstreamtech.com>
Date: 2009-11-17 (Tue, 17 Nov 2009)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Lucian
2009-11-17 11:35:10 +00:00
commit 99a8f617a6
3 changed files with 161 additions and 0 deletions

67
control.h Normal file
View File

@@ -0,0 +1,67 @@
/********************************************************************
* Description: Control driver for PWM and Scart
* Author: CoolStream Dev. Team
* Created at: Fri Jun 26 08:11:43 CEST 2009
*
* Copyright (c) 2009 CoolStream International Ltd. All rights reserved.
*
********************************************************************/
#ifndef __CONTROL_H
#define __CONTROL_H
#ifndef __KERNEL__
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#include <sys/ioctl.h>
#else
#include <linux/types.h>
#include <asm/ioctl.h>
#endif
#include "tsrouter.h"
typedef struct _scart_status {
bool widescreen;
bool function;
bool fastblank;
} scart_status_t;
typedef struct _pwm_status {
u16 pwm_pulse_first;
u16 pwm_pulse_second;
u32 pwm_clock;
} pwm_status_t;
typedef struct cs_control_data {
scart_status_t scart_status;
pwm_status_t pwm_status;
bool hdd_power;
u32 readers;
u32 sys_serial_high, sys_serial_low;
u32 sys_revision;
} cs_control_data_t;
/* ioctls */
#define CS_CONTROL_MAGIC 0xDE
#define IOC_CONTROL_WIDESCREEN _IOW(CS_CONTROL_MAGIC, 8, unsigned int)
#define IOC_CONTROL_TVAV _IOW(CS_CONTROL_MAGIC, 9, unsigned int)
#define IOC_CONTROL_RGB _IOW(CS_CONTROL_MAGIC, 10, unsigned int)
#define IOC_CONTROL_SCART_STATUS _IOR(CS_CONTROL_MAGIC, 11, scart_status_t *)
#define IOC_CONTROL_PWM_SPEED _IOW(CS_CONTROL_MAGIC, 12, unsigned int)
#define IOC_CONTROL_HDDPOWER _IOW(CS_CONTROL_MAGIC, 13, unsigned int)
/* ioctl for getting board serial and revision */
#define IOC_CONTROL_BOARD_SERIAL_LOW _IOR(CS_CONTROL_MAGIC, 14, unsigned int *)
#define IOC_CONTROL_BOARD_SERIAL_HIGH _IOR(CS_CONTROL_MAGIC, 15, unsigned int *)
#define IOC_CONTROL_BOARD_REV _IOR(CS_CONTROL_MAGIC, 16, unsigned int *)
/* ioctl for setting TS routing */
#define IOC_CONTROL_TSROUTE_GET_HSDP_CONFIG _IOR(CS_CONTROL_MAGIC, 17, tsrouter_hsdp_config_t *)
#define IOC_CONTROL_TSROUTE_SET_HSDP_CONFIG _IOW(CS_CONTROL_MAGIC, 18, tsrouter_tsp_config_t *)
#define IOC_CONTROL_TSROUTE_GET_TSP_CONFIG _IOR(CS_CONTROL_MAGIC, 19, tsrouter_hsdp_config_t *)
#define IOC_CONTROL_TSROUTE_SET_TSP_CONFIG _IOW(CS_CONTROL_MAGIC, 20, tsrouter_tsp_config_t *)
#endif /* __CONTROL_H */

62
cs_vfd.h Executable file
View File

@@ -0,0 +1,62 @@
/*
* Driver for the Samsung HCR-13SS22 VF-Display connected to the Conexant
* CX2450x (Nevis) SoC via Coolstream VFD-Controller - public definititons.
*
* Copyright (C) 2008 Coolstream International Limited
*/
#ifndef __CS_VFD__
#define __CS_VFD__
typedef enum
{
VFD_ICON_BAR8 = 0x00000004,
VFD_ICON_BAR7 = 0x00000008,
VFD_ICON_BAR6 = 0x00000010,
VFD_ICON_BAR5 = 0x00000020,
VFD_ICON_BAR4 = 0x00000040,
VFD_ICON_BAR3 = 0x00000080,
VFD_ICON_BAR2 = 0x00000100,
VFD_ICON_BAR1 = 0x00000200,
VFD_ICON_FRAME = 0x00000400,
VFD_ICON_HDD = 0x00000800,
VFD_ICON_MUTE = 0x00001000,
VFD_ICON_DOLBY = 0x00002000,
VFD_ICON_POWER = 0x00004000,
VFD_ICON_TIMESHIFT = 0x00008000,
VFD_ICON_SIGNAL = 0x00010000,
VFD_ICON_TV = 0x00020000,
VFD_ICON_RADIO = 0x00040000,
VFD_ICON_HD = 0x01000001,
VFD_ICON_1080P = 0x02000001,
VFD_ICON_1080I = 0x03000001,
VFD_ICON_720P = 0x04000001,
VFD_ICON_480P = 0x05000001,
VFD_ICON_480I = 0x06000001,
VFD_ICON_USB = 0x07000001,
VFD_ICON_MP3 = 0x08000001,
VFD_ICON_PLAY = 0x09000001,
VFD_ICON_COL1 = 0x09000002,
VFD_ICON_PAUSE = 0x0A000001,
VFD_ICON_CAM1 = 0x0B000001,
VFD_ICON_COL2 = 0x0B000002,
VFD_ICON_CAM2 = 0x0C000001
} vfd_icon;
typedef enum
{
VFD_FLAG_NONE = 0x00,
VFD_FLAG_SCROLL_ON = 0x01, /* switch scrolling on */
VFD_FLAG_SCROLL_LTR = 0x02, /* scroll from left to rightinstead of default right to left direction (i.e. for arabic text) */
VFD_FLAG_SCROLL_SIO = 0x04 /* start/stop scrolling with empty screen (scroll in/out) */
} vfd_flag;
#define IOC_VFD_SET_BRIGHT _IOW(0xDE, 1, unsigned char) /* set the display brighness in 16 steps between 0 to 15 */
#define IOC_VFD_CLEAR_ALL _IOW(0xDE, 2, unsigned int) /* clear the entire display (both text and icons) */
#define IOC_VFD_SET_TEXT _IOW(0xDE, 3, char*) /* set a text to be displayed on the display. If arg == NULL, the text is cleared */
#define IOC_VFD_SET_ICON _IOW(0xDE, 4, vfd_icon) /* switch the given icon on */
#define IOC_VFD_CLEAR_ICON _IOW(0xDE, 5, vfd_icon) /* switch the given icon off */
#define IOC_VFD_SET_OUTPUT _IOW(0xDE, 6, unsigned char) /* switch the given output on (supported by the controller, but not used in the hardware) */
#define IOC_VFD_CLEAR_OUTPUT _IOW(0xDE, 7, unsigned char) /* switch the given output off (supported by the controller, but not used in the hardware) */
#endif /* __CS_VFD__ */

32
tsrouter.h Normal file
View File

@@ -0,0 +1,32 @@
#ifndef __TSROUTER_H
#define __TSROUTER_H
typedef struct _tsrouter_hsdp_config {
u8 port;
u32 port_ctrl;
u32 pkt_ctrl;
u32 clk_ctrl;
u32 mux;
u32 int_en;
/* more ? */
} tsrouter_hsdp_config_t;
typedef struct _tsrouter_tsp_config {
u8 port;
u32 port_ctrl;
u32 mux;
} tsrouter_tsp_config_t;
extern int cs_tsrouter_init(void);
extern void cs_tsrouter_exit(void);
extern void cs_tsx_hsdp_init_port(u32 port, u32 ctrl);
extern void cs_tsx_tsp_init_port(u32 port, u32 hsdp_port);
extern void cs_tsx_hsdp_get_port_config(tsrouter_hsdp_config_t *conf);
extern void cs_tsx_tsp_get_port_config(tsrouter_tsp_config_t *conf);
extern void cs_tsx_hsdp_set_port_config(const tsrouter_hsdp_config_t *conf);
extern void cs_tsx_tsp_set_port_config(const tsrouter_tsp_config_t *conf);
#endif /* __TSROUTER_H */