Files
hmmmm_avr_generic/inc/mem.h
2025-01-19 14:31:35 +03:00

62 lines
1.2 KiB
C

#ifndef __MEM_H__
#define __MEM_H__
#include <stdint.h>
#include <stdlib.h>
#include "../../../inc/libhmmmm.h"
#ifndef RAM_CELL_WORDS
#define RAM_CELL_WORDS 1
#endif
#if RAM_CELL_WORDS == 1
typedef uint8_t ram_cell_t;
#endif
#if RAM_CELL_WORDS == 2
typedef uint16_t ram_cell_t;
#endif
#if RAM_CELL_WORDS == 3
typedef uint32_t ram_cell_t;
#endif
#if RAM_CELL_WORDS == 4
typedef uint32_t ram_cell_t;
#endif
#ifndef GP_REG_CELL_WORDS
#define GP_REG_CELL_WORDS 1
#endif
#if GP_REG_CELL_WORDS == 1
typedef uint8_t gp_reg_cell_t;
#endif
#if GP_REG_CELL_WORDS == 2
typedef uint16_t gp_reg_cell_t;
#endif
#if GP_REG_CELL_WORDS == 3
typedef uint32_t gp_reg_cell_t;
#endif
#if GP_REG_CELL_WORDS == 4
typedef uint32_t gp_reg_cell_t;
#endif
#ifndef IO_REG_CELL_WORDS
#define IO_REG_CELL_WORDS 1
#endif
#if IO_REG_CELL_WORDS == 1
typedef uint8_t io_reg_cell_t;
#endif
#if IO_REG_CELL_WORDS == 2
typedef uint16_t io_reg_cell_t;
#endif
#if IO_REG_CELL_WORDS == 3
typedef uint32_t io_reg_cell_t;
#endif
#if IO_REG_CELL_WORDS == 4
typedef uint32_t io_reg_cell_t;
#endif
void* default_addr_read_handler(uint64_t ident, uint64_t addr, void* rawCells);
void default_addr_write_handler(uint64_t ident, uint64_t addr, void* rawCells, void* data);
#endif // ifndef __MEM_H__