-
Notifications
You must be signed in to change notification settings - Fork 3k
Manage multiple instances of analog out #4529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@LMESTM It looks like this does not compile correctly with GCC. Travis has this error:
|
targets/TARGET_STM/analogout_api.c
Outdated
return (float)value * (1.0f / (float)DAC_RANGE); | ||
} | ||
|
||
uint16_t analogout_read_u16(dac_t *obj) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please fix the formatting in this file ?
void function()
{
//body
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
MBED_HOSTTEST_DESCRIPTION(Basic); | ||
MBED_HOSTTEST_START("MBED_A1"); | ||
MBED_HOSTTEST_RESULT(true); | ||
PwmOut pwm1(D4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this test program that you have been using for testing (because this is not basic anymore) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - indeed a mistake of mine !
@theotherjimmy sorry about the failure - corrected now |
/morph test |
Result: ABORTEDYour command has finished executing! Here's what you wrote!
|
CI will be restarted once the CI for the patch release finishes |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
Build failed for DISCO_L475VG_IOT01A
|
@studavekar Thanks. This board has been merged in the mean time - I will update the PR |
@studavekar ok rebased and compilation issue fixed |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
This allows a proper handling of multiple instances. Also this commit stores the channel in the HAL format so that it can be re-used more easily and call to HAL are straightforward.
ADC1 channel2 and ADC2 of few targets only have an output switch and no buffer. This switch needs to be enabled, and also the buffer can be enabled in order to reduce the output impedance on output, and to drive external loads directly without having to add an external operational amplifier.
Moving some code in common to be able to manage several ADC instances, or several channels of an instance. The change involves: - moving dac_s structure definition to common_object.h - create TARGET_STM/analogout_api.c and move fully common analog_out functions in there - rename analogout_api.c of each target family into analogout_device.c to keep platform specific code - update analogout_device.c to rely on obj->handle and obj->channel - align analogout_init function as much as possible between families in analogout_device.c files
Fixing conflict as STM32L475xG target has been merged after the first version of moving dac_s structure definition to common_ojects.h.
Fixing conflict as STM32F413xH target has been merged after the first version of moving dac_s structure definition to common_ojects.h
@studavekar @theotherjimmy there was yet another build error to fix - so rebased and new fix added. |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
retest uvisor |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
@0xc0170 @theotherjimmy what is wrong with /morph test - is there something I need to fix ? |
If there is anything , we would let you know. |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Merging time. |
Description
This PR addresses the problem reported in #1083.
It also generalizes the fix to more targets by putting some code in common
Should solve as well:
#3970
Status
READY
Todos
Non regresssion tests done:
Analog CI tests shield tests OK