38#include <avr/interrupt.h>
55#ifndef AVR8_PM_DISABLE_BOD_ON_SLEEP
56#define AVR8_PM_DISABLE_BOD_ON_SLEEP 0
63#define CPU_CYCLES_PER_LOOP (7)
69#define PERIPH_I2C_NEED_READ_REG
70#define PERIPH_I2C_NEED_WRITE_REG
71#define PERIPH_I2C_NEED_READ_REGS
72#define PERIPH_I2C_NEED_WRITE_REGS
92#define AVR8_STATE_FLAG_UART_TX(uart) (0x01U << uart)
145 "ldi %D[dest], 0" "\n\t"
147 "pop %C[dest] " "\n\t"
149 "ldi %C[dest], 0" "\n\t"
151 "pop %B[dest]" "\n\t"
152 "pop %A[dest]" "\n\t"
153 "push %A[dest]" "\n\t"
154 "push %B[dest]" "\n\t"
156 "push %C[dest] " "\n\t"
166 addr = (addr - 1 ) * 2;
Platform-independent access to architecture details.
void avr8_reset_cause(void)
Print reset cause.
static void avr8_uart_tx_clear_pending(unsigned uart)
Clear UART TX channel pending state.
static void avr8_enter_isr(void)
Run this code on entering interrupt routines.
void avr8_clk_init(void)
Initialization of the CPU clock.
static uinttxtptr_t cpu_get_caller_pc(void)
Get the last instruction's address.
static void avr8_uart_tx_set_pending(unsigned uart)
Set UART TX channel as pending.
#define AVR8_STATE_FLAG_UART_TX(uart)
Compute UART TX channel.
void avr8_exit_isr(void)
Run this code on exiting interrupt routines.
static int avr8_is_uart_tx_pending(void)
Check if TX on any present UART device is still pending.
void avr8_stdio_init(void)
Initializes avrlibc stdio.
uintptr_t uinttxtptr_t
Pointer type to point anywhere in the .text section.
Scheduler API definition.
States internal interface.
#define avr8_state_irq_count
Definition for GPIOR1.
#define avr8_state_uart
Definition for GPIOR0.
stdio wrapper to extend the C libs stdio