73 lines
1.2 KiB
C
73 lines
1.2 KiB
C
/**
|
|
* @brief Register Editing Interface
|
|
* @details This file is an abstraction to all the bitwise operations
|
|
* @author Jake G
|
|
* @date 2024
|
|
* @copyright None
|
|
* @file MockRegEdit.h
|
|
*/
|
|
|
|
#ifndef REGEDIT_H
|
|
#define REGEDIT_H
|
|
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
*/
|
|
void RegEdit_SetRegister(void *reg);
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
*/
|
|
void RegEdit_ClearRegister(void *reg);
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
* @param bit_num The bit location.
|
|
*/
|
|
void RegEdit_SetBit(void *reg, uint8_t bit_num);
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
* @param bit_num The bit location.
|
|
*/
|
|
void RegEdit_ClearBit(void *reg, uint8_t bit_num);
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
* @param bit_num The bit location.
|
|
* @return
|
|
*/
|
|
bool RegEdit_IsBitSet(void *reg, uint8_t bit_num);
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
* @param num The bit location.
|
|
*/
|
|
void RegEdit_OR_Num(void *reg, uint8_t num);
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
* @param num The bit location.
|
|
*/
|
|
void RegEdit_AND_Num(void *reg, uint8_t num);
|
|
|
|
/**
|
|
*
|
|
* @param reg The register address.
|
|
* @param num The bit location.
|
|
*/
|
|
void RegEdit_SetNum(void *reg, uint8_t num);
|
|
|
|
#endif //REGEDIT_H
|