Macros and inline functions for accessing GPIOs of the ATmega family. More...
Macros and inline functions for accessing GPIOs of the ATmega family.
Definition in file atmega_gpio.h.
#include <stdio.h>
#include <avr/interrupt.h>
#include "cpu.h"
#include "board.h"
#include "periph/gpio.h"
#include "periph_conf.h"
#include "periph_cpu.h"
Go to the source code of this file.
#define | ATMEGA_GPIO_BASE_PORT_A (0x20) |
#define | ATMEGA_GPIO_OFFSET_PORT_H (0xCB) |
#define | ATMEGA_GPIO_OFFSET_PIN_PORT (0x02) |
#define | ATMEGA_GPIO_OFFSET_PIN_PIN (0x03) |
static uint8_t | atmega_pin_num (gpio_t pin) |
Extract the pin number of the given pin. | |
static uint8_t | atmega_port_num (gpio_t pin) |
Extract the port number of the given pin. | |
static uint16_t | atmega_port_addr (gpio_t pin) |
Generate the PORTx address of the give pin. | |
static uint16_t | atmega_ddr_addr (gpio_t pin) |
Generate the DDRx address of the given pin. | |
static uint16_t | atmega_pin_addr (gpio_t pin) |
Generate the PINx address of the given pin. | |