restructuring again

stable
Penguin 4 years ago
parent f1a55f7002
commit 27165f7fa2

@ -0,0 +1 @@
penguin@penguin-pc.12922:1592934912

2
.gitignore vendored

@ -1,5 +1,5 @@
GTAGS
GPATH
GRTAGS
.clang_complete
.clang*

@ -0,0 +1 @@
penguin@penguin-pc.12922:1592934912

@ -1,35 +0,0 @@
#ifndef _HAL_ARM_H_
#define _HAL_ARM_H_
#include "epenguin_conf.h"
#if !(EP_UARCH == __UARCH_ARM__)
#error This shouldn't be included unless arm is the uarch of choice!
#endif
#if !(defined(__ASSEMBLY__))
#include <stdint.h>
#ifndef __cplusplus
typedef volatile const uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
typedef volatile const uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
typedef volatile const uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int)
#else
typedef volatile uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
typedef volatile uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
typedef volatile uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int)
#endif
typedef volatile uint32_t WoReg; // Write only 32-bit register (volatile unsigned int)
typedef volatile uint16_t WoReg16; // Write only 16-bit register (volatile unsigned int)
typedef volatile uint16_t WoReg8; // Write only 8-bit register (volatile unsigned int)
typedef volatile uint32_t RwReg; // Write only 32-bit register (volatile unsigned int)
typedef volatile uint16_t RwReg16; // Write only 16-bit register (volatile unsigned int)
typedef volatile uint8_t RwReg8; // Write only 8-bit register (volatile unsigned int)
#define CAST(type, value) ((type*)(value))
#define REG_ACCESS(type, address) (*(type*)(address))
#else
#define CAST(type, value) (value)
#define REG_ACCESS(type, address) (address)
#endif
#endif

@ -0,0 +1,39 @@
#ifndef _HAL_ARM_HPP_
#define _HAL_ARM_HPP_
#include "epenguin_conf.h"
#if !(EP_UARCH == __UARCH_ARM__)
#error This shouldn't be included unless arm is the uarch of choice!
#endif
#if !(defined(__ASSEMBLY__))
#include <stdint.h>
#ifndef __cplusplus
// typedef volatile const uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
// typedef volatile const uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
// typedef volatile const uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int)
// #else
// typedef volatile uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
// typedef volatile uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
// typedef volatile uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int)
// #endif
typedef volatile const uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
typedef volatile const uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
typedef volatile const uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int Ts)
typedef volatile uint32_t WoReg; // Write only 32-bit register (volatile unsigned int)
typedef volatile uint16_t WoReg16; // Write only 16-bit register (volatile unsigned int)
typedef volatile uint16_t WoReg8; // Write only 8-bit register (volatile unsigned int)
typedef volatile uint32_t RwReg; // Write only 32-bit register (volatile unsigned int)
typedef volatile uint16_t RwReg16; // Write only 16-bit register (volatile unsigned int)
typedef volatile uint8_t RwReg8; // Write only 8-bit register (volatile unsigned int)
#define CAST(type, value) ((type*)(value))
#define REG_ACCESS(type, address) (*(type*)(address))
#else
#define CAST(type, value) (value)
#define REG_ACCESS(type, address) (address)
#endif
namespace hal::arm{};
#endif

@ -1,40 +0,0 @@
/* -- ePenguin Master --
This master file dictates all supported hardware. It lists supported
architectures, mcu families, and specific mcus. This software framework
targets hardware at the mcu level--not at the board level. Board layers can
be applied, but this framework targets the mcu and the mcu alone.
*/
#ifndef _EPENGUIN_MASTER_H_
#define _EPENGUIN_MASTER_H_
#ifndef __UARCHITECTURES__
#define __UARCHITECTURES__
#define __UARCH_ARM__ (0)
#define __UARCH_ARM64__ (1)
#define __UARCH_AVR__ (2)
#define __UARCH_AVR32__ (3)
#define __UARCH_X86__ (4)
#define __UARCH_RISCV__ (5)
#endif
#ifndef __UFAMILIES__
#define __UFAMILIES__
/* Support ARM MCU Families */
/* Microchip */
#define __SAM_D1X__ (0)
#define __SAM_C1X__ (1)
#define __SAM_D2X__ (2)
#define __SAM_E_D5X__ (3)
#define __SAM_C2X__ (4)
#define __SAM_L2X__ (5)
/* STMicroelectronics */
/* NXP */
#endif
#endif

@ -0,0 +1,10 @@
#ifndef _EPENGUIN_HPP_
#define _EPENGUIN_HPP_
#include "epenguin_conf.h"
#include "epenguin_hal.hpp"
#endif

@ -1,8 +1,7 @@
#ifndef _EPENGUIN_H_
#define _EPENGUIN_H_
#include "mcu.h"
namespace hal{};
#endif

@ -1,6 +0,0 @@
#ifndef _EPENGUIN_HAL_H_
#define _EPENGUIN_HAL_H_
#endif

@ -1,9 +0,0 @@
#ifndef __MCU_H__
#define __MCU_H__
#include "epenguin_conf.h"
#endif
Loading…
Cancel
Save