|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
system.h
1
14/*
15© [2024] Microchip Technology Inc. and its subsidiaries.
16
17 Subject to your compliance with these terms, you may use Microchip
18 software and any derivatives exclusively with Microchip products.
19 You are responsible for complying with 3rd party license terms
20 applicable to your use of 3rd party software (including open source
21 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
22 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
23 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
24 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
25 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
26 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
27 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
28 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
29 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
30 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
31 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
32 THIS SOFTWARE.
33*/
34
35#include "xc.h"
36#include "stdint.h"
37#include "system_types.h"
38
39#ifndef SYSTEM_H
40#define SYSTEM_H
41
47void SYSTEM_Initialize(void);
48
54 inline static void SYSTEM_CORCONInitialize()
55{
56 CORCON = (CORCON & 0x00F2) | CORCON_MODE_PORVALUES;
57}
58
66 inline static void SYSTEM_CORCONModeOperatingSet(SYSTEM_CORCON_MODES modeValue)
67{
68 CORCON = (CORCON & 0x00F2) | modeValue;
69}
70
77 inline static void SYSTEM_CORCONRegisterValueSet(uint16_t value)
78{
79 CORCON = value;
80}
81
87 inline static uint16_t SYSTEM_CORCONRegisterValueGet(void)
88{
89 return CORCON;
90}
91
98 inline static uint32_t SYSTEM_DeviceIdRegisterAddressGet(void)
99{
100 return __DEVID_BASE;
101}
102
103#endif /* SYSTEM_H */
system_types.h
This is the generated driver types header file for the System driver.
SYSTEM_CORCON_MODES
enum CORCON_MODE_TYPE SYSTEM_CORCON_MODES
CORCON_MODE_PORVALUES
@ CORCON_MODE_PORVALUES
Definition system_types.h:50
SYSTEM_CORCONModeOperatingSet
static void SYSTEM_CORCONModeOperatingSet(SYSTEM_CORCON_MODES modeValue)
This inline function sets the CPU core control register operating mode to a value that is decided by ...
Definition system.h:66
SYSTEM_CORCONRegisterValueSet
static void SYSTEM_CORCONRegisterValueSet(uint16_t value)
This inline function sets the value of CPU core control register.
Definition system.h:77
SYSTEM_DeviceIdRegisterAddressGet
static uint32_t SYSTEM_DeviceIdRegisterAddressGet(void)
This inline function gets the base address of the DEVID register for the currently selected device.
Definition system.h:98
SYSTEM_Initialize
void SYSTEM_Initialize(void)
Initializes the System module.
Definition system.c:55
SYSTEM_CORCONRegisterValueGet
static uint16_t SYSTEM_CORCONRegisterValueGet(void)
This inline function gets the value of CPU core control register.
Definition system.h:87
SYSTEM_CORCONInitialize
static void SYSTEM_CORCONInitialize()
Initializes the CPU core control register.
Definition system.h:54