Skip to content

drivers/periph: updated DAC driver interface#4431

Merged
DipSwitch merged 8 commits intoRIOT-OS:masterfrom
haukepetersen:opt_periph_dac
Mar 15, 2016
Merged

drivers/periph: updated DAC driver interface#4431
DipSwitch merged 8 commits intoRIOT-OS:masterfrom
haukepetersen:opt_periph_dac

Conversation

@haukepetersen
Copy link
Copy Markdown
Contributor

Analog to #4430, here is also an adaption/simplification of the DAC driver interface.

It is rebased on #4430 - so currently both API updates are included in this PR...

@haukepetersen haukepetersen added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Platform: ARM Platform: This PR/issue effects ARM-based platforms Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. labels Dec 8, 2015
@haukepetersen haukepetersen added this to the Release 2016.03 milestone Dec 8, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep this one :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope! This is one of the ideas of the re-doing of periph interfaces to get rid of this anti-pattern. At least at some point the approach of #3420 will remove the need of these guards once and for all


uint16_t dac_util_map(int value, int min, int max)
{
return (uint16_t)((value - min) * 0xffff) / (max - min);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change 0xffff -> UINT16_MAX

@jnohlgard jnohlgard added State: waiting for other PR State: The PR requires another PR to be merged first CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable labels Mar 11, 2016
@jnohlgard
Copy link
Copy Markdown
Member

ACK for the change, let's wait for #4430 and then rebase.

See my minor comments above though

@DipSwitch DipSwitch mentioned this pull request Mar 11, 2016
@jnohlgard
Copy link
Copy Markdown
Member

Please rebase

@haukepetersen haukepetersen removed CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable State: waiting for other PR State: The PR requires another PR to be merged first labels Mar 14, 2016
@haukepetersen
Copy link
Copy Markdown
Contributor Author

addressed comments, rebased and sqashed.

@haukepetersen haukepetersen added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 14, 2016
@DipSwitch
Copy link
Copy Markdown
Member

Double ACK, not that it's needed and go!

DipSwitch added a commit that referenced this pull request Mar 15, 2016
drivers/periph: updated DAC driver interface
@DipSwitch DipSwitch merged commit c446091 into RIOT-OS:master Mar 15, 2016
DipSwitch added a commit to DipSwitch/RIOT that referenced this pull request Mar 15, 2016
@haukepetersen haukepetersen deleted the opt_periph_dac branch March 15, 2016 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Platform: ARM Platform: This PR/issue effects ARM-based platforms Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants