| 1 | /* $NetBSD: emdtvreg.h,v 1.2 2014/06/21 03:44:06 dholland Exp $ */ |
| 2 | |
| 3 | /*- |
| 4 | * Copyright (c) 2008 Jared D. McNeill <jmcneill@invisible.ca> |
| 5 | * All rights reserved. |
| 6 | * |
| 7 | * Redistribution and use in source and binary forms, with or without |
| 8 | * modification, are permitted provided that the following conditions |
| 9 | * are met: |
| 10 | * 1. Redistributions of source code must retain the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer. |
| 12 | * 2. Redistributions in binary form must reproduce the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer in the |
| 14 | * documentation and/or other materials provided with the distribution. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 26 | * POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
| 28 | |
| 29 | #ifndef _DEV_USB_EMDTVREG_H |
| 30 | #define _DEV_USB_EMDTVREG_H |
| 31 | |
| 32 | struct emdtv_eeprom { |
| 33 | uint32_t id; /* 0x9567eb1a */ |
| 34 | uint16_t vendor; |
| 35 | uint16_t product; |
| 36 | uint16_t chipcfg; |
| 37 | uint16_t boardcfg; |
| 38 | uint16_t string[3]; |
| 39 | uint8_t stringidx; |
| 40 | } __packed; |
| 41 | |
| 42 | #define EM28XX_I2C_ADDR_EEPROM 0xa0 |
| 43 | |
| 44 | #define EM28XX_UR_I2C 0x02 |
| 45 | |
| 46 | #define EM28XX_REG_I2C_STATUS 0x05 |
| 47 | |
| 48 | #define EM28XX_I2C_CLK_REG 0x06 |
| 49 | #define EM28XX_XCLK_REG 0x0f |
| 50 | |
| 51 | #define EM28XX_REG_IR 0x45 |
| 52 | #define EM28XX_IR_RECORD 0x00 |
| 53 | #define EM28XX_IR_PAUSEPLAY 0x01 |
| 54 | #define EM28XX_IR_STOP 0x02 |
| 55 | #define EM28XX_IR_POWER 0x03 |
| 56 | #define EM28XX_IR_PREV 0x04 |
| 57 | #define EM28XX_IR_REWIND 0x05 |
| 58 | #define EM28XX_IR_FORWARD 0x06 |
| 59 | #define EM28XX_IR_NEXT 0x07 |
| 60 | #define EM28XX_IR_EPG 0x08 |
| 61 | #define EM28XX_IR_HOME 0x09 |
| 62 | #define 0x0a |
| 63 | #define EM28XX_IR_CHANNEL_UP 0x0b |
| 64 | #define EM28XX_IR_BACK 0x0c |
| 65 | #define EM28XX_IR_UP 0x0d |
| 66 | #define EM28XX_IR_INFO 0x0e |
| 67 | #define EM28XX_IR_CHANNEL_DOWN 0x0f |
| 68 | #define EM28XX_IR_LEFT 0x10 |
| 69 | #define EM28XX_IR_OK 0x11 |
| 70 | #define EM28XX_IR_RIGHT 0x12 |
| 71 | #define EM28XX_IR_VOLUME_UP 0x13 |
| 72 | #define EM28XX_IR_LAST 0x14 |
| 73 | #define EM28XX_IR_DOWN 0x15 |
| 74 | #define EM28XX_IR_VOLUME_MUTE 0x16 |
| 75 | #define EM28XX_IR_VOLUME_DOWN 0x17 |
| 76 | |
| 77 | #endif /* !_DEV_USB_EMDTVREG_H */ |
| 78 | |