PHiLIP
app_reg.h File Reference

Accessing application registers. More...

Go to the source code of this file.

Functions

void init_app_reg (map_t *reg)
 Initializes application registers. More...
 
error_t execute_reg_change ()
 Executes or commits all register changes on the periphs. More...
 
uint32_t get_reg_size ()
 Gets the total size of the register map in bytes. More...
 
void unprotected_read_uint8 (uint32_t index, uint8_t *data)
 An unprotected read from the register map. More...
 
error_t read_reg (uint32_t index, uint8_t *data)
 Reads a register from the register map. More...
 
error_t read_regs (uint32_t index, uint8_t *data, uint16_t size)
 Reads multiple registers from the register map. More...
 
error_t write_reg (uint32_t index, uint8_t data, uint8_t access)
 Writes a register from the register map. More...
 
error_t write_regs (uint32_t index, uint8_t *data, uint16_t size, uint8_t access)
 Writes multiple register from the register map. More...
 
void add_index (uint16_t *i)
 Adds a number and wraps around if register size exceeded. More...
 
void sub_index (uint16_t *i)
 Subtracts a number and wraps around if 0. More...
 

Detailed Description

Accessing application registers.

Author
Kevin Weiss
Date
13.02.2019

Deals with setting up registers, reading, writing and access.