Merge pull request #134 from esden/master

BMPM V2 target power control GPIO needs to be an open drain drive.
This commit is contained in:
Gareth McMullin 2016-06-07 10:12:02 +12:00
commit f4eda28a05
1 changed files with 6 additions and 2 deletions

View File

@ -135,10 +135,14 @@ void platform_init(void)
/* Enable internal pull-up on PWR_BR so that we don't drive
TPWR locally or inadvertently supply power to the target. */
if (platform_hwversion () > 0) {
gpio_set (PWR_BR_PORT, PWR_BR_PIN);
if (platform_hwversion () == 1) {
gpio_set(PWR_BR_PORT, PWR_BR_PIN);
gpio_set_mode(PWR_BR_PORT, GPIO_MODE_INPUT,
GPIO_CNF_INPUT_PULL_UPDOWN, PWR_BR_PIN);
} else if (platform_hwversion() > 1) {
gpio_set(PWR_BR_PORT, PWR_BR_PIN);
gpio_set_mode(PWR_BR_PORT, GPIO_MODE_OUTPUT_50_MHZ,
GPIO_CNF_OUTPUT_OPENDRAIN, PWR_BR_PIN);
}
if (platform_hwversion() > 0) {