CPU specific definitions for internal peripheral handling. More...
CPU specific definitions for internal peripheral handling.
Definition in file periph_cpu.h.
Go to the source code of this file.
Macros | |
#define | GPIO_PIN(x, y) ((x << 4) | y) |
Define a CPU specific GPIO pin generator macro. | |
#define | CPU_ATMEGA_EXT_INTS |
Available external interrupt pins on the ATmega1284p family. | |
Enumerations | |
enum | { PORT_A = 0 , PORT_B = 1 , PORT_C = 2 , PORT_D = 3 } |
Available ports on the ATmega1284p family. More... | |
Functions | |
static uint8_t | atmega_pin2exti (uint8_t port_num, uint8_t pin_num) |
Get the interrupt vector number of the given GPIO pin. | |
static bool | atmega_has_pin_exti (uint8_t port_num, uint8_t pin_num) |
Check if the given pin can be used as external interrupt. | |
Power management configuration | |
#define | PM_NUM_MODES (5) |
#define | AVR8_PM_SLEEP_MODE_0 SLEEP_MODE_PWR_DOWN |
Power Down. | |
#define | AVR8_PM_SLEEP_MODE_1 SLEEP_MODE_PWR_SAVE |
Power Save. | |
#define | AVR8_PM_SLEEP_MODE_2 SLEEP_MODE_STANDBY |
Standby. | |
#define | AVR8_PM_SLEEP_MODE_3 SLEEP_MODE_ADC |
Sleep ADC low noise. | |
Defines for the I2C interface | |
#define | I2C_PORT_REG PORTC |
#define | I2C_PIN_MASK (1 << PORTC0) | (1 << PORTC1) |
EEPROM configuration | |
#define | EEPROM_SIZE (4096U) /* 4kB */ |
#define AVR8_PM_SLEEP_MODE_0 SLEEP_MODE_PWR_DOWN |
Power Down.
Definition at line 37 of file periph_cpu.h.
#define AVR8_PM_SLEEP_MODE_1 SLEEP_MODE_PWR_SAVE |
Power Save.
Definition at line 38 of file periph_cpu.h.
#define AVR8_PM_SLEEP_MODE_2 SLEEP_MODE_STANDBY |
Standby.
Definition at line 39 of file periph_cpu.h.
#define AVR8_PM_SLEEP_MODE_3 SLEEP_MODE_ADC |
Sleep ADC low noise.
Definition at line 40 of file periph_cpu.h.
#define CPU_ATMEGA_EXT_INTS |
Available external interrupt pins on the ATmega1284p family.
In order of their interrupt number
Definition at line 63 of file periph_cpu.h.
#define EEPROM_SIZE (4096U) /* 4kB */ |
Definition at line 106 of file periph_cpu.h.
#define GPIO_PIN | ( | x, | |
y | |||
) | ((x << 4) | y) |
Define a CPU specific GPIO pin generator macro.
Definition at line 46 of file periph_cpu.h.
#define I2C_PIN_MASK (1 << PORTC0) | (1 << PORTC1) |
Definition at line 99 of file periph_cpu.h.
#define I2C_PORT_REG PORTC |
Definition at line 98 of file periph_cpu.h.
#define PM_NUM_MODES (5) |
Definition at line 36 of file periph_cpu.h.
anonymous enum |
Available ports on the ATmega1284p family.
Enumerator | |
---|---|
PORT_A | port A |
PORT_B | port B |
PORT_C | port C |
PORT_D | port D |
Definition at line 51 of file periph_cpu.h.
|
inlinestatic |
Check if the given pin can be used as external interrupt.
Definition at line 82 of file periph_cpu.h.
|
inlinestatic |
Get the interrupt vector number of the given GPIO pin.
Definition at line 70 of file periph_cpu.h.