mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
1d0f90dcdf
- Fixed documentation - Use bitwise operation instead of multiplication and addition in `GPIO_PIN()` - Allow GPIOs to be configured as input via `gpio_init()` - Fixed bugs in `gpio_init_mux`: - `0x01 << ((pin & 31) * 2)` was used before to generate the bitmask, but this would shift by 62 to the left. Correct is `0x01 << ((pin & 15) * 2)` (See [datasheet](https://www.nxp.com/docs/en/user-guide/UM10211.pdf) at pages 156ff) - Only one of the two bits was cleared previously - Changed strategy to access GPIO pins: - Previous strategy: - Set all bits in FIOMASK except the one for the pin to control to disable access to them - Set/clear/read all pins in the target GPIO port (but access to all but the target pin is ignored because of the applied FIOMASK) - New strategy: - Set/clear/read only the target pin - Advantages: - Only one access to a GPIO register instead of two - Proven approach: Access to GPIOs on lpc2387 is mostly done by accessing the GPIO registers directy (e.g. see the sht11 driver). Those accesses never touch the FIOMASK register - No unwanted side effects: Disabling all but one pin in a GPIO port without undoing that seems not to be a good idea |
||
---|---|---|
.. | ||
vendor | ||
cpu_conf.h | ||
cpu.h | ||
lpc2387.h | ||
periph_cpu.h |