mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-21 04:11:48 +03:00
9829145d8c
* fbt: fixed include paths for generated version header * lib: STM32CubeWB: refactored & cleaned up WPAN include paths * hal: linter fixes for new headers * fbt: added version_json target * Added .pvsconfig; split common_defines.h into 2 files * Added PVS-Studio basic configuration files; updated .gitignore Co-authored-by: あく <alleteam@gmail.com>
22 lines
613 B
C
22 lines
613 B
C
#ifndef _STM32_H_
|
|
#define _STM32_H_
|
|
|
|
/* modify bitfield */
|
|
#define _BMD(reg, msk, val) (reg) = (((reg) & ~(msk)) | (val))
|
|
/* set bitfield */
|
|
#define _BST(reg, bits) (reg) = ((reg) | (bits))
|
|
/* clear bitfield */
|
|
#define _BCL(reg, bits) (reg) = ((reg) & ~(bits))
|
|
/* wait until bitfield set */
|
|
#define _WBS(reg, bits) while(((reg) & (bits)) == 0)
|
|
/* wait until bitfield clear */
|
|
#define _WBC(reg, bits) while(((reg) & (bits)) != 0)
|
|
/* wait for bitfield value */
|
|
#define _WVL(reg, msk, val) while(((reg) & (msk)) != (val))
|
|
/* bit value */
|
|
#define _BV(bit) (0x01 << (bit))
|
|
|
|
#include "stm32wbxx.h"
|
|
|
|
#endif // _STM32_H_
|