1 /****************************************************************************** 2 * 3 * Copyright (C) 2001-2012 Broadcom Corporation 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 19 /****************************************************************************** 20 * 21 * Definitions for UDAC driver 22 * 23 ******************************************************************************/ 24 #ifndef UDAC_H 25 #define UDAC_H 26 27 28 #define UDAC_GAIN_MAX 0x00FFF 29 typedef UINT16 tUDAC_GAIN; 30 31 /* API functions for DAC driver */ 32 33 34 /***************************************************************************** 35 ** 36 ** Function DAC_Init 37 ** 38 ** Description 39 ** Initialize the DAC subsystem 40 ** 41 ** Input parameters 42 ** Nothing 43 ** 44 ** Output parameters 45 ** Nothing 46 ** 47 ** Returns 48 ** Nothing 49 ** 50 *****************************************************************************/ 51 void UDAC_Init(void *p_cfg); 52 53 54 /***************************************************************************** 55 ** 56 ** Function DAC_Read 57 ** 58 ** Description 59 ** Read current DAC gain 60 ** 61 ** Input parameters 62 ** Nothing 63 ** 64 ** Output parameters 65 ** Nothing 66 ** 67 ** Returns 68 ** Current gain setting 69 ** 70 *****************************************************************************/ 71 tUDAC_GAIN UDAC_Read(void); 72 73 74 /***************************************************************************** 75 ** 76 ** Function DAC_Set 77 ** 78 ** Description 79 ** Set the DAC gain 80 ** 81 ** Input parameters 82 ** gain Gain setting 83 ** 84 ** Output parameters 85 ** Nothing 86 ** 87 ** Returns 88 ** Nothing 89 ** 90 *****************************************************************************/ 91 void UDAC_Set(tUDAC_GAIN gain); 92 93 #endif /* #ifndef UDAC_H */ 94