Common implementations and headers for AVR-8 family based micro-controllers.
More...
Common implementations and headers for AVR-8 family based micro-controllers.
Basic definitions for the AVR-8 common module
When ever you want to do something hardware related, that is accessing MCUs registers directly, just include this file. It will then make sure that the MCU specific headers are included.
- Author
- Stefan Pfeiffer stefa.nosp@m.n.pf.nosp@m.eiffe.nosp@m.r@fu.nosp@m.-berl.nosp@m.in.d.nosp@m.e
-
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
-
Hinnerk van Bruinehsen h.v.b.nosp@m.ruin.nosp@m.ehsen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
-
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e
-
Josua Arndt jarnd.nosp@m.t@ia.nosp@m.s.rwt.nosp@m.h-aa.nosp@m.chen..nosp@m.de
-
Gerson Fernando Budke nando.nosp@m.jve@.nosp@m.gmail.nosp@m..com
Definition in file cpu.h.
#include <stdio.h>
#include <stdint.h>
#include <avr/interrupt.h>
#include "architecture.h"
#include "cpu_conf.h"
#include "cpu_clock.h"
#include "sched.h"
#include "thread.h"
#include "states_internal.h"
Go to the source code of this file.
◆ AVR8_PM_DISABLE_BOD_ON_SLEEP
#define AVR8_PM_DISABLE_BOD_ON_SLEEP 0 |
BOD is active on sleep.
Definition at line 56 of file cpu.h.
◆ AVR8_STATE_FLAG_UART_TX
#define AVR8_STATE_FLAG_UART_TX |
( |
|
uart | ) |
(0x01U << uart) |
Compute UART TX channel.
- Parameters
-
Definition at line 87 of file cpu.h.
◆ PERIPH_I2C_NEED_READ_REG
#define PERIPH_I2C_NEED_READ_REG |
Definition at line 64 of file cpu.h.
◆ PERIPH_I2C_NEED_READ_REGS
#define PERIPH_I2C_NEED_READ_REGS |
Definition at line 66 of file cpu.h.
◆ PERIPH_I2C_NEED_WRITE_REG
#define PERIPH_I2C_NEED_WRITE_REG |
Definition at line 65 of file cpu.h.
◆ PERIPH_I2C_NEED_WRITE_REGS
#define PERIPH_I2C_NEED_WRITE_REGS |
Definition at line 67 of file cpu.h.
◆ avr8_enter_isr()
static void avr8_enter_isr |
( |
void |
| ) |
|
|
inlinestatic |
Run this code on entering interrupt routines.
Definition at line 73 of file cpu.h.
◆ avr8_is_uart_tx_pending()
static int avr8_is_uart_tx_pending |
( |
void |
| ) |
|
|
inlinestatic |
Check if TX on any present UART device is still pending.
- Return values
-
!=0 | At least on UART device is still sending data out |
0 | No UART is currently sending data |
Definition at line 115 of file cpu.h.
◆ avr8_uart_tx_clear_pending()
static void avr8_uart_tx_clear_pending |
( |
unsigned |
uart | ) |
|
|
inlinestatic |
Clear UART TX channel pending state.
- Parameters
-
Definition at line 104 of file cpu.h.
◆ avr8_uart_tx_set_pending()
static void avr8_uart_tx_set_pending |
( |
unsigned |
uart | ) |
|
|
inlinestatic |
Set UART TX channel as pending.
- Parameters
-
Definition at line 94 of file cpu.h.
◆ cpu_get_caller_pc()
Get the last instruction's address.
This works only if called in a function as first statement, as it relies on the return address to be the topmost item on the stack.
Definition at line 136 of file cpu.h.