1 /* 2 * 3 * Copyright 2001-2011 Texas Instruments, Inc. - http://www.ti.com/ 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package com.ti.fmrxapp; 19 20 public interface FmRxAppConstants { 21 /******************************************** 22 * Message Code 23 ********************************************/ 24 public static final int EVENT_FM_ENABLED = 1; 25 public static final int EVENT_FM_DISABLED = 2; 26 public static final int EVENT_MONO_STEREO_CHANGE = 3; 27 public static final int EVENT_SEEK_STARTED = 4; 28 public static final int EVENT_VOLUME_CHANGE = 5; 29 public static final int EVENT_TUNE_COMPLETE = 6; 30 public static final int EVENT_MUTE_CHANGE = 7; 31 public static final int EVENT_SEEK_STOPPED = 8; 32 public static final int EVENT_RDS_TEXT = 9; 33 public static final int EVENT_BAND_CHANGE = 10; 34 public static final int EVENT_MONO_STEREO_DISPLAY = 11; 35 public static final int EVENT_ENABLE_RDS = 12; 36 public static final int EVENT_SET_RDS_SYSTEM = 13; 37 public static final int EVENT_SET_RDS_AF = 14; 38 public static final int EVENT_DISABLE_RDS = 15; 39 public static final int EVENT_SET_DEEMP_FILTER = 16; 40 public static final int EVENT_PS_CHANGED = 17; 41 public static final int EVENT_SET_RSSI_THRESHHOLD = 18; 42 public static final int EVENT_SET_RF_DEPENDENT_MUTE = 19; 43 public static final int EVENT_MASTER_VOLUME_CHANGED = 20; 44 public static final int EVENT_SET_CHANNELSPACE = 21; 45 public static final int EVENT_COMPLETE_SCAN_DONE = 22; 46 public static final int EVENT_COMPLETE_SCAN_STOP = 23; 47 public static final int EVENT_GET_CHANNEL_SPACE_CHANGE = 24; 48 public static final int EVENT_PI_CODE = 25; 49 public static final int EVENT_GET_RDS_AF_SWITCHMODE = 26; 50 public static final int EVENT_GET_BAND = 27; 51 public static final int EVENT_GET_VOLUME = 28; 52 public static final int EVENT_GET_MODE = 29; 53 public static final int EVENT_GET_MUTE_MODE = 30; 54 public static final int EVENT_GET_RF_MUTE_MODE =31 ; 55 public static final int EVENT_GET_RSSI_THRESHHOLD =32 ; 56 public static final int EVENT_GET_DEEMPHASIS_FILTER = 33; 57 public static final int EVENT_GET_RSSI =34 ; 58 public static final int EVENT_GET_RDS_SYSTEM =35 ; 59 public static final int EVENT_GET_RDS_GROUPMASK = 36; 60 public static final int EVENT_GET_FREQUENCY = 37; 61 public static final int EVENT_COMPLETE_SCAN_PROGRESS = 38; 62 63 64 /* Volume range */ 65 66 public static final int MIN_VOLUME = 0; 67 public static final int MAX_VOLUME =16383; //32767,//65535; 68 public static final int GAIN_STEP = 234; //468, //935; 69 70 /* default values */ 71 public static final int DEF_VOLUME = 10; 72 public static final float DEFAULT_FREQ_EUROPE = (float) 87500 / 1000; 73 public static final float DEFAULT_FREQ_JAPAN = (float) 76000 / 1000; 74 public static final int DEFAULT_BAND = 0; // EuropeUS 75 public static final int DEFAULT_MODE = 0; // Stereo 76 public static final boolean DEFAULT_RDS = false; 77 public static final int DEFAULT_DEEMP = 0; 78 public static final int DEFAULT_RDS_SYSTEM = 0; 79 public static final boolean DEFAULT_RDS_AF = false; 80 public static final int DEFAULT_RSSI = 7; 81 public static final int DEFAULT_CHANNELSPACE = 2; 82 83 /* Actvity result index */ 84 85 public static final int ACTIVITY_TUNE = 1; 86 public static final int ACTIVITY_CONFIG = 2; 87 public static final int ACTIVITY_PRESET = 3; 88 89 public static final String FREQ_VALUE = "FREQUENCY"; 90 91 /* Rssi range */ 92 93 public static final int RSSI_MIN = 1; 94 public static final int RSSI_MAX = 127; 95 96 /* Preset list display items */ 97 98 public static final String ITEM_KEY = "key"; 99 public static final String ITEM_VALUE = "value"; 100 public static final String ITEM_NAME = "name"; 101 102 /* seek states */ 103 public static final boolean SEEK_REQ_STATE_IDLE = true; 104 public static final boolean SEEK_REQ_STATE_PENDING = false; 105 106 /* Preference save keys */ 107 108 public static final String BAND = "BAND"; 109 public static final String VOLUME = "VOLUME"; 110 public static final String FREQUENCY = "FREQUENCY"; 111 public static final String MODE = "MODE"; 112 public static final String RDS = "RDS"; 113 public static final String RDSSYSTEM = "RDSSYSTEM"; 114 public static final String DEEMP = "DEEMP"; 115 public static final String RDSAF = "RDSAF"; 116 public static final String RSSI = "RSSI"; 117 public static final String RSSI_STRING = "RSSI_STRING"; 118 public static final String DEF_RSSI_STRING = "7"; 119 public static final String CHANNELSPACE = "CHANNELSPACE"; 120 public static final String MUTE = "MUTE"; 121 122 /* Configuration states */ 123 124 public static final int CONFIGURATION_STATE_IDLE = 1; 125 public static final int CONFIGURATION_STATE_PENDING = 2; 126 127 /* Initial values */ 128 public static final int INITIAL_VAL = 5; 129 public static final int INITIAL_RSSI = 0; 130 131 /* Seek constants */ 132 133 public static final int FM_SEEK_UP = 1; 134 public static final int FM_SEEK_DOWN = 0; 135 136 137 /* Activity Intenets */ 138 public static final String INTENT_RDS_CONFIG = "android.intent.action.RDS_CONFIG"; 139 public static final String INTENT_PRESET = "android.intent.action.PRESET"; 140 public static final String INTENT_RXHELP = "android.intent.action.START_RXHELP"; 141 public static final String INTENT_RXTUNE = "android.intent.action.START_RXFREQ"; 142 143 144 /* Europe / US band limits */ 145 public static final float APP_FM_FIRST_FREQ_US_EUROPE_KHZ = (float)87.5; 146 147 public static final float APP_FM_LAST_FREQ_US_EUROPE_KHZ = (float)108.0; 148 149 /* Japan band limits */ 150 public static final float APP_FM_FIRST_FREQ_JAPAN_KHZ = (float)76.0; 151 152 public static final float APP_FM_LAST_FREQ_JAPAN_KHZ = (float)90.0; 153 154 } 155