ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_poeg_regs.h
Go to the documentation of this file.
1
17
18#pragma once
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <stdint.h>
25
26#include "ra8_attributes.h"
27
28typedef enum : uintptr_t {
29 k_ra8_poeg0_base_addr = 0x40212000UL,
30 k_ra8_poeg1_base_addr = 0x40212100UL,
31 k_ra8_poeg2_base_addr = 0x40212200UL,
32 k_ra8_poeg3_base_addr = 0x40212300UL,
34
35typedef enum : uint16_t {
39
40typedef struct {
41 volatile uint32_t POEGG;
43
46static inline volatile r_poeg_regs_t* ra8_poeg(uint8_t group)
47{
48 if ((uint16_t)group >= k_ra8_poeg_group_count) {
49 return nullptr;
50 }
51 return (volatile r_poeg_regs_t*)(k_ra8_poeg0_base_addr +
52 ((uintptr_t)group * (uintptr_t)k_ra8_poeg_group_stride));
53}
54
55#ifdef __cplusplus
56}
57#endif
Annotation-attribute framework macros for ra8-firmware.
#define RA8_HW_REGISTER_ACCESS
Mark an MMIO accessor function (returns volatile register pointer).
ra8_poeg_limits_t
@ k_ra8_poeg_group_count
RA8 poeg group count.
@ k_ra8_poeg_group_stride
RA8 poeg group stride.
static volatile r_poeg_regs_t * ra8_poeg(uint8_t group)
Get pointer to POEG group N (0..3).
ra8_poeg_addr_t
@ k_ra8_poeg2_base_addr
RA8 poeg2 base address.
@ k_ra8_poeg3_base_addr
RA8 poeg3 base address.
@ k_ra8_poeg0_base_addr
RA8 poeg0 base address.
@ k_ra8_poeg1_base_addr
RA8 poeg1 base address.
volatile uint32_t POEGG
+0x00 POEG Group setting + status.