Skip to content

cpu/stm32: removed file guards from periph drivers#7983

Merged
aabadie merged 3 commits intoRIOT-OS:masterfrom
haukepetersen:opt_stm32_periphfileguards
Nov 9, 2017
Merged

cpu/stm32: removed file guards from periph drivers#7983
aabadie merged 3 commits intoRIOT-OS:masterfrom
haukepetersen:opt_stm32_periphfileguards

Conversation

@haukepetersen
Copy link
Copy Markdown
Contributor

@haukepetersen haukepetersen commented Nov 9, 2017

addresses #7981
same as #7982

@haukepetersen haukepetersen added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 9, 2017
Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Tested with iotlab-m3 and nucleo-f103 and had build issues. See comments below.

#include "assert.h"
#include "periph/dac.h"

/* only compile this, if the CPU has a DAC */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The stm32f1 should be guarded.

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.

no, why? The stm does not have this features, so it should not be build for this cpu in the first place..

#include "periph/pwm.h"
#include "periph/gpio.h"

#ifdef PWM_NUMOF
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The stm32f1 should be guarded

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.

same here.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Murdock does not seem to have trouble building for the iotlab-m3 nor the nucleo-f103. Could it be that this is a local problem on your machine?

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Nov 9, 2017

Murdock does not seem to have trouble building for the iotlab-m3 nor the nucleo-f103. Could it be that this is a local problem on your machine?

Ah yes, sorry, I totally misunderstood that. It's fine.

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Nov 9, 2017

Just need rebase now that #7864 is merged

@haukepetersen haukepetersen force-pushed the opt_stm32_periphfileguards branch from 19ad164 to 8bf0d18 Compare November 9, 2017 15:27
@haukepetersen
Copy link
Copy Markdown
Contributor Author

rebased and fixed two cppcheck issues with i2c drivers that murdock pointed out (unrelated to the actual PR, but needed to make Murdock happy :-)).

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Nov 9, 2017

Before merging, I'd like to give a try of the I2C drivers modified.

Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Still works, ACK and go

@aabadie aabadie merged commit 3e04051 into RIOT-OS:master Nov 9, 2017
@haukepetersen haukepetersen deleted the opt_stm32_periphfileguards branch November 10, 2017 09:07
@aabadie aabadie added this to the Release 2018.01 milestone Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants