You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 28, 2024. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
if (HAL_HRTIM_WaveformCompareConfig(&HrtimHandle, HRTIM_TIMERINDEX_TIMER_E, HRTIM_COMPAREUNIT_2, &sConfig_compare) != HAL_OK)
{
return false;
}
return true;
}
bool stop() {
if (HAL_HRTIM_SimplePWMStop(&HrtimHandle, HRTIM_TIMERINDEX_TIMER_E, HRTIM_OUTPUT_TE2) != HAL_OK)
{
return false;
}
return true;
}
private:
HRTIM_HandleTypeDef HrtimHandle;
HRTIM_TimeBaseCfgTypeDef sConfig_time_base;
HRTIM_TimerCfgTypeDef sConfig_timerE;
HRTIM_OutputCfgTypeDef sConfig_output_config;
HRTIM_CompareCfgTypeDef sConfig_compare;
};
extern AnalogOutPWMClass analopwm;
class AnalogOutClass {
public:
void write(int index, float voltage) {
Expand All
@@ -341,7 +208,7 @@ class AnalogOutClass {
out_1.write(voltage / 10.5);
break;
case 2:
out_2.write((voltage*9.5));
out_2.write(voltage / 10.5);
break;
case 3:
out_3.write(voltage / 10.5);
Expand All
@@ -357,7 +224,7 @@ class AnalogOutClass {
out_1.period_ms(period);
break;
case 2:
out_2.period_ms((period/4)*100);
out_2.period_ms(period);
break;
case 3:
out_3.period_ms(period);
Expand All
@@ -370,16 +237,16 @@ class AnalogOutClass {
return out_0;
case 1:
return out_1;
//case 2:
//return out_2;
case 2:
return out_2;
case 3:
return out_3;
}
}
private:
mbed::PwmOut out_0 = mbed::PwmOut(PJ_11);
mbed::PwmOut out_1 = mbed::PwmOut(PK_1);
AnalogOutPWMClass out_2 =AnalogOutPWMClass();
mbed::PwmOut out_2 =mbed::PwmOut(PG_7);
mbed::PwmOut out_3 = mbed::PwmOut(PC_7);
};
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.