FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
driver_rstctrl.c
Go to the documentation of this file.
1
22
23// Standard Library Includes
24#include <stdint.h>
25
26// Framework Includes
27#include <driver_ccp_asm.h>
28#include <driver_rstctrl.h>
29
30// Device-specific Includes
31#include <xc.h>
32
34{
35 return RSTCTRL.RSTFR;
36}
37
39{
40 RSTCTRL.RSTFR = value;
41}
42
44{
45 ASM_WriteCcp8(&RSTCTRL.SWRR, value);
46}
47
49{
50 return RSTCTRL.MCFLAGSA;
51}
52
54{
55 RSTCTRL.MCFLAGSA = value;
56}
57
59{
60 return RSTCTRL.MCFLAGSB;
61}
62
64{
65 RSTCTRL.MCFLAGSB = value;
66}
void ASM_WriteCcp8(register8_t *regAddr, uint8_t value)
Writes value to a Configuration Change Protected (CCP) 8-bit register.
uint8_t RSTCTRL_ReadResetFlagRegister(void)
Reads the RSTFR register value.
uint8_t RSTCTRL_ReadMachineCheckFlagsA(void)
Reads the MCFLAGSA register value.
void RSTCTRL_WriteMachineCheckFlagsA(uint8_t value)
Overwrites the MCFLAGSA register value.
uint8_t RSTCTRL_ReadMachineCheckFlagsB(void)
Reads the MCFLAGSB register value.
void RSTCTRL_WriteMachineCheckFlagsB(uint8_t value)
Overwrites the MCFLAGSB register value.
void RSTCTRL_WriteResetFlagRegister(uint8_t value)
Overwrites the RSTFR register value.
void RSTCTRL_WriteSoftwareResetRegister(uint8_t value)
Overwrites the SWRR register value.