TI-RTOS Drivers  tidrivers_cc13xx_cc26xx_2_16_00_08
PWMTimerCC26XX.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * 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  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
83 #ifndef ti_driver_pwm_PWMTimerCC26XX__include
84 #define ti_driver_pwm_PWMTimerCC26XX__include
85 
86 #ifdef __cplusplus
87 extern "C" {
88 #endif
89 
90 #include <ti/drivers/PWM.h>
91 
102 /* Add PWMTimerCC26XX_STATUS_* macros here */
103 
119 #define PWMTimerCC26XX_CMD_CHANGE_PERIOD PWM_CMD_RESERVED + 0
120 
122 /* BACKWARDS COMPATIBILITY */
123 #define PWMTimerCC26XX_CHANGE_PERIOD PWMTimerCC26XX_CMD_CHANGE_PERIOD
124 /* END BACKWARDS COMPATIBILITY */
125 
126 /* PWM function table pointer */
128 
139 typedef struct PWMTimerCC26XX_PWMPinCfg {
140  uint8_t pwmPinId;
142 
159 typedef struct PWMTimerCC26XX_HWAttrs {
160  uint32_t baseAddr;
161  uint16_t timer;
162  uint32_t powerMngrId;
163  uint8_t pwmPinId;
165 
171 typedef struct PWMTimerCC26XX_Object {
172  uint32_t period;
173  uint32_t duty;
174  uint8_t dutyMode; /* Units in which duty is specified */
176  uint8_t timerNum; /* 0-7 */
178 
179 #ifdef __cplusplus
180 }
181 #endif
182 
183 #endif /* ti_driver_pwm_PWMTimerCC26XX__include */
uint8_t pwmPinId
Definition: PWMTimerCC26XX.h:140
uint32_t duty
Definition: PWMTimerCC26XX.h:173
PWMTimerCC26XX Object.
Definition: PWMTimerCC26XX.h:171
uint32_t period
Definition: PWMTimerCC26XX.h:172
PWM driver interface.
struct PWMTimerCC26XX_Object PWMTimerCC26XX_Object
PWMTimerCC26XX Object.
PWMTimerCC26XX Hardware attributes.
Definition: PWMTimerCC26XX.h:159
The definition of a PWM function table that contains the required set of functions to control a speci...
Definition: PWM.h:349
uint32_t baseAddr
Definition: PWMTimerCC26XX.h:160
struct PWMTimerCC26XX_HWAttrs PWMTimerCC26XX_HWAttrs
PWMTimerCC26XX Hardware attributes.
uint8_t timerNum
Definition: PWMTimerCC26XX.h:176
uint8_t pwmPinId
Definition: PWMTimerCC26XX.h:163
uint8_t dutyMode
Definition: PWMTimerCC26XX.h:174
PWMTimerCC26XX PWM Pin Configuration.
Definition: PWMTimerCC26XX.h:139
const PWM_FxnTable PWMTimerCC26XX_fxnTable
uint16_t timer
Definition: PWMTimerCC26XX.h:161
uint8_t cyclesPerMicroSec
Definition: PWMTimerCC26XX.h:175
uint32_t powerMngrId
Definition: PWMTimerCC26XX.h:162
struct PWMTimerCC26XX_PWMPinCfg PWMTimerCC26XX_PWMPinCfg
PWMTimerCC26XX PWM Pin Configuration.
Copyright 2016, Texas Instruments Incorporated