Skip to content

Commit

Permalink
Move constants
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Feb 1, 2024
1 parent 33278f4 commit 5b37ab2
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions cpp/buses/rpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,6 @@
#endif
#include "gpio_bus.h"

// Constant declarations (GIC)
const static uint32_t ARM_GICD_BASE = 0xFF841000;
const static uint32_t ARM_GICC_BASE = 0xFF842000;
const static uint32_t ARM_GIC_END = 0xFF847FFF;
const static int GICD_CTLR = 0x000;
const static int GICD_IGROUPR0 = 0x020;
const static int GICD_ISENABLER0 = 0x040;
const static int GICD_ICENABLER0 = 0x060;
const static int GICD_ISPENDR0 = 0x080;
const static int GICD_ICPENDR0 = 0x0A0;
const static int GICD_ISACTIVER0 = 0x0C0;
const static int GICD_ICACTIVER0 = 0x0E0;
const static int GICD_IPRIORITYR0 = 0x100;
const static int GICD_ITARGETSR0 = 0x200;
const static int GICD_ICFGR0 = 0x300;
const static int GICD_SGIR = 0x3C0;
const static int GICC_CTLR = 0x000;
const static int GICC_PMR = 0x001;

// GPIO3
const static int GIC_GPIO_IRQ = (32 + 116);

class RpiBus : public GpioBus
{

Expand Down Expand Up @@ -239,4 +217,26 @@ class RpiBus : public GpioBus
const static uint32_t PADS_OFFSET = 0x00100000;
const static uint32_t GPIO_OFFSET = 0x00200000;
const static uint32_t QA7_OFFSET = 0x01000000;

// Constant declarations (GIC)
const static uint32_t ARM_GICD_BASE = 0xFF841000;
const static uint32_t ARM_GICC_BASE = 0xFF842000;
const static uint32_t ARM_GIC_END = 0xFF847FFF;
const static int GICD_CTLR = 0x000;
const static int GICD_IGROUPR0 = 0x020;
const static int GICD_ISENABLER0 = 0x040;
const static int GICD_ICENABLER0 = 0x060;
const static int GICD_ISPENDR0 = 0x080;
const static int GICD_ICPENDR0 = 0x0A0;
const static int GICD_ISACTIVER0 = 0x0C0;
const static int GICD_ICACTIVER0 = 0x0E0;
const static int GICD_IPRIORITYR0 = 0x100;
const static int GICD_ITARGETSR0 = 0x200;
const static int GICD_ICFGR0 = 0x300;
const static int GICD_SGIR = 0x3C0;
const static int GICC_CTLR = 0x000;
const static int GICC_PMR = 0x001;

// GPIO3
const static int GIC_GPIO_IRQ = (32 + 116);
};

0 comments on commit 5b37ab2

Please sign in to comment.