5.2.1 - Updated I2C files
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
targets/TARGET_STM/TARGET_STM32F3/pwmout_api.c@1:f30bdcd2b33b, 2017-02-27 (annotated)
- Committer:
- jacobjohnson
- Date:
- Mon Feb 27 17:45:05 2017 +0000
- Revision:
- 1:f30bdcd2b33b
- Parent:
- 0:098463de4c5d
changed the inputscale from 1 to 7 in analogin_api.c. This will need to be changed later, and accessed from the main level, but for now this allows the adc to read a value from 0 to 3.7V, instead of just up to 1V.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
group-onsemi | 0:098463de4c5d | 1 | /* mbed Microcontroller Library |
group-onsemi | 0:098463de4c5d | 2 | ******************************************************************************* |
group-onsemi | 0:098463de4c5d | 3 | * Copyright (c) 2015, STMicroelectronics |
group-onsemi | 0:098463de4c5d | 4 | * All rights reserved. |
group-onsemi | 0:098463de4c5d | 5 | * |
group-onsemi | 0:098463de4c5d | 6 | * Redistribution and use in source and binary forms, with or without |
group-onsemi | 0:098463de4c5d | 7 | * modification, are permitted provided that the following conditions are met: |
group-onsemi | 0:098463de4c5d | 8 | * |
group-onsemi | 0:098463de4c5d | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
group-onsemi | 0:098463de4c5d | 10 | * this list of conditions and the following disclaimer. |
group-onsemi | 0:098463de4c5d | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
group-onsemi | 0:098463de4c5d | 12 | * this list of conditions and the following disclaimer in the documentation |
group-onsemi | 0:098463de4c5d | 13 | * and/or other materials provided with the distribution. |
group-onsemi | 0:098463de4c5d | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
group-onsemi | 0:098463de4c5d | 15 | * may be used to endorse or promote products derived from this software |
group-onsemi | 0:098463de4c5d | 16 | * without specific prior written permission. |
group-onsemi | 0:098463de4c5d | 17 | * |
group-onsemi | 0:098463de4c5d | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
group-onsemi | 0:098463de4c5d | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
group-onsemi | 0:098463de4c5d | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
group-onsemi | 0:098463de4c5d | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
group-onsemi | 0:098463de4c5d | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
group-onsemi | 0:098463de4c5d | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
group-onsemi | 0:098463de4c5d | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
group-onsemi | 0:098463de4c5d | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
group-onsemi | 0:098463de4c5d | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
group-onsemi | 0:098463de4c5d | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
group-onsemi | 0:098463de4c5d | 28 | ******************************************************************************* |
group-onsemi | 0:098463de4c5d | 29 | */ |
group-onsemi | 0:098463de4c5d | 30 | #include "pwmout_api.h" |
group-onsemi | 0:098463de4c5d | 31 | |
group-onsemi | 0:098463de4c5d | 32 | #if DEVICE_PWMOUT |
group-onsemi | 0:098463de4c5d | 33 | |
group-onsemi | 0:098463de4c5d | 34 | #include "cmsis.h" |
group-onsemi | 0:098463de4c5d | 35 | #include "pinmap.h" |
group-onsemi | 0:098463de4c5d | 36 | #include "mbed_error.h" |
group-onsemi | 0:098463de4c5d | 37 | #include "PeripheralPins.h" |
group-onsemi | 0:098463de4c5d | 38 | |
group-onsemi | 0:098463de4c5d | 39 | static TIM_HandleTypeDef TimHandle; |
group-onsemi | 0:098463de4c5d | 40 | |
group-onsemi | 0:098463de4c5d | 41 | void pwmout_init(pwmout_t* obj, PinName pin) |
group-onsemi | 0:098463de4c5d | 42 | { |
group-onsemi | 0:098463de4c5d | 43 | // Get the peripheral name from the pin and assign it to the object |
group-onsemi | 0:098463de4c5d | 44 | obj->pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM); |
group-onsemi | 0:098463de4c5d | 45 | MBED_ASSERT(obj->pwm != (PWMName)NC); |
group-onsemi | 0:098463de4c5d | 46 | |
group-onsemi | 0:098463de4c5d | 47 | // Get the pin function and assign the used channel to the object |
group-onsemi | 0:098463de4c5d | 48 | uint32_t function = pinmap_function(pin, PinMap_PWM); |
group-onsemi | 0:098463de4c5d | 49 | MBED_ASSERT(function != (uint32_t)NC); |
group-onsemi | 0:098463de4c5d | 50 | obj->channel = STM_PIN_CHANNEL(function); |
group-onsemi | 0:098463de4c5d | 51 | obj->inverted = STM_PIN_INVERTED(function); |
group-onsemi | 0:098463de4c5d | 52 | |
group-onsemi | 0:098463de4c5d | 53 | #if defined(TIM1_BASE) |
group-onsemi | 0:098463de4c5d | 54 | if (obj->pwm == PWM_1) __HAL_RCC_TIM1_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 55 | #endif |
group-onsemi | 0:098463de4c5d | 56 | #if defined(TIM2_BASE) |
group-onsemi | 0:098463de4c5d | 57 | if (obj->pwm == PWM_2) __HAL_RCC_TIM2_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 58 | #endif |
group-onsemi | 0:098463de4c5d | 59 | #if defined(TIM3_BASE) |
group-onsemi | 0:098463de4c5d | 60 | if (obj->pwm == PWM_3) __HAL_RCC_TIM3_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 61 | #endif |
group-onsemi | 0:098463de4c5d | 62 | #if defined(TIM4_BASE) |
group-onsemi | 0:098463de4c5d | 63 | if (obj->pwm == PWM_4) __HAL_RCC_TIM4_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 64 | #endif |
group-onsemi | 0:098463de4c5d | 65 | #if defined(TIM5_BASE) |
group-onsemi | 0:098463de4c5d | 66 | if (obj->pwm == PWM_5) __HAL_RCC_TIM5_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 67 | #endif |
group-onsemi | 0:098463de4c5d | 68 | #if defined(TIM8_BASE) |
group-onsemi | 0:098463de4c5d | 69 | if (obj->pwm == PWM_8) __HAL_RCC_TIM8_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 70 | #endif |
group-onsemi | 0:098463de4c5d | 71 | #if defined(TIM9_BASE) |
group-onsemi | 0:098463de4c5d | 72 | if (obj->pwm == PWM_9) __HAL_RCC_TIM9_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 73 | #endif |
group-onsemi | 0:098463de4c5d | 74 | #if defined(TIM10_BASE) |
group-onsemi | 0:098463de4c5d | 75 | if (obj->pwm == PWM_10) __HAL_RCC_TIM10_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 76 | #endif |
group-onsemi | 0:098463de4c5d | 77 | #if defined(TIM11_BASE) |
group-onsemi | 0:098463de4c5d | 78 | if (obj->pwm == PWM_11) __HAL_RCC_TIM11_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 79 | #endif |
group-onsemi | 0:098463de4c5d | 80 | #if defined(TIM12_BASE) |
group-onsemi | 0:098463de4c5d | 81 | if (obj->pwm == PWM_12) __HAL_RCC_TIM12_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 82 | #endif |
group-onsemi | 0:098463de4c5d | 83 | #if defined(TIM13_BASE) |
group-onsemi | 0:098463de4c5d | 84 | if (obj->pwm == PWM_13) __HAL_RCC_TIM13_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 85 | #endif |
group-onsemi | 0:098463de4c5d | 86 | #if defined(TIM14_BASE) |
group-onsemi | 0:098463de4c5d | 87 | if (obj->pwm == PWM_14) __HAL_RCC_TIM14_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 88 | #endif |
group-onsemi | 0:098463de4c5d | 89 | #if defined(TIM15_BASE) |
group-onsemi | 0:098463de4c5d | 90 | if (obj->pwm == PWM_15) __HAL_RCC_TIM15_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 91 | #endif |
group-onsemi | 0:098463de4c5d | 92 | #if defined(TIM16_BASE) |
group-onsemi | 0:098463de4c5d | 93 | if (obj->pwm == PWM_16) __HAL_RCC_TIM16_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 94 | #endif |
group-onsemi | 0:098463de4c5d | 95 | #if defined(TIM17_BASE) |
group-onsemi | 0:098463de4c5d | 96 | if (obj->pwm == PWM_17) __HAL_RCC_TIM17_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 97 | #endif |
group-onsemi | 0:098463de4c5d | 98 | #if defined(TIM18_BASE) |
group-onsemi | 0:098463de4c5d | 99 | if (obj->pwm == PWM_18) __HAL_RCC_TIM18_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 100 | #endif |
group-onsemi | 0:098463de4c5d | 101 | #if defined(TIM19_BASE) |
group-onsemi | 0:098463de4c5d | 102 | if (obj->pwm == PWM_19) __HAL_RCC_TIM19_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 103 | #endif |
group-onsemi | 0:098463de4c5d | 104 | #if defined(TIM20_BASE) |
group-onsemi | 0:098463de4c5d | 105 | if (obj->pwm == PWM_20) __HAL_RCC_TIM20_CLK_ENABLE(); |
group-onsemi | 0:098463de4c5d | 106 | #endif |
group-onsemi | 0:098463de4c5d | 107 | |
group-onsemi | 0:098463de4c5d | 108 | // Configure GPIO |
group-onsemi | 0:098463de4c5d | 109 | pinmap_pinout(pin, PinMap_PWM); |
group-onsemi | 0:098463de4c5d | 110 | |
group-onsemi | 0:098463de4c5d | 111 | obj->pin = pin; |
group-onsemi | 0:098463de4c5d | 112 | obj->period = 0; |
group-onsemi | 0:098463de4c5d | 113 | obj->pulse = 0; |
group-onsemi | 0:098463de4c5d | 114 | obj->prescaler = 1; |
group-onsemi | 0:098463de4c5d | 115 | |
group-onsemi | 0:098463de4c5d | 116 | pwmout_period_us(obj, 20000); // 20 ms per default |
group-onsemi | 0:098463de4c5d | 117 | } |
group-onsemi | 0:098463de4c5d | 118 | |
group-onsemi | 0:098463de4c5d | 119 | void pwmout_free(pwmout_t* obj) |
group-onsemi | 0:098463de4c5d | 120 | { |
group-onsemi | 0:098463de4c5d | 121 | // Configure GPIO |
group-onsemi | 0:098463de4c5d | 122 | pin_function(obj->pin, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)); |
group-onsemi | 0:098463de4c5d | 123 | } |
group-onsemi | 0:098463de4c5d | 124 | |
group-onsemi | 0:098463de4c5d | 125 | void pwmout_write(pwmout_t* obj, float value) |
group-onsemi | 0:098463de4c5d | 126 | { |
group-onsemi | 0:098463de4c5d | 127 | TIM_OC_InitTypeDef sConfig; |
group-onsemi | 0:098463de4c5d | 128 | int channel = 0; |
group-onsemi | 0:098463de4c5d | 129 | |
group-onsemi | 0:098463de4c5d | 130 | TimHandle.Instance = (TIM_TypeDef *)(obj->pwm); |
group-onsemi | 0:098463de4c5d | 131 | |
group-onsemi | 0:098463de4c5d | 132 | if (value < (float)0.0) { |
group-onsemi | 0:098463de4c5d | 133 | value = 0.0; |
group-onsemi | 0:098463de4c5d | 134 | } else if (value > (float)1.0) { |
group-onsemi | 0:098463de4c5d | 135 | value = 1.0; |
group-onsemi | 0:098463de4c5d | 136 | } |
group-onsemi | 0:098463de4c5d | 137 | |
group-onsemi | 0:098463de4c5d | 138 | obj->pulse = (uint32_t)((float)obj->period * value); |
group-onsemi | 0:098463de4c5d | 139 | |
group-onsemi | 0:098463de4c5d | 140 | // Configure channels |
group-onsemi | 0:098463de4c5d | 141 | sConfig.OCMode = TIM_OCMODE_PWM1; |
group-onsemi | 0:098463de4c5d | 142 | sConfig.Pulse = obj->pulse / obj->prescaler; |
group-onsemi | 0:098463de4c5d | 143 | sConfig.OCPolarity = TIM_OCPOLARITY_HIGH; |
group-onsemi | 0:098463de4c5d | 144 | sConfig.OCNPolarity = TIM_OCNPOLARITY_HIGH; |
group-onsemi | 0:098463de4c5d | 145 | sConfig.OCFastMode = TIM_OCFAST_DISABLE; |
group-onsemi | 0:098463de4c5d | 146 | sConfig.OCIdleState = TIM_OCIDLESTATE_RESET; |
group-onsemi | 0:098463de4c5d | 147 | sConfig.OCNIdleState = TIM_OCNIDLESTATE_RESET; |
group-onsemi | 0:098463de4c5d | 148 | |
group-onsemi | 0:098463de4c5d | 149 | switch (obj->channel) { |
group-onsemi | 0:098463de4c5d | 150 | case 1: |
group-onsemi | 0:098463de4c5d | 151 | channel = TIM_CHANNEL_1; |
group-onsemi | 0:098463de4c5d | 152 | break; |
group-onsemi | 0:098463de4c5d | 153 | case 2: |
group-onsemi | 0:098463de4c5d | 154 | channel = TIM_CHANNEL_2; |
group-onsemi | 0:098463de4c5d | 155 | break; |
group-onsemi | 0:098463de4c5d | 156 | case 3: |
group-onsemi | 0:098463de4c5d | 157 | channel = TIM_CHANNEL_3; |
group-onsemi | 0:098463de4c5d | 158 | break; |
group-onsemi | 0:098463de4c5d | 159 | case 4: |
group-onsemi | 0:098463de4c5d | 160 | channel = TIM_CHANNEL_4; |
group-onsemi | 0:098463de4c5d | 161 | break; |
group-onsemi | 0:098463de4c5d | 162 | default: |
group-onsemi | 0:098463de4c5d | 163 | return; |
group-onsemi | 0:098463de4c5d | 164 | } |
group-onsemi | 0:098463de4c5d | 165 | |
group-onsemi | 0:098463de4c5d | 166 | if (HAL_TIM_PWM_ConfigChannel(&TimHandle, &sConfig, channel) != HAL_OK) { |
group-onsemi | 0:098463de4c5d | 167 | error("Cannot initialize PWM"); |
group-onsemi | 0:098463de4c5d | 168 | } |
group-onsemi | 0:098463de4c5d | 169 | |
group-onsemi | 0:098463de4c5d | 170 | if (obj->inverted) { |
group-onsemi | 0:098463de4c5d | 171 | HAL_TIMEx_PWMN_Start(&TimHandle, channel); |
group-onsemi | 0:098463de4c5d | 172 | } else { |
group-onsemi | 0:098463de4c5d | 173 | HAL_TIM_PWM_Start(&TimHandle, channel); |
group-onsemi | 0:098463de4c5d | 174 | } |
group-onsemi | 0:098463de4c5d | 175 | } |
group-onsemi | 0:098463de4c5d | 176 | |
group-onsemi | 0:098463de4c5d | 177 | float pwmout_read(pwmout_t* obj) |
group-onsemi | 0:098463de4c5d | 178 | { |
group-onsemi | 0:098463de4c5d | 179 | float value = 0; |
group-onsemi | 0:098463de4c5d | 180 | if (obj->period > 0) { |
group-onsemi | 0:098463de4c5d | 181 | value = (float)(obj->pulse) / (float)(obj->period); |
group-onsemi | 0:098463de4c5d | 182 | } |
group-onsemi | 0:098463de4c5d | 183 | return ((value > (float)1.0) ? (float)(1.0) : (value)); |
group-onsemi | 0:098463de4c5d | 184 | } |
group-onsemi | 0:098463de4c5d | 185 | |
group-onsemi | 0:098463de4c5d | 186 | void pwmout_period(pwmout_t* obj, float seconds) |
group-onsemi | 0:098463de4c5d | 187 | { |
group-onsemi | 0:098463de4c5d | 188 | pwmout_period_us(obj, seconds * 1000000.0f); |
group-onsemi | 0:098463de4c5d | 189 | } |
group-onsemi | 0:098463de4c5d | 190 | |
group-onsemi | 0:098463de4c5d | 191 | void pwmout_period_ms(pwmout_t* obj, int ms) |
group-onsemi | 0:098463de4c5d | 192 | { |
group-onsemi | 0:098463de4c5d | 193 | pwmout_period_us(obj, ms * 1000); |
group-onsemi | 0:098463de4c5d | 194 | } |
group-onsemi | 0:098463de4c5d | 195 | |
group-onsemi | 0:098463de4c5d | 196 | void pwmout_period_us(pwmout_t* obj, int us) |
group-onsemi | 0:098463de4c5d | 197 | { |
group-onsemi | 0:098463de4c5d | 198 | TimHandle.Instance = (TIM_TypeDef *)(obj->pwm); |
group-onsemi | 0:098463de4c5d | 199 | |
group-onsemi | 0:098463de4c5d | 200 | float dc = pwmout_read(obj); |
group-onsemi | 0:098463de4c5d | 201 | |
group-onsemi | 0:098463de4c5d | 202 | __HAL_TIM_DISABLE(&TimHandle); |
group-onsemi | 0:098463de4c5d | 203 | |
group-onsemi | 0:098463de4c5d | 204 | // Update the SystemCoreClock variable |
group-onsemi | 0:098463de4c5d | 205 | SystemCoreClockUpdate(); |
group-onsemi | 0:098463de4c5d | 206 | |
group-onsemi | 0:098463de4c5d | 207 | /* To make it simple, we use to possible prescaler values which lead to: |
group-onsemi | 0:098463de4c5d | 208 | * pwm unit = 1us, period/pulse can be from 1us to 65535us |
group-onsemi | 0:098463de4c5d | 209 | * or |
group-onsemi | 0:098463de4c5d | 210 | * pwm unit = 500us, period/pulse can be from 500us to ~32.76sec |
group-onsemi | 0:098463de4c5d | 211 | * Be careful that all the channels of a PWM shares the same prescaler |
group-onsemi | 0:098463de4c5d | 212 | */ |
group-onsemi | 0:098463de4c5d | 213 | if (us > 0xFFFF) { |
group-onsemi | 0:098463de4c5d | 214 | obj->prescaler = 500; |
group-onsemi | 0:098463de4c5d | 215 | } else { |
group-onsemi | 0:098463de4c5d | 216 | obj->prescaler = 1; |
group-onsemi | 0:098463de4c5d | 217 | } |
group-onsemi | 0:098463de4c5d | 218 | TimHandle.Init.Prescaler = ((SystemCoreClock / 1000000) * obj->prescaler) - 1; |
group-onsemi | 0:098463de4c5d | 219 | |
group-onsemi | 0:098463de4c5d | 220 | if (TimHandle.Init.Prescaler > 0xFFFF) |
group-onsemi | 0:098463de4c5d | 221 | error("PWM: out of range prescaler"); |
group-onsemi | 0:098463de4c5d | 222 | |
group-onsemi | 0:098463de4c5d | 223 | TimHandle.Init.Period = (us - 1) / obj->prescaler; |
group-onsemi | 0:098463de4c5d | 224 | if (TimHandle.Init.Period > 0xFFFF) |
group-onsemi | 0:098463de4c5d | 225 | error("PWM: out of range period"); |
group-onsemi | 0:098463de4c5d | 226 | |
group-onsemi | 0:098463de4c5d | 227 | TimHandle.Init.ClockDivision = 0; |
group-onsemi | 0:098463de4c5d | 228 | TimHandle.Init.CounterMode = TIM_COUNTERMODE_UP; |
group-onsemi | 0:098463de4c5d | 229 | |
group-onsemi | 0:098463de4c5d | 230 | if (HAL_TIM_PWM_Init(&TimHandle) != HAL_OK) { |
group-onsemi | 0:098463de4c5d | 231 | error("Cannot initialize PWM"); |
group-onsemi | 0:098463de4c5d | 232 | } |
group-onsemi | 0:098463de4c5d | 233 | |
group-onsemi | 0:098463de4c5d | 234 | // Save for future use |
group-onsemi | 0:098463de4c5d | 235 | obj->period = us; |
group-onsemi | 0:098463de4c5d | 236 | |
group-onsemi | 0:098463de4c5d | 237 | // Set duty cycle again |
group-onsemi | 0:098463de4c5d | 238 | pwmout_write(obj, dc); |
group-onsemi | 0:098463de4c5d | 239 | |
group-onsemi | 0:098463de4c5d | 240 | __HAL_TIM_ENABLE(&TimHandle); |
group-onsemi | 0:098463de4c5d | 241 | } |
group-onsemi | 0:098463de4c5d | 242 | |
group-onsemi | 0:098463de4c5d | 243 | void pwmout_pulsewidth(pwmout_t* obj, float seconds) |
group-onsemi | 0:098463de4c5d | 244 | { |
group-onsemi | 0:098463de4c5d | 245 | pwmout_pulsewidth_us(obj, seconds * 1000000.0f); |
group-onsemi | 0:098463de4c5d | 246 | } |
group-onsemi | 0:098463de4c5d | 247 | |
group-onsemi | 0:098463de4c5d | 248 | void pwmout_pulsewidth_ms(pwmout_t* obj, int ms) |
group-onsemi | 0:098463de4c5d | 249 | { |
group-onsemi | 0:098463de4c5d | 250 | pwmout_pulsewidth_us(obj, ms * 1000); |
group-onsemi | 0:098463de4c5d | 251 | } |
group-onsemi | 0:098463de4c5d | 252 | |
group-onsemi | 0:098463de4c5d | 253 | void pwmout_pulsewidth_us(pwmout_t* obj, int us) |
group-onsemi | 0:098463de4c5d | 254 | { |
group-onsemi | 0:098463de4c5d | 255 | float value = (float)us / (float)obj->period; |
group-onsemi | 0:098463de4c5d | 256 | pwmout_write(obj, value); |
group-onsemi | 0:098463de4c5d | 257 | } |
group-onsemi | 0:098463de4c5d | 258 | |
group-onsemi | 0:098463de4c5d | 259 | #endif |