Create release.yml
[betaflight.git] / src / main / pg / pin_pull_up_down.c
blob7cf7b8968c668fb430cc22bce71137e96675caca
1 /*
2 * This file is part of Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #include "platform.h"
23 #ifdef USE_PIN_PULL_UP_DOWN
25 #include "drivers/io.h"
26 #include "pg/pg_ids.h"
27 #include "pin_pull_up_down.h"
29 static void resetPullUpDownConfig(pinPullUpDownConfig_t* config)
31 for (uint8_t i = 0; i < PIN_PULL_UP_DOWN_COUNT; i++) {
32 config[i].ioTag = IO_TAG(NONE);
36 PG_REGISTER_ARRAY_WITH_RESET_FN(pinPullUpDownConfig_t, PIN_PULL_UP_DOWN_COUNT, pinPullupConfig, PG_PULLUP_CONFIG, 0);
38 void pgResetFn_pinPullupConfig(pinPullUpDownConfig_t *config)
40 resetPullUpDownConfig(config);
43 PG_REGISTER_ARRAY_WITH_RESET_FN(pinPullUpDownConfig_t, PIN_PULL_UP_DOWN_COUNT, pinPulldownConfig, PG_PULLDOWN_CONFIG, 0);
45 void pgResetFn_pinPulldownConfig(pinPullUpDownConfig_t *config)
47 resetPullUpDownConfig(config);
49 #endif