34 #define CPUID_LEN           (4U) 
   50 #define GPIO_UNDEF          (0xff) 
   55 #define GPIO_PIN(x, y)          ((x << 4) | y) 
   62 #if (defined(OCF1A) && defined(OCF1B) && (OCF1A > OCF1B)) \ 
   63     || (defined(PUD) && (PUD != 4)) || (defined(INT0) && (INT0 == 6)) 
   66 #define GPIO_PORT_DESCENDENT 
   69 #ifdef GPIO_PORT_DESCENDENT 
   70 #ifdef      _AVR_ATTINY1634_H_INCLUDED 
   72 #define     ATMEGA_GPIO_BASE_A  0x2F 
   78 #define     ATMEGA_GPIO_BASE_A  0x39 
   81 #define     ATMEGA_GPIO_BASE_A  0x20 
   88 #define ATMEGA_GPIO_BASE_G      (ATMEGA_GPIO_BASE_A + ATMEGA_GPIO_SIZE * ('G' - 'A')) 
   94 #define ATMEGA_GPIO_BASE_H      (0x100) 
   98 #define ATMEGA_GPIO_SIZE        (0x03) 
  104 #define GPIO_EXT_INT_NUMOF      <CPU_SPECIFIC> 
  105 #elif defined(INT7_vect) 
  106 #define GPIO_EXT_INT_NUMOF      (8U) 
  107 #elif defined(INT6_vect) 
  108 #define GPIO_EXT_INT_NUMOF      (7U) 
  109 #elif defined(INT5_vect) 
  110 #define GPIO_EXT_INT_NUMOF      (6U) 
  111 #elif defined(INT4_vect) 
  112 #define GPIO_EXT_INT_NUMOF      (5U) 
  113 #elif defined(INT3_vect) 
  114 #define GPIO_EXT_INT_NUMOF      (4U) 
  115 #elif defined(INT2_vect) 
  116 #define GPIO_EXT_INT_NUMOF      (3U) 
  118 #define GPIO_EXT_INT_NUMOF      (2U) 
  158 #ifdef GPIO_PORT_DESCENDENT 
  167     if (port_num > 
'G'-
'A') {
 
  186 #define HAVE_GPIO_FLANK_T 
  197 #define HAVE_GPIO_SLEW_T 
  205 #define HAVE_GPIO_PULL_STRENGTH_T 
  213 #define HAVE_GPIO_DRIVE_STRENGTH_T 
  221 #define HAVE_GPIO_IRQ_TRIG_T 
  230 #define HAVE_GPIO_STATE_T 
  240 #define HAVE_GPIO_LL_PREPARE_WRITE_ALL_PINS 
  241 #define HAVE_GPIO_LL_PREPARE_WRITE 
  249 #define PERIPH_SPI_NEEDS_INIT_CS 
  250 #define PERIPH_SPI_NEEDS_TRANSFER_BYTE 
  251 #define PERIPH_SPI_NEEDS_TRANSFER_REG 
  252 #define PERIPH_SPI_NEEDS_TRANSFER_REGS 
  262 #define SPI_MODE_SEL(pol, pha)          ((pol << 3) | (pha << 2)) 
  271 #define HAVE_SPI_MODE_T 
  286 #define SPI_CLK_SEL(s2x, pr1, pr0)    ((s2x << 2) | (pr1 << 1) | pr0) 
  294 #define HAVE_SPI_CLK_T 
  329 #define PERIPH_TIMER_PROVIDES_SET 
  334 #define EEPROM_CLEAR_BYTE              (0xff) 
  340 #define NWDT_TIME_LOWER_LIMIT           (1) 
  341 #define NWDT_TIME_UPPER_LIMIT           (8192U) 
  347 #define WDT_HAS_STOP                    (1) 
  353 #if defined(SCCR0) && !defined(RTT_BACKEND_SC) 
  354 #define RTT_BACKEND_SC   (1) 
  359 #ifndef RTT_MAX_VALUE 
  360 #define RTT_MAX_VALUE    (0xFFFFFFFFUL)   
  363 #ifndef RTT_FREQUENCY 
  364 #define RTT_FREQUENCY    (62500UL)        
  369 #ifndef RTT_MAX_VALUE 
  370 #define RTT_MAX_VALUE    (0x00FFFFFF)     
  373 #ifndef RTT_FREQUENCY 
  374 #define RTT_FREQUENCY    (1024U)          
#define ATMEGA_GPIO_BASE_H
Base of the GPIO registers of the second memory region (port >= H)
 
#define ATMEGA_GPIO_BASE_A
Base of the GPIO registers as memory address.
 
@ TIMER_DIV1_8_32_64_128_256_1024
1/{1,8,32,64,128,256,1024}
 
@ TIMER_DIV1_8_64_128_1024
1/{1,8,64,128,1024}
 
#define ATMEGA_GPIO_BASE_G
Base of the GPIO port G register as memory address.
 
static atmega_gpio_port_t * atmega_gpio_port(uint8_t port_num)
Get the GPIO PORT registers of the given GPIO PORT.
 
gpio_irq_trig_t
Definition of possible IRQ triggers.
 
@ GPIO_TRIGGER_EDGE_FALLING
edge triggered IRQ on falling flanks only
 
@ GPIO_TRIGGER_LEVEL_HIGH
level triggered IRQ on high input
 
@ GPIO_TRIGGER_EDGE_RISING
edge triggered IRQ on rising flanks only
 
@ GPIO_TRIGGER_EDGE_BOTH
edge triggered IRQ on falling AND rising flanks
 
@ GPIO_TRIGGER_LEVEL_LOW
level triggered IRQ on low input
 
gpio_pull_strength_t
Enumeration of pull resistor values.
 
gpio_state_t
Enumeration of GPIO states (direction)
 
gpio_slew_t
Enumeration of slew rate settings.
 
gpio_drive_strength_t
Enumeration of drive strength options.
 
@ GPIO_PULL_WEAKEST
Use the weakest (highest Ohm value) resistor.
 
@ GPIO_PULL_WEAK
Use a weak pull resistor.
 
@ GPIO_PULL_STRONG
Use a strong pull resistor.
 
@ GPIO_PULL_STRONGEST
Use the strongest pull resistor.
 
@ GPIO_OUTPUT_OPEN_SOURCE
Use pin as output in open emitter configuration.
 
@ GPIO_USED_BY_PERIPHERAL
The GPIO pin is used by a peripheral.
 
@ GPIO_OUTPUT_OPEN_DRAIN
Use pin as output in open collector configuration.
 
@ GPIO_OUTPUT_PUSH_PULL
Use pin as output in push-pull configuration.
 
@ GPIO_DISCONNECT
Disconnect pin from all peripherals.
 
@ GPIO_INPUT
Use pin as input.
 
@ GPIO_SLEW_SLOWEST
let the output voltage level rise/fall as slow as possible
 
@ GPIO_SLEW_FAST
let the output voltage level rise/fall fast
 
@ GPIO_SLEW_SLOW
let the output voltage level rise/fall slowly
 
@ GPIO_SLEW_FASTEST
let the output voltage level rise/fall as fast as possible
 
@ GPIO_DRIVE_STRONG
Use a strong drive strength.
 
@ GPIO_DRIVE_WEAK
Use a weak drive strength.
 
@ GPIO_DRIVE_STRONGEST
Use the strongest drive strength.
 
@ GPIO_DRIVE_WEAKEST
Use the weakest drive strength.
 
unsigned int gpio_t
GPIO type identifier.
 
@ GPIO_FALLING
emit interrupt on falling flank
 
@ GPIO_RISING
emit interrupt on rising flank
 
@ GPIO_BOTH
not supported -> random value
 
@ SPI_MODE_0
CPOL=0, CPHA=0.
 
@ SPI_MODE_2
CPOL=1, CPHA=0.
 
@ SPI_MODE_1
CPOL=0, CPHA=1.
 
@ SPI_MODE_3
CPOL=1, CPHA=1.
 
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
 
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
 
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
 
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
 
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
 
spi_mode_t
Support SPI modes.
 
gpio_flank_t
Enumeration of supported GPIO flanks.
 
Structure describing the memory layout of the registers of a GPIO port on ATmega MCUs.
 
volatile uint8_t port
Read/write the state of GPIO pins using the Port Data Register.
 
volatile uint8_t pin
Toggle bits in the port register.
 
volatile uint8_t ddr
Configure pins as output (1) or input (0) using the Data Direction Register.
 
PWM device configuration.
 
timer_div_t div
Timer divider mask.
 
mini_timer_t * dev
Timer used.