Header with definitions for bit-banding for ARMv7-M.
More...
Go to the source code of this file.
|
enum | { bitbandSramBegin = 0x20000000
} |
|
enum | { bitbandSramEnd = 0x200fffff
} |
|
enum | { bitbandSramBase = 0x22000000
} |
|
enum | { bitbandPeripheralBegin = 0x40000000
} |
|
enum | { bitbandPeripheralEnd = 0x400fffff
} |
|
enum | { bitbandPeripheralBase = 0x42000000
} |
|
Header with definitions for bit-banding for ARMv7-M.
- Author
- Copyright (C) 2015-2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
- License
- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
◆ BITBAND
#define BITBAND |
( |
|
address, |
|
|
|
bit |
|
) |
| (*(volatile unsigned long*)BITBAND_ADDRESS(address, bit)) |
bit-band alias in any region
- Parameters
-
[in] | address | is the address in SRAM or peripheral region, [bitbandSramBegin; bitbandSramEnd] or [bitbandPeripheralBegin; bitbandPeripheralEnd] |
[in] | bit | is the bit number, [0; 31] |
- Returns
- reference to bit-band alias of provided address and bit
◆ BITBAND_ADDRESS
#define BITBAND_ADDRESS |
( |
|
address, |
|
|
|
bit |
|
) |
| |
Value:((((unsigned long)address) >= bitbandSramBegin) && (((unsigned long)address) <= bitbandSramEnd) ? \
BITBAND_SRAM_ADDRESS(address, bit) : \
(((unsigned long)address) >= bitbandPeripheralBegin) && (((unsigned long)address) <= bitbandPeripheralEnd) ? \
0 )
#define BITBAND_PERIPHERAL_ADDRESS(address, bit)
address of bit-band alias for peripheral region
Definition: ARMv7-M-bit-banding.h:65
address of bit-band alias for any region
- Parameters
-
[in] | address | is the address in SRAM or peripheral region, [bitbandSramBegin; bitbandSramEnd] or [bitbandPeripheralBegin; bitbandPeripheralEnd] |
[in] | bit | is the bit number, [0; 31] |
- Returns
- address of bit-band alias of provided address and bit
◆ BITBAND_PERIPHERAL
bit-band alias in peripheral region
- Parameters
-
[in] | address | is the address in peripheral region, [bitbandPeripheralBegin; bitbandPeripheralEnd] |
[in] | bit | is the bit number, [0; 31] |
- Returns
- reference to bit-band alias of provided address and bit
◆ BITBAND_PERIPHERAL_ADDRESS
#define BITBAND_PERIPHERAL_ADDRESS |
( |
|
address, |
|
|
|
bit |
|
) |
| (bitbandPeripheralBase + (((unsigned long)address) - bitbandPeripheralBegin) * 32 + (bit) * 4) |
address of bit-band alias for peripheral region
- Parameters
-
[in] | address | is the address in peripheral region, [bitbandPeripheralBegin; bitbandPeripheralEnd] |
[in] | bit | is the bit number, [0; 31] |
- Returns
- address of bit-band alias of provided address and bit
◆ BITBAND_SRAM
#define BITBAND_SRAM |
( |
|
address, |
|
|
|
bit |
|
) |
| (*(volatile unsigned long*)BITBAND_SRAM_ADDRESS(address, bit)) |
bit-band alias in SRAM region
- Parameters
-
[in] | address | is the address in SRAM region, [bitbandSramBegin; bitbandSramEnd] |
[in] | bit | is the bit number, [0; 31] |
- Returns
- reference to bit-band alias of provided address and bit
◆ BITBAND_SRAM_ADDRESS
#define BITBAND_SRAM_ADDRESS |
( |
|
address, |
|
|
|
bit |
|
) |
| (bitbandSramBase + (((unsigned long)address) - bitbandSramBegin) * 32 + (bit) * 4) |
address of bit-band alias for SRAM region
- Parameters
-
[in] | address | is the address in SRAM region, [bitbandSramBegin; bitbandSramEnd] |
[in] | bit | is the bit number, [0; 31] |
- Returns
- address of bit-band alias of provided address and bit
◆ DISTORTOS_BITBANDING_SUPPORTED
#define DISTORTOS_BITBANDING_SUPPORTED |
bit-banding is supported by selected architecture
◆ anonymous enum
beginning of SRAM region which is aliased in bit-band region
◆ anonymous enum
end of SRAM region which is aliased in bit-band region
◆ anonymous enum
start of bit-band alias region of SRAM
◆ anonymous enum
beginning of peripheral region which is aliased in bit-band region
◆ anonymous enum
end of peripheral region which is aliased in bit-band region
◆ anonymous enum
start of bit-band alias region of peripherals