avr-libc: <avr/version.h>: avr-libc version macros

avr-libc 2.1.0 Standard C library for AVR-GCC |

## AVR Libc Home Page |  | ## AVR Libc Development Pages
## Main Page | ## User Manual | ## Library Reference | ## FAQ | ## Example Projects

Loading...
Searching...
No Matches
Macros
<avr/version.h>: avr-libc version macros

## Macros
#define | __AVR_LIBC_VERSION_STRING__ "2.1.0"
#define | __AVR_LIBC_VERSION__ 20100UL
#define | __AVR_LIBC_DATE_STRING__ "20220128"
#define | __AVR_LIBC_DATE_ 20220128UL
#define | __AVR_LIBC_MAJOR__ 2
#define | __AVR_LIBC_MINOR__ 1
#define | __AVR_LIBC_REVISION__ 0

## Detailed Description

#include <avr/version.h>

This header file defines macros that contain version numbers and strings describing the current version of avr-libc.

The version number itself basically consists of three pieces that are separated by a dot: the major number, the minor number, and the revision number. For development versions (which use an odd minor number), the string representation additionally gets the date code (YYYYMMDD) appended.

This file will also be included by `<avr/io.h>`. That way, portable tests can be implemented using `<avr/io.h>` that can be used in code that wants to remain backwards-compatible to library versions prior to the date when the library version API had been added, as referenced but undefined C preprocessor macros automatically evaluate to 0.

## Macro Definition Documentation

## ◆ __AVR_LIBC_DATE_

#define __AVR_LIBC_DATE_ 20220128UL

Numerical representation of the release date.

## ◆ __AVR_LIBC_DATE_STRING__

#define __AVR_LIBC_DATE_STRING__ "20220128"

String literal representation of the release date.

## ◆ __AVR_LIBC_MAJOR__

#define __AVR_LIBC_MAJOR__ 2

Library major version number.

## ◆ __AVR_LIBC_MINOR__

#define __AVR_LIBC_MINOR__ 1

Library minor version number.

## ◆ __AVR_LIBC_REVISION__

#define __AVR_LIBC_REVISION__ 0

Library revision number.

## ◆ __AVR_LIBC_VERSION__

#define __AVR_LIBC_VERSION__ 20100UL

Numerical representation of the current library version.

In the numerical representation, the major number is multiplied by 10000, the minor number by 100, and all three parts are then added. It is intented to provide a monotonically increasing numerical value that can easily be used in numerical checks.

## ◆ __AVR_LIBC_VERSION_STRING__

#define __AVR_LIBC_VERSION_STRING__ "2.1.0"

String literal representation of the current library version.