MotorWare f2806x Module API Documentation
hvkit_rev1p1/f28x/f2806x/src/float/hal_obj.h
Go to the documentation of this file.
1 #ifndef _HAL_OBJ_H_
2 #define _HAL_OBJ_H_
3 /* --COPYRIGHT--,BSD
4  * Copyright (c) 2012, Texas Instruments Incorporated
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  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  *
14  * * Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the distribution.
17  *
18  * * Neither the name of Texas Instruments Incorporated nor the names of
19  * its contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
26  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
29  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
31  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
32  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  * --/COPYRIGHT--*/
34 
39 
40 
41 // drivers
42 #include "sw/drivers/adc/src/32b/f28x/f2806x/adc.h"
43 #include "sw/drivers/clk/src/32b/f28x/f2806x/clk.h"
44 #include "sw/drivers/cpu/src/32b/f28x/f2806x/cpu.h"
45 #include "sw/drivers/flash/src/32b/f28x/f2806x/flash.h"
46 #include "sw/drivers/gpio/src/32b/f28x/f2806x/gpio.h"
47 #include "sw/drivers/osc/src/32b/f28x/f2806x/osc.h"
48 #include "sw/drivers/pie/src/32b/f28x/f2806x/pie.h"
49 #include "sw/drivers/pll/src/32b/f28x/f2806x/pll.h"
50 #include "sw/drivers/pwm/src/32b/f28x/f2806x/pwm.h"
51 #include "sw/drivers/pwmdac/src/32b/f28x/f2806x/pwmdac.h"
52 #include "sw/drivers/pwr/src/32b/f28x/f2806x/pwr.h"
53 #include "sw/drivers/timer/src/32b/f28x/f2806x/timer.h"
54 #include "sw/drivers/wdog/src/32b/f28x/f2806x/wdog.h"
55 
56 #ifdef QEP
57 #include "sw/drivers/qep/src/32b/f28x/f2806x/qep.h"
58 #endif
59 
60 // modules
65 
66 
67 
68 // platforms
69 #include "user.h"
70 
71 
76 
77 
78 
79 #ifdef __cplusplus
80 extern "C" {
81 #endif
82 
83 
89 typedef struct _HAL_Obj_
90 {
91  ADC_Handle adcHandle;
92 
93  CLK_Handle clkHandle;
94 
95  CPU_Handle cpuHandle;
96 
97  FLASH_Handle flashHandle;
98 
99  GPIO_Handle gpioHandle;
100 
101  OSC_Handle oscHandle;
102 
103  PIE_Handle pieHandle; //<! the PIE handle
104 
105  PLL_Handle pllHandle;
106 
107  PWM_Handle pwmHandle[3]; //<! the PWM handles
108 
109  PWMDAC_Handle pwmDacHandle[3]; //<! the PWMDAC handles
110 
111  PWR_Handle pwrHandle; //<! the power handle
112 
113  TIMER_Handle timerHandle[3]; //<! the timer handles
114 
115  WDOG_Handle wdogHandle;
116 
118 
120 
122 
123  uint_least8_t numCurrentSensors;
124  uint_least8_t numVoltageSensors;
125 
126  #ifdef QEP
127  QEP_Handle qepHandle[2];
128  #endif
129 } HAL_Obj;
130 
131 
137 typedef struct _HAL_Obj_ *HAL_Handle;
138 
139 
142 extern HAL_Obj hal;
143 
144 
145 #ifdef __cplusplus
146 }
147 #endif // extern "C"
148 
150 #endif // end of _HAL_OBJ_H_ definition
151 
Contains the public interface to the types definitions.
Contains the public interface to the offset (OFFSET) module routines.
CLK_Handle clkHandle
the clock handle
_iq current_sf
the current scale factor, amps_pu/cnt
Contains the HAL data structures.
HAL_AdcData_t adcBias
the ADC bias
FLASH_Handle flashHandle
the flash handle
Contains public interface to the micro-second delay function.
struct _HAL_Obj_ * HAL_Handle
Defines the HAL handle.
uint_least8_t numCurrentSensors
the number of current sensors
_iq voltage_sf
the voltage scale factor, volts_pu/cnt
WDOG_Handle wdogHandle
the watchdog handle
OSC_Handle oscHandle
the oscillator handle
ADC_Handle adcHandle
the ADC handle
CPU_Handle cpuHandle
the CPU handle
struct _HAL_Obj_ HAL_Obj
Defines the hardware abstraction layer (HAL) data.
HAL_Obj hal
Defines the HAL object.
PLL_Handle pllHandle
the PLL handle
uint_least8_t numVoltageSensors
the number of voltage sensors
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
Definition: types.h:121
Defines the hardware abstraction layer (HAL) data.
GPIO_Handle gpioHandle
the GPIO handle