mirror of
https://github.com/avem-labs/Avem.git
synced 2023-09-01 15:18:49 +08:00
9 lines
238 B
C
9 lines
238 B
C
#pragma once
|
|
#ifndef BIT_H
|
|
#define BIT_H
|
|
|
|
#define BITBAND(addr, bitnum) ((addr & 0xF0000000) + 0x2000000 + ((addr & 0xFFFFF) << 5) + (bitnum<<2))
|
|
#define BIT_ADDR(addr, bitnum) *((volatile unsigned long *)(BITBAND(addr, bitnum)))
|
|
|
|
#endif
|