The AVR PAL driver uses the PORT peripherals.
Supported HW resources
AVR PAL driver implementation features
The AVR PAL driver implementation fully supports the following hardware capabilities:
- 8 bits wide ports.
- Atomic set/reset functions.
- Output latched regardless of the pad setting.
- Direct read of input pads regardless of the pad setting.
Supported PAL setup modes
The AVR PAL driver supports the following I/O modes:
Any attempt to setup an invalid mode is ignored.
The AVR PORT is less than optimal in several areas, the limitations should be taken in account while using the PAL driver:
- Pad/port toggling operations are not atomic.
- Pad/group mode setup is not atomic.
- Group set+reset function is not atomic.
- Writing on pads/groups/ports programmed as input with pull-up resistor changes the resistor setting because the output latch is used for resistor selection.
- The PORT registers layout on some devices is not regular (it does not have contiguous PIN, DDR, PORT registers in this order), such ports cannot be accessed using the PAL driver. For example, PORT F on ATmega128. Verify the user manual of your device.