Playing with Arduino
A page to record my playing with Arduino
_SFR_IO8()

Abstract

The _SFR_IO8() converts the I/O address to the memory address. It is a macro that returns a byte of data at an address of io_addr + __SFR_OFFSET.

Source Code

The _SFR_IO8() is defined in hardware/tools/avr/avr/include/avr/sfr_defs.h as below.

1
2
#define _SFR_IO8(io_addr) _MMIO_BYTE((io_addr) + __SFR_OFFSET)
#define __SFR_OFFSET 0x20

Adding __SFR_OFFSET to io_addr, then calls _MMIO_BYTE().

Version

Arduino 1.8.13/avr-gcc 7.3.0-atmel3.6.1-arduino

Last Update

June 19, 2020

inserted by FC2 system