Loading...
Searching...
No Matches
stm32.h
1#ifndef _STM32_H_
2#define _STM32_H_
3
4/* modify bitfield */
5#define _BMD(reg, msk, val) (reg) = (((reg) & ~(msk)) | (val))
6/* set bitfield */
7#define _BST(reg, bits) (reg) = ((reg) | (bits))
8/* clear bitfield */
9#define _BCL(reg, bits) (reg) = ((reg) & ~(bits))
10/* wait until bitfield set */
11#define _WBS(reg, bits) while(((reg) & (bits)) == 0)
12/* wait until bitfield clear */
13#define _WBC(reg, bits) while(((reg) & (bits)) != 0)
14/* wait for bitfield value */
15#define _WVL(reg, msk, val) while(((reg) & (msk)) != (val))
16/* bit value */
17#define _BV(bit) (0x01 << (bit))
18
19#include "stm32wbxx.h"
20
21#endif // _STM32_H_