STM32 Blue Pill Drivers
Drivers that could be used to interface and interact with STM32F103C8T6 Microcontroller
|
This module contains the bit math manipulation macro-functions. More...
Macros | |
#define | SET_BIT(REG, BITNUM) (REG) |= (1 << (BITNUM)) |
Set a certain bit's value. More... | |
#define | CLEAR_BIT(REG, BITNUM) (REG) &= ~(1 << (BITNUM)) |
Clear a certain bit's value to. More... | |
#define | TOGGLE_BIT(REG, BITNUM) (REG) ^= (1 << (BITNUM)) |
Toggle a bit to 0 if it's 1 , 1 otherwise. More... | |
#define | GET_BIT(REG, BITNUM) (((REG) >> (BITNUM)) & 1) |
Return the value of the bit whether it's 1 or 0 More... | |
This module contains the bit math manipulation macro-functions.
#define SET_BIT | ( | REG, | |
BITNUM | |||
) | (REG) |= (1 << (BITNUM)) |
#include <LIB/LSTD_BITMATH.h>
Set a certain bit's value.
[in] | REG | The register to set its bit |
[in] | BITNUM | The bit number to set |
#define CLEAR_BIT | ( | REG, | |
BITNUM | |||
) | (REG) &= ~(1 << (BITNUM)) |
#include <LIB/LSTD_BITMATH.h>
Clear a certain bit's value to.
[in] | REG | The register to clear its bit |
[in] | BITNUM | The bit number to clear |
#define TOGGLE_BIT | ( | REG, | |
BITNUM | |||
) | (REG) ^= (1 << (BITNUM)) |
#include <LIB/LSTD_BITMATH.h>
Toggle a bit to 0
if it's 1
, 1
otherwise.
[in] | REG | The register to toggle its bit |
[in] | BITNUM | The bit number to toggle |
#define GET_BIT | ( | REG, | |
BITNUM | |||
) | (((REG) >> (BITNUM)) & 1) |
#include <LIB/LSTD_BITMATH.h>
Return the value of the bit whether it's 1
or 0
[in] | REG | The register to get its bit |
[in] | BITNUM | The bit number to get |