| OLD | NEW |
| 1 // Copyright (c) 2016, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library stm32f746g.gpio; | 5 library stm32f746g.gpio; |
| 6 | 6 |
| 7 import 'dart:fletch.ffi'; | 7 import 'dart:fletch.ffi'; |
| 8 | 8 |
| 9 import 'package:stm32f746g_disco/src/stm32f7_constants.dart'; | 9 import 'package:stm32f746g_disco/src/stm32f7_constants.dart'; |
| 10 import 'package:stm32f746g_disco/src/stm32f7_peripherals.dart'; | 10 import 'package:stm32f746g_disco/src/stm32f7_peripherals.dart'; |
| 11 | 11 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 temp |= (((mode & GPIO_OUTPUT_TYPE) >> 4) << p.pin); | 247 temp |= (((mode & GPIO_OUTPUT_TYPE) >> 4) << p.pin); |
| 248 peripherals.setUint32(base + OTYPER, temp); | 248 peripherals.setUint32(base + OTYPER, temp); |
| 249 | 249 |
| 250 // Activate the pull-up/pull-down resistor (GPIOx->PUPDR). | 250 // Activate the pull-up/pull-down resistor (GPIOx->PUPDR). |
| 251 temp = peripherals.getUint32(base + PUPDR); | 251 temp = peripherals.getUint32(base + PUPDR); |
| 252 temp &= ~(GPIO_PUPDR_PUPDR0 << (p.pin * 2)); | 252 temp &= ~(GPIO_PUPDR_PUPDR0 << (p.pin * 2)); |
| 253 temp |= (pull << (p.pin * 2)); | 253 temp |= (pull << (p.pin * 2)); |
| 254 peripherals.setUint32(base + PUPDR, temp); | 254 peripherals.setUint32(base + PUPDR, temp); |
| 255 } | 255 } |
| 256 } | 256 } |
| OLD | NEW |