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_STATE_FLAG_UART_TX
#define AVR8_STATE_FLAG_UART_TX |
( |
|
uart | ) |
(0x01U << uart) |
Compute UART TX channel.
- Parameters
-
Definition at line 92 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 120 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 109 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 99 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 141 of file cpu.h.