#include <stdint.h>

#ifndef REGISTERS_H
#define REGISTERS_H

extern inline void reg_write_bits_pos(volatile uint32_t *reg, uint32_t data, uint8_t pos, uint32_t mask);
extern inline void reg_write_bits(volatile uint32_t *reg, uint32_t data, uint32_t mask);
extern inline void reg_set_bits_pos(volatile uint32_t *reg, uint32_t mask);
extern inline void reg_set_bits(volatile uint32_t *reg, uint32_t mask);
extern inline void reg_toggle_bits_pos(volatile uint32_t *reg, uint8_t pos, uint32_t mask);
extern inline void reg_toggle_bits(volatile uint32_t *reg, uint32_t mask);
extern inline void reg_clear_bits_pos(volatile uint32_t *reg, uint8_t pos, uint32_t mask);
extern inline void reg_clear_bits(volatile uint32_t *reg, uint32_t mask);
extern inline uint32_t reg_read_bits_pos(volatile uint32_t *reg, uint8_t pos, uint32_t mask);

#endif // REGISTERS_H
