PHiLIP
|
Accessing application registers. More...
#include <errno.h>
#include <stdint.h>
#include "stm32f1xx_hal.h"
#include "PHiLIP_typedef.h"
#include "app_common.h"
#include "app_access.h"
#include "app_reg.h"
#include "gpio.h"
#include "uart.h"
#include "i2c.h"
#include "spi.h"
#include "pwm_dac.h"
#include "rtc.h"
#include "adc.h"
#include "tmr.h"
#include "sys.h"
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... | |
Accessing application registers.
Deals with setting up registers, reading, writing and access.