AVR-LibC  2.3.0git
Standard C library for AVR-GCC
 

AVR-LibC Documen­tation

AVR-LibC Development Pages

Main Page

User Manual

Library Refe­rence

FAQ

Example Projects

File List

Index

Loading...
Searching...
No Matches
builtins.h
Go to the documentation of this file.
1/* Copyright (c) 2008 Anatoly Sokolov
2 Copyright (c) 2010 Joerg Wunsch
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10
11 * Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in
13 the documentation and/or other materials provided with the
14 distribution.
15
16 * Neither the name of the copyright holders nor the names of
17 contributors may be used to endorse or promote products derived
18 from this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE. */
31
32/* include/avr/builtins.h. Generated from builtins.h.in by configure. */
33
34/*
35 avr/builtins.h - Intrinsic functions built into the compiler
36 */
37
38#ifndef _AVR_BUILTINS_H_
39#define _AVR_BUILTINS_H_
40
41#ifndef __DOXYGEN__
42#ifndef __HAS_DELAY_CYCLES
43#define __HAS_DELAY_CYCLES 1
44#endif
45#endif /* __DOXYGEN__ */
46
47/* For GCC built-ins, we should not define prototypes,
48 hence only document that stuff. */
49#ifdef __DOXYGEN__
50
51/** \file */
52/** \defgroup avr_builtins <avr/builtins.h>: avr-gcc builtins documentation
53 \code #include <avr/builtins.h> \endcode
54
55 \note This file only documents some avr-gcc builtins.
56 For functions built-in in the compiler, there should be no
57 prototype declarations.
58
59 See also the
60 <a href="https://gcc.gnu.org/onlinedocs/gcc/AVR-Built-in-Functions.html"
61 >GCC documentation</a> for a full list of avr-gcc builtins.
62*/
63
64/**
65 \ingroup avr_builtins
66
67 Enables interrupts by setting the global interrupt mask. */
68extern void __builtin_avr_sei(void);
69
70/**
71 \ingroup avr_builtins
72
73 Disables all interrupts by clearing the global interrupt mask. */
74extern void __builtin_avr_cli(void);
75
76/**
77 \ingroup avr_builtins
78
79 Emits a \c SLEEP instruction. */
80
81extern void __builtin_avr_sleep(void);
82
83/**
84 \ingroup avr_builtins
85
86 Emits a WDR (watchdog reset) instruction. */
87extern void __builtin_avr_wdr(void);
88
89/**
90 \ingroup avr_builtins
91
92 Emits a SWAP (nibble swap) instruction on __b. */
94
95/**
96 \ingroup avr_builtins
97
98 Emits an FMUL (fractional multiply unsigned) instruction. */
100
101/**
102 \ingroup avr_builtins
103
104 Emits an FMUL (fractional multiply signed) instruction. */
106
107/**
108 \ingroup avr_builtins
109
110 Emits an FMUL (fractional multiply signed with unsigned) instruction. */
112
113#if __HAS_DELAY_CYCLES
114/**
115 \ingroup avr_builtins
116
117 Emits a sequence of instructions causing the CPU to spend
118 \c __n cycles on it. */
119extern void __builtin_avr_delay_cycles(uint32_t __n);
120#endif
121#endif /* DOXYGEN */
122#endif /* _AVR_BUILTINS_H_ */
int16_t __builtin_avr_fmulsu(int8_t __a, uint8_t __b)
int16_t __builtin_avr_fmuls(int8_t __a, int8_t __b)
void __builtin_avr_cli(void)
uint8_t __builtin_avr_swap(uint8_t __b)
void __builtin_avr_wdr(void)
uint16_t __builtin_avr_fmul(uint8_t __a, uint8_t __b)
void __builtin_avr_sei(void)
void __builtin_avr_sleep(void)
unsigned int uint16_t
Definition: stdint.h:91
unsigned long int uint32_t
Definition: stdint.h:101
signed int int16_t
Definition: stdint.h:86
unsigned char uint8_t
Definition: stdint.h:81
signed char int8_t
Definition: stdint.h:76