-
Notifications
You must be signed in to change notification settings - Fork 514
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
Added extra spare pin to P1 (P1S6) with GPIO and PWM support. #1120
Conversation
…ed) which can be used to disable the WiFI powersave clock. The feature setting persisted. Acceptance test application in `user/test/app/testmodepin`
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.
All looks good with a quick read over.
@@ -314,6 +319,11 @@ void HAL_Core_Config(void) | |||
#if PLATFORM_ID==8 // Additional pins for P1 | |||
for (pin_t pin=24; pin<=29; pin++) | |||
HAL_Pin_Mode(pin, INPUT); | |||
const uint8_t* data = (const uint8_t*)dct_read_app_data(DCT_RADIO_FLAGS_OFFSET); | |||
uint8_t current = (*data); | |||
if ((current&3) == 0x2) { |
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.
I know this is my (shoddy!) code, and felt the same way when I wrote it....it's probably best to pull these magic numbers into a function like
bool isWiFiPowersaveClockDisabled() {
const uint8_t* data = (const uint8_t*)dct_read_app_data(DCT_RADIO_FLAGS_OFFSET);
uint8_t current = (*data);
return ((current&3) == 0x2);
}
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.
See commit b3f8160 for resurrection of a fairy ;-)
@@ -29,15 +29,26 @@ | |||
|
|||
uint8_t pwm_pins[] = { | |||
|
|||
#if defined(STM32F2XX) | |||
#if (PLATFORM_ID == 0) // Core |
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.
lovely! I'm surprised we didn't hit the need to specify the PWM pins per platform before :-)
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.
Yeah I don't know why, but we were not testing all PWM pins on all platforms before this change. I was pleased to see it pass first time on all platforms though! :)
Added extra spare pin to P1 (P1S6) with GPIO and PWM support. Implements #1059
Doneness:
Docs: particle-iot/docs@c63c4f0
P1 Datasheet: particle-iot/docs@0231de8 and particle-iot/docs@486e02b
FEATURES